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

Grouped bars 2 #70

Closed
wants to merge 15 commits into from
Closed

Grouped bars 2 #70

wants to merge 15 commits into from

Conversation

nbedi
Copy link
Member

@nbedi nbedi commented Jun 9, 2016

closes #26

New work in progress:

screen shot 2016-06-09 at 2 05 17 pm

Current implementation works but a bit rough. Figuring out whether there is a better way to handle colors, legends and scales. Let me know if you have any thoughts/suggestions.

@nbedi nbedi mentioned this pull request Jun 9, 2016
@nbedi
Copy link
Member Author

nbedi commented Jun 10, 2016

Changes I'm not 100% sure about:

  • Changed the ordinal scale to filter domain to unique values. The way it currently handles duplicates is not ideal since it will project values to the first instance of the value but generate a scale according to the count of all values including duplicates. Could also be fixed by changing the calculation of segments instead.
  • Created a new base class for shapes generated by a CategorySeries. This is mostly to handle legends separately but also anything else that may come up. Feels weird creating a separate base class but maybe necessary and more explicit.
  • CategoryShapes accept sequences as fill color. Need to add support for style_function input.
  • Added a z axis, scale and type to Chart, and CategoryShapes have a legend_dimension property. This is to do a kind of merge between the category dimension and the 'sub-category' dimension (Y in the GroupedBars case, X in GroupedColumns). Category axes and scales replace the axes and scales in the legend_dimension and legends are created for the data in the legend_dimension.

That last point is probably the funkiest conceptual change I have to think about more.

@onyxfish
Copy link
Collaborator

I think this is super close. The ordinal stuff itches a little. I'll try to take a closer look this week.

@nbedi
Copy link
Member Author

nbedi commented Jun 13, 2016

Sounds good, I agree about ordinal stuff, also some color stuff I need to fix up. I'll add some adjustments in the next few days.

@nbedi
Copy link
Member Author

nbedi commented Jun 16, 2016

Happier with the code now but I'm not sure what to do about the ordinal scale's duplicate value handling.

@nbedi
Copy link
Member Author

nbedi commented Jun 16, 2016

Added GroupedColumns to make sure this set up would actually work well with different shapes/dimensions. It was pretty easy 👍. img link

@jpmckinney jpmckinney mentioned this pull request Oct 23, 2023
@jpmckinney jpmckinney closed this Oct 23, 2023
@jpmckinney
Copy link
Member

Closing as stale PR.

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

Successfully merging this pull request may close these issues.

Grouped bars
3 participants