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

X / Y axis center #138

Open
si-harps opened this issue Sep 27, 2018 · 2 comments
Open

X / Y axis center #138

si-harps opened this issue Sep 27, 2018 · 2 comments
Labels

Comments

@si-harps
Copy link

si-harps commented Sep 27, 2018

Hi, I was wondering if there is a quick way to position the X/Y Axis in the center of the graph (or in different positions based on dynamic median)?

This is essentially what i am trying to achieve...

screen shot 2018-09-27 at 10 45 52

@williaster
Copy link
Owner

Hey @si-harps, thanks for checking out @data-ui. This isn't currently supported, but it's a great suggestion!

I think it wouldn't be too hard to implement, I think we'd just need to update the Axis components to take some type of offset prop, specifying the value of the other axis to place it at (e.g., in your example, <YAxis xIntersection={7500} />. I'd welcome a PR for this, else will add it to the list and will try to tackle it with a offset bug fix sometime this week.

@si-harps
Copy link
Author

Hi @williaster, thanks for the quick reply. I'll take a look at this today. Adding an xIntersection/yIntersection prop sounds like a great idea. Will get back to you asap

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

No branches or pull requests

2 participants