Skip to content

YAxis Tick Render Issues #245

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

Conversation

alburdette619
Copy link
Collaborator

@alburdette619 alburdette619 commented Oct 12, 2018

Fixed a few issues with the Y-Axis:

Provide ticks length to formatLabel - Allows users to know the number of ticks that result from d3. The y.ticks function isn't guaranteed to return the specified number of ticks. Without feedback, the user doesn't know how many ticks will be displayed.

Fix inconsistent tick re-render - Using an index for a key in RN is not advised, it does not provide a key that is maintainable and does not properly update each node. It's complicated but there are some very good write-ups on this. This lead to odd spacing despite y(value) returning proper values. The items simply weren't re-rendering.

More dynamic padding - The horizontal padding here adds on if the x value of the svg is set. Without this the text is cut off. I'm not sure this is the correct solution here but it works for my issues. Let me know if you have any advice on this. Reference #139

Copy link
Owner

@JesperLekland JesperLekland left a comment

Choose a reason for hiding this comment

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

Would love to merge this as well. Just remove the formatting diffs and we're good to go!

@alburdette619
Copy link
Collaborator Author

alburdette619 commented Dec 5, 2018

@JesperLekland I've seen this on quite a few of my PRs, it seems there is linting built into the library and I have mine run automatically on save. I can cut it off, but shouldn't it be applied, or is it somehow being applied incorrectly by me?

Edit: Maybe it's my Prettier extension... :/
Nope, had it disabled for the workspace. I think this is just the installed eslint rules.

@JesperLekland
Copy link
Owner

Hi Adam! As you might've noticed I haven't had that much time to maintain this library lately. I've invited you as a collaborator as you seem to have both the skill and interest to help make react-native-svg-charts the de facto chart library for RN. I would love for more people to get involved in this library and eventually growing into a full community.

Allows users to know the number of ticks that result from d3.  The y.ticks function isn't guarenteed to return the specified number of ticks.  Without feedback, the user doesn't know how many ticks will be displayed.
The horizontal padding here adds on if the x value of the svg is set.  Without this the text is cut off.
@alburdette619 alburdette619 force-pushed the feature/y-axis-tick-render-issues branch from ff4f931 to cb2eda6 Compare March 7, 2019 21:44
@alburdette619
Copy link
Collaborator Author

@lavisht22 @JesperLekland Sorry to not get to this sooner. I wish I also had more time to help out here. As is I'm able to spend some time as I need it for work. More incoming 😄

@alburdette619
Copy link
Collaborator Author

Ugh, looks like we've been bitten by the Android license signing stuff...

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