laying groundwork for grid lines and a refactor of translate

This commit is contained in:
Will Charczuk 2016-07-11 18:51:59 -07:00
parent 693a2ab66f
commit 52e80c183d

View file

@ -49,7 +49,7 @@ func (as AnnotationSeries) Measure(r Renderer, canvasBox Box, xrange, yrange Ran
Padding: DefaultAnnotationPadding,
})
for _, a := range as.Annotations {
lx := canvasBox.Left - xrange.Translate(a.X)
lx := canvasBox.Left + xrange.Translate(a.X)
ly := canvasBox.Bottom - yrange.Translate(a.Y)
ab := MeasureAnnotation(r, canvasBox, style, lx, ly, a.Label)
box.Top = MinInt(box.Top, ab.Top)