echart改变legend样式及分页

2020-12-18  本文已影响0人  小太阳可可

找了好多都是无用代码,终于在勤勤恳恳的百度下,终于找到你!
感谢博主的分享:
原文:https://www.cnblogs.com/benmumu/p/9378377.html

legend: {
  type: 'scroll',
  orient: 'horizontal',
  bottom:0,
  left:'center',
  itemGap: 0,
  itemWidth: 10,
  itemHeight: 10,
  textStyle:{
    color: '#11f7f7'
  },
  pageIconColor: '#6495ed', //翻页下一页的三角按钮颜色
  pageIconInactiveColor: '#aaa', //翻页(即翻页到头时)
  pageIconSize: 11, //翻页按钮大小
  pageFormatter: '',//隐藏翻页的数字
  pageButtonItemGap: -6,//翻页按钮的两个之间的间距
  formatter: function (name) {
    return echarts.format.truncateText(name, 6, '14px Microsoft Yahei', '…');
  },//隐藏legend文字的不显示
  tooltip: {
    show: true
  },//隐藏legend文字的不显示,开启true
  padding: [5, 0],
  data: ['A区域','B区域','C区域','D区域']
},
上一篇下一篇

猜你喜欢

热点阅读