From 9df48f906090a09431d09072346e7ace1a9a6d4b Mon Sep 17 00:00:00 2001 From: Jakub Sobon Date: Tue, 12 Feb 2019 23:19:31 -0500 Subject: [PATCH] Undo the experiment in the demo. --- widgets/linechart/linechartdemo/linechartdemo.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/widgets/linechart/linechartdemo/linechartdemo.go b/widgets/linechart/linechartdemo/linechartdemo.go index 98b3136..063b894 100644 --- a/widgets/linechart/linechartdemo/linechartdemo.go +++ b/widgets/linechart/linechartdemo/linechartdemo.go @@ -18,7 +18,6 @@ package main import ( "context" - "fmt" "math" "time" @@ -49,23 +48,15 @@ func playLineChart(ctx context.Context, lc *linechart.LineChart, delay time.Dura ticker := time.NewTicker(delay) defer ticker.Stop() for i := 0; ; { - labels := map[int]string{} - for i := 0; i < 200; i++ { - labels[i] = fmt.Sprintf("l%d", i) - } - select { case <-ticker.C: i = (i + 1) % len(inputs) rotated := append(inputs[i:], inputs[:i]...) if err := lc.Series("first", rotated, linechart.SeriesCellOpts(cell.FgColor(cell.ColorBlue)), - /* - linechart.SeriesXLabels(map[int]string{ - 0: "zero", - }), - */ - linechart.SeriesXLabels(labels), + linechart.SeriesXLabels(map[int]string{ + 0: "zero", + }), ); err != nil { panic(err) }