Echarts histogram value, the value of the x-axis, displayed as a percentage of the value tooltip

var option = {
      tooltip: {
            trigger: 'axis',
            formatter:'{c}%',
            axisPointer: {
                type: 'shadow'
            }
       },
       xAxis: {
             type: 'value',
             axisLabel: {//文字样式
                 formatter: '{value}%'
             }
       },
        yAxis: {
              type: 'category',
              data: yData,
         },
        series: [
               {
                    name: '',
                    type: 'bar',
                    data: xData,
                     label: {
                         formatter: '{c}%'
                     }
                }
        ]
 };
Published 259 original articles · won praise 21 · views 50000 +

Guess you like

Origin blog.csdn.net/wsln_123456/article/details/104036247