Skip to content

xAxis.axisTick. interval callback function miss last index #14929

@dixdiydiz

Description

@dixdiydiz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in EnglishstaleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions