amcharts / amcharts3-react

Official amCharts V3 React component
Apache License 2.0
118 stars 50 forks source link

Check NaN values in updateChartObject #7

Closed timurib closed 8 years ago

timurib commented 8 years ago

Hello

isEqual() function does not consider a NaN values. When some parameter has a NaN value, then chart will be updated every time, even when configuration has not actually changed.

This checking may seem unnecessary, but I really spent a lot of time to profile the code in an attempt to find the cause of slowdowns.

Also PR contains custom implementation of isNaN function, because standard function has a weird behavior. More details at SO.

Pauan commented 8 years ago

Looks great, thanks!