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

Update axis tick labels to accomodate small ranges #2522

Closed

Conversation

ada-x64
Copy link
Contributor

@ada-x64 ada-x64 commented Feb 2, 2024

This PR updates d3fc chart axis tick values to accommodate ranges with small differences. It does so by calculating a precision based on the tick range's number of leading zeros. This is done with log10, but could probably be done with string manipulation as well.

@texodus texodus changed the title update axis tick labels to accomodate small ranges Update axis tick labels to accomodate small ranges Feb 15, 2024
@texodus
Copy link
Member

texodus commented Feb 15, 2024

Before:

Screenshot 2024-02-15 at 8 09 17 AM

After:

Screenshot 2024-02-15 at 8 09 04 AM

@texodus
Copy link
Member

texodus commented Feb 15, 2024

This PR does not fix #1610, but it does help address the underlying use case.

@texodus texodus added the enhancement Feature requests or improvements label Feb 15, 2024
@texodus
Copy link
Member

texodus commented Feb 15, 2024

Closing for #2534

@texodus texodus closed this Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants