linechart: reset bottomValue and topValue on each calculation, to only consider current data
This commit is contained in:
parent
23b25db083
commit
5e8d1e2014
@ -223,6 +223,9 @@ func (lc *LineChart) calcLayout() {
|
|||||||
lc.minY = lc.Data[0]
|
lc.minY = lc.Data[0]
|
||||||
lc.maxY = lc.Data[0]
|
lc.maxY = lc.Data[0]
|
||||||
|
|
||||||
|
lc.bottomValue = lc.minY
|
||||||
|
lc.topValue = lc.maxY
|
||||||
|
|
||||||
// valid visible range
|
// valid visible range
|
||||||
vrange := lc.innerArea.Dx()
|
vrange := lc.innerArea.Dx()
|
||||||
if lc.Mode == "braille" {
|
if lc.Mode == "braille" {
|
||||||
|
Loading…
Reference in New Issue
Block a user