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

Chart Rotation and Custom Axis Domain #2207

Open
Tracked by #2320
godsamit opened this issue Oct 18, 2023 · 1 comment
Open
Tracked by #2320

Chart Rotation and Custom Axis Domain #2207

godsamit opened this issue Oct 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@godsamit
Copy link

godsamit commented Oct 18, 2023

I'm baffled by the interaction between chart rotation and custom axis domain. I understand that xDomain is global and needs to be set in Settings, while y domain can be directly set in the Axis component.

Imagine I have a normal xy-chart but now I want to flip it 90 degrees. If I do it by the rotation prop in Settings, the domain I set on y axis will stop working, because elastic chart will interpret it as xDomain, and demand me to put it in Settings instead. I'd assume the rotation would only affect presentation, not the internal charting logic.

This wouldn't be as much of a problem if domain on Axis and xDomain on Settings are the same type. But they are not. So things like fit, padding wouldn't work on xDomain.

What's more, I can't really "rotate" by switching x/y accessors and flip the axes, since elastic charts enforce that y values to be numeric.

@godsamit godsamit added the bug Something isn't working label Oct 18, 2023
@nickofthyme
Copy link
Collaborator

Sorry for the delayed response...

Yes, these are great points and perfectly valid criticisms of the API. I have run into the same issues myself. Ideally the Axis is independent of the rotation. This behavior has existed for some time now, and has become unprioritized tech debt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants