diff --git a/lib/core.js b/lib/core.js index 3da694b..3c06eac 100644 --- a/lib/core.js +++ b/lib/core.js @@ -55,13 +55,16 @@ module.exports = { } else { // assign all of the properites from the next datasets to the current chart nextProps.data.datasets.forEach(function(set, setIndex) { - var chartDataset = chart.data.datasets[setIndex]; + + var chartDataset = {}; for (var property in set) { if (set.hasOwnProperty(property)) { chartDataset[property] = set[property]; } } + + chart.data.datasets[setIndex] = chartDataset; }); chart.data.labels = nextProps.data.labels;