From 5e8d1e2014ecbd9589a5c167527d7c0bc9cdd824 Mon Sep 17 00:00:00 2001 From: Martin Lindhe Date: Sat, 24 Sep 2016 00:39:43 +0200 Subject: [PATCH] linechart: reset bottomValue and topValue on each calculation, to only consider current data --- linechart.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linechart.go b/linechart.go index bf84718..277a575 100644 --- a/linechart.go +++ b/linechart.go @@ -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" {