Echarts X-axis label label text and scale line are displayed in alignment, instead of being presented between two scale lines

As shown in the figure below, the X-axis label text Mon is located between the two tick marks:

 The desired effect is as shown in the figure below, with the label text Mon directly below the tick mark:

 Just add the alignWithLabel attribute of axisTick to xAxis and set the attribute value to true:

option = {
  xAxis: {
    type: 'category',
    axisTick: {
      alignWithLabel: true, // true:标签位于刻度线正下方;false:标签位于2个刻度线中间
    },
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  ......
};

Guess you like

Origin blog.csdn.net/u010234868/article/details/131476178
Recommended