echarts的title和legend重合解决(各种小细节)

时间:2019-06-12
本文章向大家介绍echarts的title和legend重合解决(各种小细节),主要包括echarts的title和legend重合解决(各种小细节)使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

一:关于title与legend重叠

  1.重合样子

  

  2.解决办法:

    legend:{

      show: true,

      top:"6%",//与上方的距离 可百分比% 可像素px

    },

   3.解决后样子:

  


二:关于dataZoom数据区域缩放组件宽高调整

  1.原来样子:

    

  2.解决办法:

    dataZoom: [

      {
        height:"15px",//高度设置,另外还有宽度

        width:"100%",

      }]

  3.调整后:

    


三:关于显示数据到柱状图

  1.显示前:

    

  2.解决方法:  

    series : [
      {
        name: yTitle[i],
        type:echartsType[i],
        itemStyle:{
          normal:{
            label: {
              show: true,//是否在图上展示数据
              // position:'top',//数据在柱状图顶部显示
              textStyle:{
                color:'#000000' //数据颜色
              },
              formatter: '{c}' //显示百分比
             }
            },
     }],

  3.显示后

  


PS:都是一些小细节方面的东西,以后再遇到了就继续来添加。

原文地址:https://www.cnblogs.com/moutudou/p/11011247.html