首页 > 技术文章 > Echarts中X轴坐标太密集,分段显示

heyiping 2020-11-12 11:42 原文

在axisLabel中设置刻度间隔interval,再加上强制显示最大值showMaxLabel和最小值showMinLabel

axisLabel: {//X轴文字
      interval: day == 7 ? 0 : 3,
      showMinLabel: true,
      showMaxLabel: true,
      show: true,
      textStyle: {
      color: "rgba(255,255,255,.6)",
      fontSize: '12',
     },
   },

 

推荐阅读