Apache ECharts xaxis 标签未完全显示

问题描述 投票:0回答:0

我正在使用 Apache Echarts for Angular 创建图表,但我无法查看所有 x 标签。 这是我所看到的图像。我需要第一个 xaxis 标签向左对齐,最后一个 xaxis 标签向右对齐(所以都可以看到),其余的在中间对齐。那可能吗? chart

这是我用于 xaxis - axisLabel 的代码,我留下了我尝试过的评论:

axisLabel: {
          show: true,
          interval: 1,
          inside: true,
          margin: -2,
          fontWeight: 700, 
          fontFamily: 'Lato',
          fontSize: 12,
          color: '#1B2431',
          align: 'center',
          // formatter: function (val, index){
          //   return this.time[index];
          // },
          // align: function(value, index) {
          //   return value == this.time[0] ? 'left' : 'center';
          // },
          // formatter: '{min|' + this.time[0] + '}, {max|' + this.time[this.time.length-1] + '}',
          // rich:{
          //   min: {
          //     align: 'left',
          //   },
          //   max: {
          //     align: 'right',
          //   }
          // },
          showMaxLabel: true
        }

谢谢!!

angular charts axis-labels apache-echarts
© www.soinside.com 2019 - 2024. All rights reserved.