small bugfix for edge case.

This commit is contained in:
Will Charczuk 2016-07-16 23:45:28 -07:00
parent 3432bd9443
commit d455b775da
3 changed files with 45 additions and 0 deletions

View file

@ -104,7 +104,11 @@ func (c Chart) Render(rp RendererProvider, w io.Writer) error {
xt, yt, yta = c.getAxesTicks(r, xr, yr, yra, xf, yf, yfa)
canvasBox = c.getAxisAdjustedCanvasBox(r, canvasBox, xr, yr, yra, xt, yt, yta)
xr, yr, yra = c.setRangeDomains(canvasBox, xr, yr, yra)
// do a second pass in case things haven't settled yet.
xt, yt, yta = c.getAxesTicks(r, xr, yr, yra, xf, yf, yfa)
canvasBox = c.getAxisAdjustedCanvasBox(r, canvasBox, xr, yr, yra, xt, yt, yta)
xr, yr, yra = c.setRangeDomains(canvasBox, xr, yr, yra)
}
if c.hasAnnotationSeries() {