You must be logged in to post your query.
Home › Forums › Chart Support › LabelFormatter Error
I use canvasJS for charts.
When I use labelFormatter in YAxis Options, it seems work weird.
This is an example.
I did not fix the value. But number 1.2 is changed 1.20000000002.
So how to solve this problem?
The issue seems to be happening as you are returning the value as such in labelFormatter without formatting it. You can format the number to fix the number of decimal values by using formatNumber method.
Please take a look at this updated JSFiddle for working sample.
Also, please refer to valueFormatString which lets you format the value that appears in axis / parameter that you pass in formatNumber method.
You must be logged in to reply to this topic. Login/Register