classData.componentWillReceiveProps = function(nextProps) {
var chart = this.state.chart; // can be undefined
if (chart) { // if not undefined then do the action
if (nextProps.redraw) {
chart.destroy();
this.initializeChart(nextProps);
} else {
dataKey = dataKey || dataKeys[chart.name];
updatePoints(nextProps, chart, dataKey);
if (chart.scale) {
chart.scale.xLabels = nextProps.data.labels;
if (chart.scale.calculateXLabelRotation){
chart.scale.calculateXLabelRotation();
}
}
chart.update();
}
}
};
classData.componentWillReceiveProps = function(nextProps) { var chart = this.state.chart; // can be undefined if (chart) { // if not undefined then do the action if (nextProps.redraw) { chart.destroy(); this.initializeChart(nextProps); } else { dataKey = dataKey || dataKeys[chart.name]; updatePoints(nextProps, chart, dataKey); if (chart.scale) { chart.scale.xLabels = nextProps.data.labels;