ecarts进度条(横向柱状图)

 drawCharts3_2() {
      this.myChart3.setOption({
        title: {
           left:"2%", 
            top:"3%", 
          text: "{img|}充电站充电次数TOP5",
          textStyle: {
            fontSize:15,
            color: "#ffffff",
            rich: {
              img: {
                height: 20,
                backgroundColor: { image: "../../../static/echartTitle.jpg" },
              },
            },
          },
        },
        tooltip: {},
        color: ["#F4CC10"],
        legend: {
            textStyle: {
            color: "#ffffff",
          },
          right: "10%",
           top:"2%", 
          data: ["次数"],
        },
        xAxis: {
          axisTick: {
        show: false
        },
         axisLine: {
              //表示坐标轴是否显示
              show: false,
            },
          splitLine:{show: false},
          axisLabel: {
            show: false,
            color: "#ffffff",
            rotate: 0,
          },
          color: "#2AEEFF",
        },
        yAxis: {
          axisTick: {
        show: false
        },
         axisLine: {
              //表示坐标轴是否显示
              show: false,
            },
          data: this.chart3data1,
            inverse: true, //使y轴翻转
          axisLabel: {
            show: true,
            color: "#ffffff",
            padding:[-40,-100,0,50]
          },
        },
  
   
        series: [
   
          {
            name: "充电次数",
            type: "bar",
           data: this.chart3data3,
            barWidth: "30%",
            itemStyle: {
              //柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
              normal: {
                color: "#5fabff",
                //柱形图圆角,初始化效果
                barBorderRadius: [100, 100, 100, 100],
              },
            },
          },
           {
                  name: '充电次数',
                  type: 'bar',
                  barGap: '-100%',//不同系列的柱间距离,为百分比。
                  // 在同一坐标系上,此属性会被多个 'bar' 系列共享。
                  // 此属性应设置于此坐标系中最后一个 'bar' 系列上才会生效,
                   //并且是对此坐标系中所有 'bar' 系列生效。
                  barWidth: "30%",
                  //data: this.chart3data2,
                   data: [this.cishu,this.cishu,this.cishu,this.cishu,this.cishu],
                  // data: this.chart3data2,
                  color: '#151B87',//柱条颜色
                  itemStyle: {
                    normal: {
                      barBorderRadius: 10
                    }
                  },
                  
              //      label: {
              // show: true,
              // color:'#ffffff',//标签的颜色          
              //  position: 'right',    
              // },
                  
        },

       
        ],
        grid: {
          //设置网格属性
          left: "10%", //网格距离容器左侧的距离
          right: "10%", //网格距离容器右侧的距离
           top:"20%",
          borderWidth: 1,
        },
      });
           window.addEventListener("resize", () => { 
        
   
    //this.myChart2.resize();  
  
    this.myChart3_2.resize();
   
});
    },

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值