>》>》>》>》

echarts坐标轴小数转百分比

// 两个纵坐标
        yAxis: [
          {
            type: "value",
            axisTick: {
              show: false
            },
            axisLine: {
              lineStyle: {
                color: "rgba(228,231,237,1)",
              }
            },
            axisLabel: {
              color:"rgba(95,112,132,1)",
              fontSize:'12'
            },
          },
          {
            type: "value",
            // 坐标轴刻度线
            axisTick: {
              show: false
            },
            // 坐标轴线
            axisLine: {
              lineStyle: {
                color: "rgba(228,231,237,1)",
              }
            },
            // 坐标轴上的字
            axisLabel: {
              color:"rgba(95,112,132,1)",
              fontSize:'12',
              formatter: function(value){
                return (value*100).toFixed(2)+'%'
              }
            },
          }
        ],

效果:

 

posted @ 2020-07-07 14:06  大、锤  阅读(2428)  评论(0编辑  收藏  举报