【问题标题】:QxJqPlot, decimalMark and thousandsSeparatorQxJqPlot、decimalMark 和千位分隔符
【发布时间】:2018-04-21 02:41:02
【问题描述】:

小问题:

我将tickOptions formatString "%'.2f" 添加到我的轴,在jquery.jqplot.js 和jquery.jqplot.min.js 处更改decimalMark 和数千个Separator 字符,但没有任何改变。出现相同的十进制标记和千位分隔符。

如果我将“'.2”添加到我的格式字符串中,则会出现千位分隔符和小数点,但带有标准字符。

有人知道出了什么问题吗?我想使用欧洲的“1.000.000,00”格式。 请大家帮忙,谢谢。

(对不起我的英语)

【问题讨论】:

    标签: jqplot qooxdoo


    【解决方案1】:

    一个解决方案,添加这 2 行:

    $jqplot.sprintf.thousandsSeparator = '.';
    $jqplot.sprintf.decimalMark = ',';
    

    函数内部:(示例)

        var options = function($jqplot){
            $jqplot.sprintf.thousandsSeparator = '.';
            $jqplot.sprintf.decimalMark = ',';
    
            return {
                title: "Importe",
                seriesDefaults:{renderer: $jqplot.BarRenderer, pointLabels: {show: true}},
                series: paramet.resultado.series,
                legend: {show: true},
                axes:{
                    xaxis:{
                        renderer: $jqplot.CategoryAxisRenderer,
                        ticks: [""]
                    },
                    yaxis: {
                        tickOptions: {
                            formatString: "%'.2f"
                        }
                    }
                }
            }
        };
    
        var plugins = ['barRenderer', 'categoryAxisRenderer', 'pointLabels'];
    
        plot = new qxjqplot.Plot(paramet.resultado.dataSeries_total, options, plugins);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-17
      • 2010-10-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多