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:
parent
43212f871f
commit
03708a90ef
100 changed files with 1687 additions and 1055 deletions
|
|
@ -3,6 +3,8 @@ package chart
|
|||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
util "github.com/wcharczuk/go-chart/util"
|
||||
)
|
||||
|
||||
// AnnotationSeries is a series of labels on the chart.
|
||||
|
|
@ -55,10 +57,10 @@ func (as AnnotationSeries) Measure(r Renderer, canvasBox Box, xrange, yrange Ran
|
|||
lx := canvasBox.Left + xrange.Translate(a.XValue)
|
||||
ly := canvasBox.Bottom - yrange.Translate(a.YValue)
|
||||
ab := Draw.MeasureAnnotation(r, canvasBox, style, lx, ly, a.Label)
|
||||
box.Top = Math.MinInt(box.Top, ab.Top)
|
||||
box.Left = Math.MinInt(box.Left, ab.Left)
|
||||
box.Right = Math.MaxInt(box.Right, ab.Right)
|
||||
box.Bottom = Math.MaxInt(box.Bottom, ab.Bottom)
|
||||
box.Top = util.Math.MinInt(box.Top, ab.Top)
|
||||
box.Left = util.Math.MinInt(box.Left, ab.Left)
|
||||
box.Right = util.Math.MaxInt(box.Right, ab.Right)
|
||||
box.Bottom = util.Math.MaxInt(box.Bottom, ab.Bottom)
|
||||
}
|
||||
}
|
||||
return box
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue