小程序--雷达图显示刻度

2022/1/14 12:33:25

本文主要是介绍小程序--雷达图显示刻度,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

雷达图显示刻度
在这里插入图片描述

let indicatorData = app.globalData.chartsData.indicatorData;
//添加axisLabel:{show:true} 或者 axisLabel:{show:false} 可以控制在那条线轴上显示刻度
for (var i=0; i < indicatorData.length;i++) {
      if(i==0){
        indicatorData[i].axisLabel = {
          "show":true
        }
      }else{
        indicatorData[i].axisLabel = {
          "show":false
        }
      }
    }
var option = {
      backgroundColor: "#ffffff",
      // 图表的位置
      grid: {
        position: 'center',
      },
      tooltip: {
        confine: true,  //设置是否将tooltip框限制在图表的区域内
				enterable: true,  //设置鼠标是否可以移动到tooltip区域内
      },
      legend: {
          bottom: 0,
          data: ['沟通技能','社交技能','思考技能','研究技能','自我管理']
      },
      radar: {
        // shape: 'circle',
        name: {
          textStyle: {
              color: '#000'
          }
        },
        //刻度的相关设置
        axisLabel: {
          show: true,
          color:'#ccc',
          //showMinLabel: false
        },
        indicator: app.globalData.chartsData.indicatorData,
      },
      series: [{
        name: '五大技能',
        type: 'radar',
        data: app.globalData.chartsData.seriesData,
      }]
    };


这篇关于小程序--雷达图显示刻度的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程