Echarts雷达图自定义样式

效果图:

setLeiDaChart(){
        let myChart = this.$echarts.init(document.getElementById('andonType'));

      let  option = {
          radar: [{
            // 雷达维度
            indicator: [{
              text: '运输单位'
            },
              {
                text: '销售单位'
              },
              {
                text: '使用单位'
              },
              {
                text: '生产单位'
              },
              {
                text: '处置单位'
              },
              {
                text: '储存单位'
              }
            ],
            center: ['50%', '50%'], // 位置
            radius: 100, //大小
            startAngle: 90,
            splitNumber: 4,
            shape: 'rect', // 雷达样式图
            name: {
              formatter: '{value}',
              textStyle: {
                fontSize:16,
                color: '#B8CBF7' // 文字颜色
              }
            },
            splitArea: {
              areaStyle: {
                color: [], //圆环颜色
                shadowColor: 'rgba(31,37,82,1)', // 圆颜色
                shadowBlur: 10
              }
            },
            axisLine: {   // 坐标轴线
              lineStyle: {
                width : 1,
                color: '#1F2552'// // 图表背景网格线的颜色
              }
            },
            splitLine: { //     // 网格线
              lineStyle: {
                width : 1,
                color: '#1F2552'
              }
            }
          }],
        series: [{
          name: '雷达图',
          type: 'radar',
          itemStyle: {
            emphasis: {
              color: '#2FC25B',
              lineStyle: {
                width: 4
              }
            }
          },
          data: [{
            value: [5678, 3678, -6781, 1678, 1780, 3671],
            areaStyle: {
              normal: {
                color: '#0F5CB0' // 选择区域颜色
              }
            },
            lineStyle: {
              color: '#2FC25B', // 雷达构成的区域边框
            }
          }]
        }]
        }

// 为echarts对象加载数据
        myChart.setOption(option);
      }

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值