echarts实现雷达图

在这里插入图片描述
共有6个分类模块,标准值是100。绿色区域是实际值展示的效果

echartsLd(){
      this.ldData = ['100.00', '80.79', '86.77', '98.08', '88.20', '80.10']
      const myChart9 = this.$echarts.init(this.$refs.chart10)
      let option = {
        tooltip: {
          trigger: 'axis'
        },
        radar: {
          name: {
            textStyle: {
              fontSize: 30,
              color: ['#d8bb93'],
              fontWeight: 900,
            }
          },
          splitNumber: 4,
          splitArea: {
            show: true,
            areaStyle: {
              color: ['rgba(120,120,120,0.1)', 'rgba(120,120,120,0.3)', 'rgba(120,120,120,0.1)', 'rgba(120,120,120,0.3)']
            }
          },
          splitLine: {
            lineStyle: {
              color: '#868584'
            }
          },
          axisLine: {
            lineStyle: {
              color: '#868584'
            }
          },
          indicator: [
            { name: '环境监测', max: 100 },
            { name: '低碳履约', max: 100 },
            { name: '能源消耗', max: 100 },
            { name: '依法合规', max: 100 },
            { name: '隐患治理', max: 100 },
            { name: '生态监测', max: 100 },
          ]
        },
        series: {
          type: 'radar',
          itemStyle: {
            color: '#31e586'
          },
          lineStyle: {
            color: '#31e586'
          },
          areaStyle: {
            color: '#31e586',
            opacity: 0.9
          },
          tooltip: {
            trigger: 'item'
          },
          data: [
            {
              value: this.ldData,
              name: '环境综合指数'
            }
          ]
        }
      };
      myChart9.setOption(option)
    },

猜你喜欢

转载自blog.csdn.net/qq_40576178/article/details/123634446