also do this for the secondary axis
This commit is contained in:
parent
182d5a199b
commit
7a3d6a6915
2
chart.go
2
chart.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user