linechart: reset bottomValue and topValue on each calculation, to only consider current data

This commit is contained in:
Martin Lindhe 2016-09-24 00:39:43 +02:00
parent 23b25db083
commit 5e8d1e2014
1 changed files with 3 additions and 0 deletions

View File

@ -223,6 +223,9 @@ func (lc *LineChart) calcLayout() {
lc.minY = lc.Data[0]
lc.maxY = lc.Data[0]
lc.bottomValue = lc.minY
lc.topValue = lc.maxY
// valid visible range
vrange := lc.innerArea.Dx()
if lc.Mode == "braille" {