mirror of https://github.com/mum4k/termdash.git
Undo the experiment in the demo.
This commit is contained in:
parent
23c01a5c56
commit
9df48f9060
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue