0

I have 7 days x axis and I need to split it in two different weeks with interval. When I use method for interval it set interval before first bar only. Here is example

[option = {
  xAxis: [
    {
      type: 'category',
      data: ['Sat', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
      axisTick: {
        interval: (index, value) => {
          return ['Mon'].indexOf(value) >= 0;
        },
        inside: true,
        length: 500
      }
    }
  ],
  yAxis: {
    type: 'value',
    show: false
  },
  series: [
    {
      data: [120, 200, 150, 80, 70, 110, 130],
      type: 'bar'
    }
  ]
};]

https://codepen.io/Mykhailo-codepen/pen/gOKzYJj

How I need to write method to set interval before Monday only if Monday not the first day in x axis?

1 Answers1

0

This was a bug. It should be fixed already https://github.com/apache/echarts/issues/17967#issuecomment-1327987569