File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ import keyBy from 'lodash/keyBy';
77const NODE_ENV = ( typeof process !== 'undefined' ) && process . env && process . env . NODE_ENV ;
88
99class ChartComponent extends React . Component {
10+ constructor ( ) {
11+ super ( ) ;
12+ this . chartInstance = undefined ;
13+ }
14+
1015 static getLabelAsKey = d => d . label ;
1116
1217 static propTypes = {
@@ -48,10 +53,6 @@ class ChartComponent extends React.Component {
4853 datasetKeyProvider : ChartComponent . getLabelAsKey
4954 }
5055
51- componentWillMount ( ) {
52- this . chartInstance = undefined ;
53- }
54-
5556 componentDidMount ( ) {
5657 this . renderChart ( ) ;
5758 }
@@ -175,7 +176,7 @@ class ChartComponent extends React.Component {
175176 var currentDatasets = this . getCurrentDatasets ( ) ;
176177 currentDatasets . forEach ( d => {
177178 this . datasets [ this . props . datasetKeyProvider ( d ) ] = d ;
178- } )
179+ } ) ;
179180 }
180181
181182 updateChart ( ) {
You can’t perform that action at this time.
0 commit comments