Skip to content

Stats: adjust x-axis ticks based on available data points #3360

@tom2drum

Description

@tom2drum

Currently, we have a static (hard-coded) number of ticks on the x-axis for line charts. In rare cases, when the number of data points is less than the number of ticks, the chart displays multiple ticks with the same label. It would be better to adjust the minimum number of ticks based on the length of the data points array while keeping the maximum number of ticks unchanged.

Examples:
https://eth.blockscout.com/stats/accountsGrowth?interval=threeMonths&resolution=MONTH

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions