rendro / easy-pie-chart

easy pie chart is a lightweight plugin to draw simple, animated pie charts for single values
http://rendro.github.io/easy-pie-chart
MIT License
2.07k stars 501 forks source link

Fix undefined values prevent future updates #171

Open yalnifj opened 8 years ago

yalnifj commented 8 years ago

Any unparsable value that results in a NaN such as "undefined" will cause the chart to disappear. But if the value is updated to a proper numerical value the chart does not redraw and animate correctly.

This fix defaults NaN values to 0. This will allow to chart to function properly regardless of the value and puts the responsibility back on the caller to hide or show the chart according to their own logic and business needs.