Skip to content

Fixed the issue of Horizontal axis labels skipped despite available space. #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DhanarajRajendran
Copy link
Collaborator

@DhanarajRajendran DhanarajRajendran commented Jul 31, 2025

Bug Description

X-axis labels were inconsistently skipped during chart rendering, even when sufficient space was available. This led to a poor user experience, especially in scenarios where label readability was critical.

Bug Report : #241

Root Cause of the Issue

The static spacing factor used in the interval count calculation did not account for label rotation. As a result, the algorithm underestimated the number of labels that could be displayed, leading to unnecessary skipping.

Description of Change

The interval count calculation logic was updated to compute the spacing factor based on the label rotation angle. This ensures that the available space is utilized more effectively, and the correct number of intervals is generated for the X-axis.

Screenshots

Before:

image image

After:

image image

Test cases

  • Test the axis labels with different LabelRotation values.
  • Test using different options for LabelsIntersectAction on the axis.

@PaulAndersonS PaulAndersonS added bug Something isn't working and removed bug Something isn't working labels Jul 31, 2025
@PaulAndersonS PaulAndersonS added this to the v1.0.7 milestone Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants