@@ -83,6 +83,7 @@ return /******/ (function(modules) { // webpackBootstrap
83
83
84
84
module . exports = {
85
85
createClass : function ( chartType , methodNames , dataKey ) {
86
+ var excludedProps = [ 'data' , 'options' , 'redraw' ] ;
86
87
var classData = {
87
88
displayName : chartType + 'Chart' ,
88
89
getInitialState : function ( ) { return { } ; } ,
@@ -92,7 +93,7 @@ return /******/ (function(modules) { // webpackBootstrap
92
93
} ;
93
94
for ( var name in this . props ) {
94
95
if ( this . props . hasOwnProperty ( name ) ) {
95
- if ( name !== 'data' && name !== 'options' ) {
96
+ if ( excludedProps . indexOf ( name ) === - 1 ) {
96
97
_props [ name ] = this . props [ name ] ;
97
98
}
98
99
}
@@ -127,7 +128,10 @@ return /******/ (function(modules) { // webpackBootstrap
127
128
updatePoints ( nextProps , chart , dataKey ) ;
128
129
if ( chart . scale ) {
129
130
chart . scale . xLabels = nextProps . data . labels ;
131
+
132
+ if ( chart . scale . calculateXLabelRotation ) {
130
133
chart . scale . calculateXLabelRotation ( ) ;
134
+ }
131
135
}
132
136
chart . update ( ) ;
133
137
}
@@ -188,6 +192,17 @@ return /******/ (function(modules) { // webpackBootstrap
188
192
while ( nextProps . data . length < chart . segments . length ) {
189
193
chart . removeData ( ) ;
190
194
}
195
+ } else if ( name === "Radar" ) {
196
+ chart . removeData ( ) ;
197
+ nextProps . data . datasets . forEach ( function ( set , setIndex ) {
198
+ set . data . forEach ( function ( val , pointIndex ) {
199
+ if ( typeof ( chart . datasets [ setIndex ] [ dataKey ] [ pointIndex ] ) == "undefined" ) {
200
+ addData ( nextProps , chart , setIndex , pointIndex ) ;
201
+ } else {
202
+ chart . datasets [ setIndex ] [ dataKey ] [ pointIndex ] . value = val ;
203
+ }
204
+ } ) ;
205
+ } ) ;
191
206
} else {
192
207
while ( chart . scale . xLabels . length > nextProps . data . labels . length ) {
193
208
chart . removeData ( ) ;
0 commit comments