Skip to content

Commit 992d932

Browse files
authored
Clarify update docs (#11345)
1 parent ec7be48 commit 992d932

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/developers/updates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ It's pretty common to want to update charts after they've been created. When the
44

55
## Adding or Removing Data
66

7-
Adding and removing data is supported by changing the data array. To add data, just add data into the data array as seen in this example.
7+
Adding and removing data is supported by changing the data array. To add data, just add data into the data array as seen in this example, to remove it you can pop it again.
88

99
```javascript
10-
function addData(chart, label, data) {
10+
function addData(chart, label, newData) {
1111
chart.data.labels.push(label);
1212
chart.data.datasets.forEach((dataset) => {
13-
dataset.data.push(data);
13+
dataset.data.push(newData);
1414
});
1515
chart.update();
1616
}

0 commit comments

Comments
 (0)