How to change decimal delimiter on primfaces chart?

Asked

Viewed 22 times

0

  • 1

    https://forum.primefaces.org/viewtopic.php?p=88846 suggested using a custom extender for this purpose

1 answer

0


To make the modification it is necessary to create a method in javascript that makes the decimal changes:

function formatChart() {
    $.jqplot.sprintf.thousandsSeparator = '.';
    $.jqplot.sprintf.decimalMark = ','; 
}

Then associate this extension function to the chart created by java:

chartModel = new BarChartModel(); 
chartModel.setExtender("formatChart");

Browser other questions tagged

You are not signed in. Login or sign up in order to post.