印度数字系统中的Zingchart整数逗号分隔

时间:2018-07-12 10:02:00

标签: javascript jquery charts zingchart

内置的zingchat参数"thousands-separator":","显示以百万计的货币值,例如1,236,024。但是,我试图在印度数字系统(例如12,36,024)中完成此输出。这是我当前的代码:

<html>
    <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.zingchart.com/zingchart.min.js"></script>

    </head>

<body>
<div id="myChart"></div>

<script>
var myConfig = {
    "graphset":[
        {
            "type":"bar",
            "plotarea":{
                "margin-left":"8%"
            },
            "scale-y":{
                "max-value":"8000000",
                "format":"$%v",
                "negation":"currency",
                "thousands-separator":",",
                "locale":"en-IN"
            },
            "plot":{
                "value-box":{
                    "text":"₹%v",
                    "negation":"currency",
                    "thousands-separator":","
                }
            },
            "series": [
                {
                  "values": [
                    3000000,
                    6426560,
                    7201440
                  ],
                  "text": "apples"
                },
                {
                  "values": [
                    1236020,
                    4424580,
                    3659450
                  ],
                  "text": "oranges"
                }
            ]
        }
    ]
};

zingchart.render({ 
    id : 'myChart', 
    data : myConfig, 
    height : "100%", 
    width: "100%"
});
</script>
<script src="zingchart.min.js"></script>
</body>
</html>

0 个答案:

没有答案