@@ -83,6 +83,7 @@ return /******/ (function(modules) { // webpackBootstrap
8383
8484 module . exports = {
8585 createClass : function ( chartType , methodNames , dataKey ) {
86+ var excludedProps = [ 'data' , 'options' , 'redraw' ] ;
8687 var classData = {
8788 displayName : chartType + 'Chart' ,
8889 getInitialState : function ( ) { return { } ; } ,
@@ -92,7 +93,7 @@ return /******/ (function(modules) { // webpackBootstrap
9293 } ;
9394 for ( var name in this . props ) {
9495 if ( this . props . hasOwnProperty ( name ) ) {
95- if ( name !== 'data' && name !== 'options' ) {
96+ if ( excludedProps . indexOf ( name ) === - 1 ) {
9697 _props [ name ] = this . props [ name ] ;
9798 }
9899 }
@@ -127,7 +128,10 @@ return /******/ (function(modules) { // webpackBootstrap
127128 updatePoints ( nextProps , chart , dataKey ) ;
128129 if ( chart . scale ) {
129130 chart . scale . xLabels = nextProps . data . labels ;
131+
132+ if ( chart . scale . calculateXLabelRotation ) {
130133 chart . scale . calculateXLabelRotation ( ) ;
134+ }
131135 }
132136 chart . update ( ) ;
133137 }
@@ -188,6 +192,17 @@ return /******/ (function(modules) { // webpackBootstrap
188192 while ( nextProps . data . length < chart . segments . length ) {
189193 chart . removeData ( ) ;
190194 }
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+ } ) ;
191206 } else {
192207 while ( chart . scale . xLabels . length > nextProps . data . labels . length ) {
193208 chart . removeData ( ) ;
0 commit comments