You must be logged in to post your query.
Home › Forums › Report Bugs › format currency
Tagged: Decimal Places
Hello, I use the br culture and I’m trying to format the value: 114307653.79 (114,307,653.79) and it shows more than two decimal places – 114,307,653,7900,0001.
What do I do ?
Thank you.
114.307.653,79 and not 114.307.653,79000001
thanks.
@gussmarcaro,
Setting valueFormatSting to ‘#,##0.00’ seems to be working fine with the y-value that you have shared (114307653.79).
Can you kindly create jsfiddle reproducing the issue you are facing, so that we can look into your code, understand it better and help you out?
— Vishwas R Team CanvasJS
Hello, thank you for replying.
Verify that they are not two decimal places.
Thank you. Follow the code.
var chart = new CanvasJS.Chart(“chartContainer”, { data: [ { type: “column”, valueFormatSting: “#, ## 0.00”, dataPoints: [ { x: 10, y: 710000000.69 }, { x: 20, y: 55 }, { x: 30, y: 50 }, { x: 40, y: 65 }, { x: 50, y: 95 }, { x: 60, y: 68 }, { x: 70, y: 28 }, { x: 80, y: 34 }, { x: 90, y: 14 } ] } ] });
chart.render();
Please note tooltip hint
Thanks.
valueFormatString formats the labels appearing on axisY. To format the y-values that appear in toolTip / indexLabel, you should use yValueFormatString. Setting yValueFormatSting to ‘#,##0.00’ should work fine in your case. Please refer documentation on yValueFormatString for more info and formatting options available for the same.
It would be helpful for us to understand your scenario better when we look at your working code live in jsfiddle. So I request you to create jsfiddle and share it with us, rather than pasting code, if you are still facing any issue.
thank you. This is the code
var chart = new CanvasJS.Chart(“chartContainer”, { data: [ { type: “column”, dataPoints: [ { x: 10, y: 7100000000.69 }, { x: 20, y: 55 }, { x: 30, y: 50 }, { x: 40, y: 65 }, { x: 50, y: 95 }, { x: 60, y: 68 }, { x: 70, y: 28 }, { x: 80, y: 34 }, { x: 90, y: 14 } ] } ],
AxisY:{ ValueFormatString: “#,## 0.00” }
});
It worked! Thanks for listening.
You must be logged in to reply to this topic. Login/Register