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

Add support for setting plugins on a per-chart basis #216

Open
wants to merge 2 commits into
base: chartjs-v2
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var Chart = require('chart.js');

module.exports = {
createClass: function(chartType, methodNames, dataKey) {
var excludedProps = ['data', 'options', 'redraw'];
var excludedProps = ['data', 'options', 'redraw', 'plugins'];
var classData = {
displayName: chartType + 'Chart',
getInitialState: function() { return {}; },
Expand Down Expand Up @@ -88,7 +88,8 @@ module.exports = {
this.state.chart = new Chart(ctx, {
type: type,
data: nextProps.data,
options: nextProps.options
options: nextProps.options,
plugins: nextProps.plugins
});
};

Expand Down