Skip to content
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

bugfix: resolve Y values being incorrectly transformed when xAxis LabelRotation Applied #504

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

MisterMur
Copy link

@MisterMur MisterMur commented Feb 15, 2025

Description

Relates to Issue#501
resolves Y values being incorrectly transformed when xAxis LabelRotation Applied.
Before the Y scale was being reduced to adjust for rotated label dimensions. this fix adjusts the output window only so the yscale doesnt get altered even when apply label rotation
had to reorder label to be calculated at begining of function ahead of modifcation to the outputwindow

Error Befor Fix:
the Y - value at the 200 tick - displays ~245yvalue when a 45 degree label rotation applied
rotatelabelerror-ezgif com-resize

After fix:
Y value at 200 tick - displays expected ~200 YValue even with 45 degree label rotation applied
rotatexlabelschart2-ezgif com-resize

no change in depedencies

Fixes # (issue)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This can be tested by adding labelRotate: {number} as property to the CartesianChart xAxis prop.
ensure the y Values line up with expected values on ticks on chart even with label rotation applied.

Checklist: (Feel free to delete this section upon completion)

  • I have included a changeset if this change will require a version change to one of the packages.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run yarn run check:code and all checks pass
  • I have created a changeset for new features, patches, or major changes
  • I have added tests that prove my fix is effective or that my feature works
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link

changeset-bot bot commented Feb 15, 2025

⚠️ No Changeset found

Latest commit: ef2ef0f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Feb 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
victory-native-xl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 9:42pm

@zibs
Copy link
Contributor

zibs commented Feb 19, 2025

Thanks @MisterMur! We'll take a look!

@zibs zibs requested a review from masiddee February 19, 2025 19:15
Copy link
Contributor

@masiddee masiddee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants