Primefaces图表编号格式

Primefaces图表编号格式,primefaces,charts,jqplot,Primefaces,Charts,Jqplot,我希望my中的数字应以小数点显示(例如:102.456,00) 是否可以将数字格式设置为: 使用此功能,数字显示如下:R$10832 | R$25476等。 但我希望它显示为:R$10.832 | R$25.476等 是否可以在函数中设置它,或者我需要使用设置它?我在bean controller中使用此解决方案: Axis yAxis = graph.getAxis(AxisType.Y); yAxis.setTickFormat("%'.0f"); 因此,对于您的问题,请尝试yAxis.s

我希望my中的数字应以小数点显示(例如:102.456,00)

是否可以将数字格式设置为:

使用此功能,数字显示如下:R$10832 | R$25476等。 但我希望它显示为:R$10.832 | R$25.476等


是否可以在函数中设置它,或者我需要使用设置它?

我在bean controller中使用此解决方案:

Axis yAxis = graph.getAxis(AxisType.Y);
yAxis.setTickFormat("%'.0f");

因此,对于您的问题,请尝试
yAxis.setTickFormat(“R$%'.0f”)

在JQPlot文档中搜索解决方案后,我发现可以在扩展器中设置千分位数和小数点,如下所示:

<script>
            function ext() {
                this.cfg.axes.yaxis.tickOptions.formatString = "R$%'#.0f";
                $.jqplot.sprintf.thousandsSeparator = '.';
                $.jqplot.sprintf.decimalMark = ','; 

            }
</script>

函数ext(){
this.cfg.axes.yaxis.tickOptions.formatString=“R$%”#.0f”;
$.jqplot.sprintf.thousandsSeparator=';
$.jqplot.sprintf.decimalMark=',';
}

你找到答案了吗?没有。有什么提示吗?嗨!您的解决方案显示结果,如10000.01;但我需要用点表示千位分隔符,用逗号表示十进制分隔符,比如:10.000,01。
<script>
            function ext() {
                this.cfg.axes.yaxis.tickOptions.formatString = "R$%'#.0f";
                $.jqplot.sprintf.thousandsSeparator = '.';
                $.jqplot.sprintf.decimalMark = ','; 

            }
</script>