Skip to content

XAxis ticks not spaced evenly #4271

@TaoshiKen

Description

@TaoshiKen
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

See Example. I would expect when the xAxis is set to type='number' that it would display ticks just like when the yAxis is set to type number. It distributes ticks evenly without respect to where data is clumped or sparse. I have tried everything to figure this out.

What is expected?

Evenly spaced ticks just like the yAxis

What is actually happening?

Unevenly spaced ticks, seemingly based upon where the data is. Its like the type='number' has no impact

Environment Info
Recharts v2.12.2
React 18
System macOS, Sonoma 14.2.1
Browser Vivaldi 6.5.3206.59

Setting the interval to "equidistantStartEnd" does not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugGeneral bug labeldocs neededIssues that require documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions