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

Feature/grouped line charts #206

Conversation

alburdette619
Copy link
Collaborator

Adds the ability to group line charts together addressing #205. This uses the same data structure as grouping bar charts:

data: [
  { data: [], svg: {} },
  ...
]

I've confirmed that all lines display correctly and that all children can receive touch events.

Replicated the structure for grouped bar charts for stacked bar charts.  Also, seperated out the generation of extent, indexes, and series for stacked bar so they could be overriden for grouped data.
Added a Grouped story for StackedBarChart.  It seems like I'm doing something wrong here, generate enough areas, but some of them have `NaN` in the path data.
The stacked bar groups no longer extends the stacked bars because everything is now overriden.  The last issue I had was that the last group kept coming out with NaN in its path data.  This was due to the miscalculation of the Scale based on the indexes of the top level data as Stacked Bars does it.  Also, the indexes needed to be calculated off of the number of groups instead of the number of total bars.

Also removed any test code left in.
Added a story for horizontal groups of stacked bars.
Removed unnecessary comments and added one to give context to the grouped stack bars calcIndexes function.
Duplicated Chart but altered it to use the standard grouping data structure and implemented a line gate that produces a path for each line.  Also added a story for a grouped set of lines.
Remove commented out extranious imports.
@alburdette619
Copy link
Collaborator Author

Sorry, this depends on #204

@JesperLekland
Copy link
Owner

Thanks for another awesome contribution 🥇
This PR includes the StackedBarChartGroup which it should not.

@alburdette619
Copy link
Collaborator Author

alburdette619 commented Aug 13, 2018

Sorry, I'll take some time and cherrypick this and #208

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.

2 participants