LoginSignup
1
0

More than 5 years have passed since last update.

[baidu echarts] 棒グラフのラベルをカスタマイズする方法

Last updated at Posted at 2017-11-12

option = {
    ...

    series: [
        {
            name: '売り上げ',
            type: 'bar',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'top',
                    formatter:function(obj){
                                var rmb = obj['value'];
                                rmb = rmb.toFixed(0);  
                                var jpy = rmb * 17;
                                return rmb + " (" + jpy +" 億円" + ")";
                            }
                }
            },
            data: [16, 100, 200, 300, 500, 700, 750]
        },
    ]

}

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0