Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit da9f718

Browse files
authored
Merge pull request #117 from fscz/chartjs-v2
fix bug
2 parents c711d75 + 771a788 commit da9f718

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/core.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@ module.exports = {
5555
} else {
5656
// assign all of the properites from the next datasets to the current chart
5757
nextProps.data.datasets.forEach(function(set, setIndex) {
58-
var chartDataset = chart.data.datasets[setIndex];
58+
59+
var chartDataset = {};
5960

6061
for (var property in set) {
6162
if (set.hasOwnProperty(property)) {
6263
chartDataset[property] = set[property];
6364
}
6465
}
66+
67+
chart.data.datasets[setIndex] = chartDataset;
6568
});
6669

6770
chart.data.labels = nextProps.data.labels;

0 commit comments

Comments
 (0)