Skip to content

Commit 328d06c

Browse files
committed
update BarChart example
1 parent f1b4d9c commit 328d06c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

addons/easy_charts/examples/bar_chart/Control.gd

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ func _ready():
88
# And our y values. It can be an n-size array of arrays.
99
# NOTE: `x.size() == y.size()` or `x.size() == y[n].size()`
1010
var y: Array = [
11-
[20, 10, -15, 30, 42],
12-
[10, 1, -5, 20, 32]
11+
20, 10, -15, 30, 42
1312
]
1413

1514
# Add some labels for the x axis, we don't want to use our x values array
@@ -43,8 +42,7 @@ func _process(delta: float):
4342
# and updaptes the plot
4443
var new_val: String = "Day %s" % (chart.x.size() + 1)
4544
chart.x.append(new_val)
46-
chart.y[0].append(randi() % 40)
47-
chart.y[1].append(randi() % 50)
45+
chart.y.append(randi() % 40)
4846
chart.update()
4947

5048

0 commit comments

Comments
 (0)