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'
  }
  }
}

]

 

posted @ 2017-01-09 12:13  大猫一只  阅读(6653)  评论(0编辑  收藏  举报