-
Notifications
You must be signed in to change notification settings - Fork 30
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
Grouped bars #59
Grouped bars #59
Conversation
Wow! I wasn't expecting to get a PR for anything like this. I think it looks great, however, my big concern with this is the input format of the data series. This format...
...seems like an unlikely way to find data organized for charting. In particular, it provides no indication that there are 3 separate "series" here. I think there are some larger architectural issues around multi-dimensional data that need I need to think through before we tackle these chart types further. |
👍 agreed. My first attempt tried to do something multi-dimensional but that got way too messy since the structure doesn't exist yet. Had an urge to try anyway though... |
Thought about this while I was rowing. Here's what I'm thinking: Broadly, at a logical level, I don't want to make leather overly-generic. I want it really tightly focused on the 80% of use-cases that everyone has. To that end, I think we do this:
This is a pretty complicated thing to map out entirely in my head, so I'm probably missing things, but how does that sound? |
Sounds good! Definitely helps establish a tighter structure, I was originally trying to be clever/generic by allowing some sort of I'm only wrestling a bit with the third point. My gut doesn't want it to be a limitation but the use cases may fall in the 20% leather won't cover. I'm also not 100% familiar with the codebase yet so I may be missing an absolute block on allowing a |
Yeah nested Series was my first inclination too, but even if we could make it work technically it really makes the APIs a lot harder for basic cases, I think. Regarding the layering, if there is a way to make it work, I'm not against it or anything. The big blocker I foresee is how the Legend would render if you have both Series and "groups" that need to be labelled. Unless you can think of an elegant solution I'm inclined to implement the easy case and then see if we can work backwards to the harder one. One more thing to keep in mind: this should work with Lattice too. (Grids of stacked columns seem useful!) However the legend rendering may be funny in that case too. (We probably don't want n legends.) Of course, we don't have to solve all of these things at once. Like you said, let's put down a foundation. That may cause more general solutions to present themselves. |
👍 will try it out soon |
moved to #70 |
Quick attempt at grouped bars. It currently manually sets an Ordinal scale which isn't great. Let me know what you think/what I should change (and if you have suggestions for the scale). Adding tests soon.
Should be able to do stacked bars and grouped/stacked columns after this gets set.