echarts条纹进度条

在这里插入图片描述

drawmonthqualified(){
        this.monthqualified = echarts.init(document.getElementById('monthqualified'));
        this.monthqualified.setOption({
          grid: {
            top: "15%",
            left:"20%",
            right:'20%',
            bottom: "0%" //也可设置left和right设置距离来控制图表的大小
          },
          xAxis: {
              show: false,                //是否显示x轴
              type: 'value'
          },
          yAxis: {
              type: 'category',
              inverse:true,               //让y轴数据逆向
              axisLabel: {
                  show: true,
                  textStyle: {
                      color: '#666'       //y轴字体颜色
                  },
                  formatter: function(value, index) {
                      return [
                          '{title|' + value + '} '
                      ].join('\n');
                  },
                  //定义富文本标签
                  rich: {
                      title: {
                        color: '#fff',
                        fontSize:14
                      }
                  }
              },
              splitLine: {show: false},   //横向的线
              axisTick: {show: false},    //y轴的端点
              axisLine: {show: false},    //y轴的线
              data: ['合格率']
          },
          series: [
              {
                  name: '合格率',
                  type: 'bar',
                  itemStyle: {
                      normal: {
                          barBorderRadius: 16,
                          color: '#2DF290',
                      }
                  },
                  label: {
                      normal: {
                          show: true,
                          position: 'right',
                          color: '#2DF290',
                          fontSize: 14,
                      }
                  },
                  barWidth: 16,
                  data: [60]
              },
              {
                  // 分隔
                  type: 'pictorialBar',
                  symbolRotate: '-28',
                  itemStyle: {
                      normal: {
                          color: '#fff',
                          // color: 'rgba(1, 12, 38, 0.4)',
                      },
                  },
                  symbolRepeat: 'fixed',
                  symbolMargin: 6,
                  symbol: 'rect',
                  symbolClip: true,
                  symbolSize: [3, 15],
                  symbolPosition: 'start',
                  symbolOffset: [10, 0],
                  data: [60],
                  z: 66,
                  animationEasing: 'elasticOut',
              },
              {
                  name: '外框',
                  type: 'bar',
                  itemStyle: {
                      normal: {
                          barBorderRadius: 30,
                          color: 'rgba(255, 255, 255, 0.14)' //rgba设置透明度0.14
                      }
                  },
                  barGap: '-100%',
                  z: 0,
                  barWidth: 16,
                  data: [100]
              }
          ]
        },true)

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值