echarts 折线柱形上方显示自定义格式数据

series:[

  {
  name: '成单率',
  type: 'line',
  data: valueArr2,
  itemStyle: {
  normal: {
    label: {
      show:true,
      position: 'top',
      textStyle: {
      color: '#333'
    },
    formatter: function(params) {
      if(params.value){
        return params.value + '%' 
      }else{
        return '';
      }
    }
  },
  color:'#ee8b3f'
  }
  }
}

]

原文地址:https://www.cnblogs.com/biglion/p/6264801.html