Skip to content

Stack - #132

Closed
Fil wants to merge 3 commits into
mainfrom
stack-2
Closed

Stack#132
Fil wants to merge 3 commits into
mainfrom
stack-2

Conversation

@Fil

@Fil Fil commented Feb 23, 2021

Copy link
Copy Markdown
Contributor
  • 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

Fil commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

Two more things to do:

@Fil Fil mentioned this pull request Mar 1, 2021
@Fil

Fil commented Mar 1, 2021

Copy link
Copy Markdown
Contributor Author

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