Home Forums Chart Support LabelFormatter Error Reply To: LabelFormatter Error

#32892

@jeonkook,

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.
CanvasJS.formatNumber(e.value, "#,##0.##")
Please take a look at this updated JSFiddle for working sample.

line chart with labelformatter in y axis

Also, please refer to valueFormatString which lets you format the value that appears in axis / parameter that you pass in formatNumber method.


Vishwas R
Team CanvasJS