Skip to content

Commit

Permalink
Undo the experiment in the demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
mum4k committed Feb 13, 2019
1 parent 23c01a5 commit 9df48f9
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions widgets/linechart/linechartdemo/linechartdemo.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package main

import (
"context"
"fmt"
"math"
"time"

Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 9df48f9

Please sign in to comment.