How to change decimal delimiter in primfaces chart?

0

I have a problem that my decimal delimiter in the primefaces chart component is set to be . , how do I change to , ?

    
asked by anonymous 28.12.2017 / 20:53

1 answer

0

To make the change, you need to create a method in javascript that changes the decimals:

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

Then associate this extension function with the graph created by java:

chartModel = new BarChartModel(); 
chartModel.setExtender("formatChart");
    
29.12.2017 / 13:41