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

Add a prop to HTML Axis components to use pixels and not percentages #199

Open
mhkeller opened this issue May 17, 2024 · 1 comment
Open
Labels
enhancement New feature or request example-related

Comments

@mhkeller
Copy link
Owner

Currently, the Axis components use percentages so they can be used in server-side charts. But you may want to use them also in normal charts that don't use percentRange if, for example, you want an easy to way to make a multi-line label in HTML.

All you have to do is change % to px and we could expose this a prop to make it easy for people.

@mhkeller mhkeller added enhancement New feature or request example-related labels May 17, 2024
@mhkeller
Copy link
Owner Author

mhkeller commented May 17, 2024

This could also be done dynamically looking at the percentRange prop at first:

export let units = $percentRange === true ? '%' : 'px';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request example-related
Projects
None yet
Development

No branches or pull requests

1 participant