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

Support stacked position option in line layers #43

Closed
chnn opened this issue May 9, 2019 · 2 comments · Fixed by #119
Closed

Support stacked position option in line layers #43

chnn opened this issue May 9, 2019 · 2 comments · Fixed by #119

Comments

@chnn
Copy link
Contributor

chnn commented May 9, 2019

Similar to the position option in a histogram layer config, we should support a position option in line layer configs.

type LinePosition = 'overlaid' | 'stacked'

It should default to 'overlaid'.

The stacking logic should take place in a stat. We may have to refactor the collectLineData and simplifyLineData utils in the line layer to make this all work out.

@chnn
Copy link
Contributor Author

chnn commented Jun 12, 2019

I did some investigation.

  • We can either build the stacking transform ourselves, or use d3
  • d3 outputs data in a row-oriented format that will be a pain to integrate with our current PlotEnv / Table interfaces
  • There's a lot of fantastic parameters to a stacked line graph that encourage different visualization insights. I would love to expose some of these parameters in the line layer config

@TCL735
Copy link
Contributor

TCL735 commented Nov 22, 2019

Building our own stacking transform is the easiest way to go.

Separately, other challenges to consider:

  • shading each layer with its own color rather than the mixed color of the stacked layers
  • yScale and yDomain need to be updated appropriately
  • line hover tooltip has a separate column for the cumulative value at each layer

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

Successfully merging a pull request may close this issue.

4 participants