Undo the experiment in the demo.

This commit is contained in:
Jakub Sobon 2019-02-12 23:19:31 -05:00
parent 23c01a5c56
commit 9df48f9060
No known key found for this signature in database
GPG Key ID: F2451A77FB05D3B7
1 changed files with 3 additions and 12 deletions

View File

@ -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),
); err != nil {
panic(err)
}