echarts icon indicating copy to clipboard operation
echarts copied to clipboard

有没有百分比堆柱图?

Open chensjmail opened this issue 11 years ago • 1 comments

有没有百分比堆柱图? highcharts: http://www.hcharts.cn/test/index.php?from=demo&p=35 还是只能用这个来模拟:

option= {
            legend:{
                selectedMode:true,
                data:['贷款利息收入', '手续费及佣金净收入', '非利息收入']
            },
            calculable:true,
            xAxis:[{
                type:'category',
                data:['招行', '浦发', '中信', '兴业', '民生', '光大', '华夏', '广发', '平安', '恒丰', '浙商', '渤海']
            }],
            yAxis:[{
                type:'value',
                min:0,
                max:100,
                axisLabel:{
                    formatter:'{value} %'
                }
            }],
            series:[{
                name:'贷款利息收入',
                type:'bar',
                stack:'sum',
                itemStyle:{
                    normal:{
                        barBorderRadius:0,
                        label:{
                            show:true,
                            position:'inside',
                            formatter:'{c} %'
                        }
                    }
                },
                data:[58, 61, 60, 42, 56, 49]
            }, {
                name:'手续费及佣金净收入',
                type:'bar',
                stack:'sum',
                itemStyle:{
                    normal:{
                        //color:'rgba(193,35,43,0.5)',
                        barBorderRadius:0,
                        label:{
                            show:true,
                            position:'inside',
                            formatter:function(p){
                                return p.value > 0 ? (p.value + '%') : '';
                            }
                        }
                    }
                },
                data:[39, 19, 30, 33, 23, 15]
            }, {
                name:'非利息收入',
                type:'bar',
                stack:'sum',
                itemStyle:{
                    normal:{
                        barBorderRadius:0,
                        label:{
                            show:true,
                            position:'top',
                            formatter:'{c} %',
                            textStyle:{
                                color:'#E87C25'
                            }
                        }
                    }
                },
                data:[3, 20, 10, 25, 21, 36]
            }]
        };

chensjmail avatar Jun 25 '15 03:06 chensjmail

没,目前只能像你贴的那样自己计算百分比

pissang avatar Jun 25 '15 04:06 pissang