benkeen / d3pie

A configurable pie chart lib and generator built on d3.js
MIT License
371 stars 203 forks source link

Sample: TypeError: data.percentage.toFixed is not a function #130

Open chendachao opened 7 years ago

chendachao commented 7 years ago

In the sample code of placeholder parser, it doesn't have any tooltips and throws an error in console. TypeError: data.percentage.toFixed is not a function After a research, I found it caused by this line. Changed to (+data.percentage).toFixed(2) can solve this error.