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

Allow for both vertical and horizontal bar charts on a single ComposableChart #2886

Open
1 task done
dsldsl opened this issue Jun 25, 2022 · 1 comment
Open
1 task done
Labels
enhancement Enhancement to a current API feature request Issues that are feature requests P2 Feature requests or future priority issues

Comments

@dsldsl
Copy link

dsldsl commented Jun 25, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

I would like to use both horizontal and vertical bar lines on the same ComposableChart, to allow for more advanced charts with multifaceted data. In my use case I would like to have a scatter plot on a chart with some additional bars on the bottom and on the left.

Here is a screenshot of my desired graph: https://prnt.sc/kwBBpV7lqWS-

image

What does the proposed API look like?

Here is a sandbox of what I think a resultant API would look like: https://codesandbox.io/s/multi-axis-bar-graph-fevxvu?file=/src/index.js

The goal for that sandbox would be to have the same 3 up-down bars, and additionally have a set of left-right bars in orange.

image

If this is something that is doable with the current codebase without too much of a massive refactoring, then I'd be happy to take a look through the relevant code and propose a PR (with a bit of guidance for where to look and what changes might need to be made). Or, if you have suggestions on how it might be implemented in the current framework that would be much appreciated as well.

Thank you so much for everything you do!

@ckifer ckifer added enhancement Enhancement to a current API feature request Issues that are feature requests P2 Feature requests or future priority issues labels Jan 4, 2023
@ckifer
Copy link
Member

ckifer commented Jan 4, 2023

Hey @dsldsl

Labeling this as a feature request. I don't know in depth any internals of the ComposedChart but I would imagine this kind of feature would be a decent lift.

Feel free to dig and attempt a solution! It looks like from your sandbox that ComposedChart uses the layout prop from the parent chart and not from the Bar itself :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to a current API feature request Issues that are feature requests P2 Feature requests or future priority issues
Projects
None yet
Development

No branches or pull requests

2 participants