Helper API refactor (#40)

* api cleaup

* updates

* wtf

* updates

* snapshot.

* tweaks

* snapshot

* api tweaks.

* updates

* updates

* updates

* changes.

* updates

* updates

* sequence => seq

* dont need to use curl, just using wget

* fixing examples
This commit is contained in:
Will Charczuk 2017-05-12 17:12:23 -07:00 committed by GitHub
parent 43212f871f
commit 03708a90ef
100 changed files with 1687 additions and 1055 deletions

View file

@ -1,6 +1,10 @@
package chart
import "strings"
import (
"strings"
util "github.com/wcharczuk/go-chart/util"
)
// TextHorizontalAlign is an enum for the horizontal alignment options.
type TextHorizontalAlign int
@ -145,7 +149,7 @@ func (t text) MeasureLines(r Renderer, lines []string, style Style) Box {
var output Box
for index, line := range lines {
lineBox := r.MeasureText(line)
output.Right = Math.MaxInt(lineBox.Right, output.Right)
output.Right = util.Math.MaxInt(lineBox.Right, output.Right)
output.Bottom += lineBox.Height()
if index < len(lines)-1 {
output.Bottom += +style.GetTextLineSpacing()