Skip to content

Stack #132

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

Closed
wants to merge 3 commits into from
Closed

Stack #132

wants to merge 3 commits into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Feb 23, 2021

  • Negative values always result in diverging stacking. (By contrast, in d3-shape an explicit diverging offset must be invoked.)
  • Offsets: expand and silhouette are similar to d3-shape, but taking into account negative values. wiggle…
  • Series can be grouped by z, fill, stroke, title…
  • The cumulative sum happens in a configurable ranking order; built-in orders are:
  • stacked lines with position=<top (default),center,bottom> or <right (default),center, left>
  • data transform ƒ
  • data order (will be passed up to the stackArea or stackLine mark)
  • x is location, y is value, z is series
  • export stack as the core transform, and stackX, stackY for convenience
  • stacking works as expected with faceting

See API documentation at https://observablehq.com/@data-workflows/plot-stack-options

Test plots:

  • caltrain stem & leaf
  • wiggle streamgraph (RIAA music industry US revenue)
  • police deaths
  • unemployment by industry

Supersedes #110
closes #109
closes #22
closes #113

- Negative values always result in diverging stacking. (By contrast, in d3-shape an explicit diverging offset must be invoked.)
- Offsets: expand and silhouette are similar to d3-shape, but taking into account negative values. wiggle…
- Series can be grouped by z, fill, stroke, title…
- The cumulative sum happens in a configurable ranking order; built-in orders are:
- stacked lines with position=<top (default),center,bottom> or <right (default),center, left>
- data transform ƒ
- data order (will be passed up to the stackArea or stackLine mark)
- x is location, y is value, z is series
- export stack as the core transform, and stackX, stackY for convenience
- stacking works as expected with faceting

See API documentation at https://observablehq.com/@data-workflows/plot-stack-options

Test plots:
- caltrain stem & leaf
- wiggle streamgraph (RIAA music industry US revenue)
- police deaths
- unemployment by industry
@Fil Fil requested a review from mbostock February 23, 2021 14:13
@Fil Fil mentioned this pull request Feb 23, 2021
@mbostock mbostock added this to the Friends Preview milestone Feb 24, 2021
@Fil
Copy link
Contributor Author

Fil commented Feb 25, 2021

Two more things to do:

@Fil Fil mentioned this pull request Mar 1, 2021
@Fil
Copy link
Contributor Author

Fil commented Mar 1, 2021

superseded by #177

@Fil Fil closed this Mar 1, 2021
@mbostock mbostock removed this from the Friends Preview milestone Mar 10, 2021
@Fil Fil deleted the stack-2 branch June 21, 2021 07:24
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.

Faceted stacks Diverging stack? Stacked charts: area, bars, histogram?
2 participants