簡體   English   中英

在谷歌條形圖中,我需要將 vaxis 中的數字顯示為逗號分隔值嗎?

[英]in google bar chart i need the numbers in vaxis to be shown as comma separated values?

var options = {
            width: 700,
            height: 400,
            interpolateNulls: true,
            title: title_val,
            hAxis: {
                title: haxis_title
            },
            vAxis: {
                title: vaxis_title,
                logscale: vaxis_logscale,
                format: '$',
            },
            legend: {
                position: 'right'
            }
        };
    }
    charttrend.draw(dataTable, options);

你想用這個格式化你的數據,

format: 'decimal' // displays numbers with thousands separators

或者如果它的貨幣那么

format: 'currency'

或類似的東西

format:'#,###%'

https://developers.google.com/chart/interactive/docs/customizing_axes#number-formats

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM