美文网首页
echart柱状图或折线图顶端显示数值

echart柱状图或折线图顶端显示数值

作者: lesdom | 来源:发表于2019-12-09 17:56 被阅读0次

思路

直接在series中添加itemStylelabel

代码

series: [{  
    type : 'bar',   
    itemStyle: {
        normal: {
            label: {
                  show: true,
                  position: 'top',
                  textStyle: {
                    color: 'black'
              }
           }
        },
    },
    data : seriesDataArray
}]
series: [{  
    type : 'bar',   
    label: {
          normal: {
              show: true,
              position: 'top',
              textStyle: {
                color: 'white'
              }
          }
     },
    data : seriesDataArray
}]

网站导航

网站导航

相关文章

网友评论

      本文标题:echart柱状图或折线图顶端显示数值

      本文链接:https://www.haomeiwen.com/subject/hjligctx.html