echarts 进度压力球

在这里插入图片描述

const dataArr = [{
  value: 80,
  name: '压力正常指数'
}];
const rich = {
  bule: {
    fontSize: 20,
    fontFamily: 'PangMenZhengDao-Regular, PangMenZhengDao',
    color: '#fff',
  },
  white: {
    fontSize: 15,
    fontFamily: 'PangMenZhengDao-Regular, PangMenZhengDao',
    color: '#fff',
  },
}
const meterOption2 = ref({
  series: [
    {
      type: 'gauge',
      name: '最外层圆环',
      radius: '85%',
      startAngle: '360',
      endAngle: '0',
      min: 0,
      max: 100,
      pointer: {
          show: false,
      },
      detail: {
          show: false,
      },
      data: [
          {
            value: 1,
          },
      ],
      axisLine: {
          show: true,
          lineStyle: {
              color: [[1, '#00FFFF']],
              width: 2,
              opacity: 1,
          },
      },
      axisTick: {
          show: false,
      },
      splitLine: {
          show: false,
          length: -44,
          lineStyle: {
              color: '#051932',
              width: 0,
              type: 'solid',
          },
      },
      axisLabel: {
          show: false,
      },
    },
    {//渐层色圆环
      type: 'gauge',
      radius: '78%',
      progress: {
          show: true,
          width: 6,
      },
      itemStyle: {
        color: new echarts.graphic.LinearGradient(0,0,1,0,[
          {
            offset: 0,
            color: "rgba(255, 168, 141, 0.3)",
          },
          {
            offset: 0.25,
            color: "rgba(243, 178, 11, 0.9)",
          },
          {
            offset: 0.5,
            color: "rgba(243, 65, 10, 0.9)",
          },
          {
            offset: 0.75,
            color: "rgba(68, 139, 255, 0.9)",
          },
          {
            offset: 1,
            color: "rgba(68, 139, 255, 0.9)",
          },
        ],false),
      },
      pointer: {
        show: false,
      },
      axisLine: {
        show: false,
        lineStyle: {
           width: 6,
        },
      },
      axisTick: {
        show: false,
      },
      splitLine: {
        show: true,
        length: 2,
        // distance: -15,
        lineStyle: {
           width: 2,
           color: 'rgba(75, 114, 229, 0.5)',
        },
      },
      axisLabel: {
          show: false,
      },
      anchor: {
        show: false,
        showAbove: true,
        size: 15,
        itemStyle: {
          borderWidth: 5,
        },
      },
      title: {
        show: true,
        offsetCenter: [0, '100%'],
        textStyle: {
          fontSize: 14,
          color: '#fff',
        },
      },
      detail: {
          formatter: function(value:any) {
            return '{bule|' + value + '}{white|%}';
          },
          rich: rich,
          // valueAnimation: true,
          offsetCenter: [0, '2%'],
      },
      data: dataArr
    },
    {
      //内圆
      type: 'pie',
      radius: '56%',
      center: ['50%', '50%'],
      z: 1,
      animation:false,
      itemStyle: {
        normal: {
          color: new echarts.graphic.RadialGradient(0.5,0.5,0.8,[
            {
                offset: 0,
                color: '#4978EC',
            },
            {
                offset: 0.5,
                color: '#1E2B57',
            },
            {
                offset: 1,
                color: '#141F3D',
            },
          ],false),
          label: {
              show: false,
          },
          labelLine: {
              show: false,
          },
        },
      },
      hoverAnimation: false,
      label: {
          show: false,
      },
      tooltip: {
          show: false,
      },
      data: [100],
    },
  ]
});
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值