diff --git a/react-c3js.js b/react-c3js.js index f730ac7..1338950 100644 --- a/react-c3js.js +++ b/react-c3js.js @@ -76,6 +76,11 @@ var C3Chart = function (_React$Component) { value: function loadNewData(data) { this.chart.load(data); } + }, { + key: 'updateGroups', + value: function updateGroups(groups) { + this.chart.groups(groups); + } }, { key: 'unloadData', value: function unloadData() { @@ -91,7 +96,8 @@ var C3Chart = function (_React$Component) { if (config.unloadBeforeLoad) { this.unloadData(); } - + + this.updateGroups(config.data.groups); this.loadNewData(config.data); } }, {