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

Fix: if user provided y domain, don't modify it #181

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

Conversation

amitkumar
Copy link

@amitkumar amitkumar commented Jan 12, 2024

Description

  • Make isNice param to makeScale conditional, false if user y domain is defined.

Fixes # (issue)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added a unit test for transformInputData to verify that user-defined domain is preserved.

Copy link

vercel bot commented Jan 12, 2024

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 Jan 12, 2024 11:38pm

@zibs
Copy link
Contributor

zibs commented Feb 6, 2024

Hey @amitkumar -- do you mind adding some screenshots/description of what this change looks like, or updating/adding an example chart in the example app screens inside the repo? Thanks for the test too!

@derekpwu
Copy link

Just sharing some findings and our workaround:
We used a similar approach to ensure that the y-axises stay at the same place when switching between different graphs. It looks like if we adjust the padding and apply nicing, it changes the position of all the y-axis. This causes an UI issue in our use case, where the y-axis jumps to different spots when you switch between different graphs; on the other hand, completely removing nicing would resulted in missing top or bottom ticks in some cases due to losing the benefit of nicing. To workaround this, we apply nicing just before the padding adjustment. This appears to work, but not sure about other implications.
I believe the key aspect here might be the padding adjustment. Would it be possible to apply padding without domain adjustment?

Screen.Recording.2024-02-27.at.8.33.48.PM.mov

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.

None yet

3 participants