echarts xAxis.axisTick. interval callback function miss last index

3wabscal  于 2022-10-26  发布在  Echarts
关注(0)|答案(2)|浏览(225)

Version

5.1.1

Steps to reproduce

critical code:

option = {
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        axisTick: {
            show: true,
            length: 40,
            interval: i => console.log(i),  // will console 0,1,2,3,4,5,6 .but not 7
            lineStyle: {
                color: 'red',
              type: 'dashed',
            },
          }
    }
}

interval callback function ignore last index, so i can not control that position axisTick.

What is expected?

the first param of xAxis.axisTick. interval callback function call from 0 to last index

What is actually happening?

the first param of xAxis.axisTick. interval callback function call from 0 to last but one index

rqdpfwrv

rqdpfwrv1#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it containsa minimum reproducible demoand necessaryimagesto illustrate. Otherwise, our committers will ask you to do so.

  • A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list .

Have a nice day! 🍵

z0qdvdin

z0qdvdin2#

0 - 6 are the all indices of 7 length array.

相关问题