mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Improve bargraph view so bar colors are configurable
Inspired by #624 Update the view object so that widget developers can configure bar color
This commit is contained in:
@@ -50,8 +50,9 @@ func MakeGraph(widget *Widget) {
|
||||
barTime = barTime.Add(time.Duration(time.Minute))
|
||||
|
||||
bar := view.Bar{
|
||||
Label: barTime.Format("15:04"),
|
||||
Percent: rand.Intn(100-5) + 5,
|
||||
Label: barTime.Format("15:04"),
|
||||
Percent: rand.Intn(100-5) + 5,
|
||||
LabelColor: "red",
|
||||
}
|
||||
|
||||
stats[i] = bar
|
||||
|
||||
Reference in New Issue
Block a user