echart常用基础柱状图

附图:
constructionBarOption = {
    title: {
        text: '价格(万元)',
        x: 15,
        y: 30,
        textStyle: {
            fontSize: '12',
            fontWeight: 'normal',
            color: '#999'
        }
    },
    tooltip: {
        trigger: 'item',
        padding: 10,
        axisPointer: { // 坐标轴指示器,坐标轴触发有效
            type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
        },
        formatter: '{b}<br/>{a}:{c}'
    },
    dataZoom: {          /*滚动条*/
        show: true,
        y: 300,
        realtime: true,
        start: 30,
        end: 60,
        height: 10,
        handleColor: '#1a8edc',
        handleSize: 5,
        fillerColor: '#a5cdea'
    },
    grid: {
        x: 45,
        x2: 40,
        y: 60,
        y2: 40,
        borderWidth: '1',   //边框线
        borderColor:'#E0EBFF'
    },
    xAxis: [{
        type: 'category',
        // name: '价格',
        nameTextStyle: {   //x轴标题
            color: '#999'
        },
        splitLine: false,
        axisLabel: {     //x轴文字
            textStyle: {
                color: '#999'
            }
        },
        axisTick: {   //刻度
            show: false
        },
        axisLine: {   //x轴线
            textStyle: {
                color: '#666'
            },
            lineStyle: {
                width: 2,
                color: '#76AFF4'
            }
        },
        data: ['工程造价费用', '分部分项目费用', '措施项目费用', '其他项目费用', '规费']
    }],
    yAxis: [{
        type: 'value',
        // name: '频率',
        nameTextStyle: {
            color: '#999'
        },
        splitLine: {
            lineStyle: {
                color: ['#E0EBFF'],
                width: 1
            }
        },
        axisLine: {
            lineStyle: {
                width: 2,
                color: '#76AFF4'
            }
        },
        axisLabel: {
            textStyle: {
                color: '#999'
            }
        },
        axisTick: {
            show: false
        }
    }],
    series: [{
        name: '价格',
        type: 'bar',
        itemStyle: {
            normal: {
                // barBorderRadius: [2, 2, 2, 2],
                barBorderColor: 'rgba(0,0,0,0)',
                areaStyle: {
                    type: 'default'
                },
                color: '#76AFF4'
            }
            // emphasis: {   //鼠标悬停时
            //     barBorderRadius: [2, 2, 2, 2]    //圆角
            // }
        },
        barWidth: 30,
        data: [3800,3000,1500,300,400]
    }]
};
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值