Options
All
  • Public
  • Public/Protected
  • All
Menu

The stack transform computes a layout by stacking groups of values. The most common use case is to create stacked graphs, including stacked bar charts and stream graphs. This transform writes two properties to each datum, indicating the starting and ending stack values.

Hierarchy

Implemented by

Index

Methods

as

  • The output fields for the computed start and end stack values. The default is ["y0", "y1"].

    Parameters

    • start: string
    • end: string

    Returns StackBuilder

build

field

groupBy

  • An array of fields by which to partition the data into separate stacks.

    Parameters

    • Rest ...fields: string[]

    Returns StackBuilder

offset

  • The baseline offset. One of “zero” (default), “center”, or “normalize”. The “center” offset will center the stacks. The “normalize” offset will compute percentage values for each stack point, with output values in the range [0,1].

    Parameters

    Returns StackBuilder

sort