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';
7
7
const NODE_ENV = ( typeof process !== 'undefined' ) && process . env && process . env . NODE_ENV ;
8
8
9
9
class ChartComponent extends React . Component {
10
+ constructor ( ) {
11
+ super ( ) ;
12
+ this . chartInstance = undefined ;
13
+ }
14
+
10
15
static getLabelAsKey = d => d . label ;
11
16
12
17
static propTypes = {
@@ -48,10 +53,6 @@ class ChartComponent extends React.Component {
48
53
datasetKeyProvider : ChartComponent . getLabelAsKey
49
54
}
50
55
51
- componentWillMount ( ) {
52
- this . chartInstance = undefined ;
53
- }
54
-
55
56
componentDidMount ( ) {
56
57
this . renderChart ( ) ;
57
58
}
@@ -175,7 +176,7 @@ class ChartComponent extends React.Component {
175
176
var currentDatasets = this . getCurrentDatasets ( ) ;
176
177
currentDatasets . forEach ( d => {
177
178
this . datasets [ this . props . datasetKeyProvider ( d ) ] = d ;
178
- } )
179
+ } ) ;
179
180
}
180
181
181
182
updateChart ( ) {
You can’t perform that action at this time.
0 commit comments