also do this for the secondary axis

This commit is contained in:
Will Charczuk 2017-03-05 23:21:39 -08:00
parent 182d5a199b
commit 7a3d6a6915

View File

@ -283,12 +283,14 @@ func (c Chart) getRanges() (xrange, yrange, yrangeAlt Range) {
yrangeAlt.SetMin(minya)
yrangeAlt.SetMax(maxya)
if c.YAxisSecondary.Style.Show {
delta := yrangeAlt.GetDelta()
roundTo := Math.GetRoundToForDelta(delta)
rmin, rmax := Math.RoundDown(yrangeAlt.GetMin(), roundTo), Math.RoundUp(yrangeAlt.GetMax(), roundTo)
yrangeAlt.SetMin(rmin)
yrangeAlt.SetMax(rmax)
}
}
return
}