echarts柱状图

option = {
        xAxis: {
            type: 'value', //数值轴
            axisLabel: {
                show: false,
                color: "#69cde2",
                formatter: function(value, index){
                    return value;
                }
            },
            splitLine: {
                show: false,
                lineStyle: {
                    color: ["#1d3b5a"]
                }
            },
            axisLine: {
                show: false,
                lineStyle: { color: "#69cde2" }
            },
            axisTick: {
                show: false,
                lineStyle: {
                    type: 'solid',
                    width: 3
                },
                length: 2
            }
        },
        yAxis: {
            type: 'category',//'category' 类目轴,适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。
            // boundaryGap: ['20%', '20%'],
            data: ['读特','读创','@深圳','深圳ZAKER','深圳网易'],
            axisLabel: { //坐标轴刻度标签的相关设置
                color: "#69cde2",
                fontSize:16
            },
            axisLine: { //坐标轴轴线相关设置
                lineStyle: { color: "#69cde2"}
            },
            axisTick: { //坐标轴刻度相关设置
                show: false,
                lineStyle: {
                    type: 'solid',
                    width: 3
                },
                length: 2
            }
        },
        series: [
            {
                name: '合格率',
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'left',//标签的位置
                        distance: -750,
                        color: '#fff',
                        fontSize: 16,
                        // formatter: '{c}'
                    }
                },
                barWidth: '50%',
                itemStyle: {
                    normal: {
                        barBorderRadius: [0,30,30,0],
                        // color: '#0599c8',
                        color: new echarts.graphic.LinearGradient(
                            0, 0, 0, 1, [{
                                    offset: 0,
                                    color: '#00feff'
                                },
                                {
                                    offset: 0.5,
                                    color: '#027eff'
                                },
                                {
                                    offset: 1,
                                    color: '#0286ff'
                                }
                            ]
                        )
                    }
                },
                data: khdfwArry,
                zlevel: 11

            },
            {
                name: '背景',
                type: 'bar',
                barWidth: '50%',
                barGap: '-100%',
                data: [10000, 10000, 10000, 10000, 10000],
                itemStyle: {
                    normal: {
                        barBorderRadius: [0,30,30,0],
                        color: '#0d121a'
                    }
                },
                zlevel: 9
            },

        ]
    };

这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值