-
Notifications
You must be signed in to change notification settings - Fork 352
Closed
Description
Hi,
I'd like to use a comma for decimal separators in the Chart Grid renderer. Do you know which line I should modify?
I've already configured helper.js for the XYRenderer.jsx with the following code, but can't find what to change in ChartGridRenderer.jsk:
function round_to_precision(num, precision, supress_thou_sep) {
if (num === 0) {
//zero should always be "0"
return "0";
}
var s = Math.round(num * Math.pow(10,precision)) / Math.pow(10,precision);
s = s + "";
s = s.split(".");
if (s.length == 1) {
s[1] = "";
}
if (s[1].length < precision) {
s[1] += Array(precision-s[1].length + 1).join("0");
}
if (s[0].length > 4) {
s[0] = d3.format(",")(parseInt(s[0]));
s[0] = s[0]+"";
s[0] = s[0].replace(/,/g, " ");
}
if (precision === 0) {
return s[0];
}
return s.join(",");
}
Thank you!
Metadata
Metadata
Assignees
Labels
No labels
