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

Commit 83a3c87

Browse files
committed
Add support for setting plugins on a per-chart basis
1 parent 35f665b commit 83a3c87

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/core.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var Chart = require('chart.js');
1212

1313
module.exports = {
1414
createClass: function(chartType, methodNames, dataKey) {
15-
var excludedProps = ['data', 'options', 'redraw'];
15+
var excludedProps = ['data', 'options', 'redraw', 'plugins'];
1616
var classData = {
1717
displayName: chartType + 'Chart',
1818
getInitialState: function() { return {}; },
@@ -88,7 +88,8 @@ module.exports = {
8888
this.state.chart = new Chart(ctx, {
8989
type: type,
9090
data: nextProps.data,
91-
options: nextProps.options
91+
options: nextProps.options,
92+
plugins: nextProps.plugins
9293
});
9394
};
9495

0 commit comments

Comments
 (0)