EChars 图表——并列柱状图

效果如下:
在这里插入图片描述
实现代码如下:

option = {
    legend: {//标注位置
    orient: 'vertical',
        x: 'right',
        y:'center'
    },
    tooltip: {},//提示线
    dataset: {//数据设置
        source: [
            ['product', '2018Q3', '2018Q4'],
            ['总资产',1573, 1607],
            ['净资产', 324, 354],
            ['核心资产', 338, 348],
        ]
    },
    xAxis: {//X轴的设置
    type: 'category',//不连续的字符串
         axisLine: {// X轴样式设置
                    lineStyle: {
                        type: 'solid',
                        color: '#708090',//线的颜色
                        width:'1'//坐标线的宽度
                    }
                },
    },
    yAxis: {//Y轴的设置
        show:false
    },
    series: [//每个形状的设置
        {type: 'bar',//柱状
        barWidth:'50px',// 每簇之间的距离
        color:'#6495ED',//柱状的颜色
        label: {//提示的设置
                normal: {
                    show: true,
                    position: 'top'
                }
            },
           
        },
        {type: 'bar',
            color:'#CD5C5C',
            barWidth:'50px',
            barGap:'0%',//每簇中的每个柱状的距离 String形式
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
        }
        
    ]
};
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值