Components Interactions Examples Tutorials API FAQ
Options
Menu

Module Stacking

Index

Type aliases

GenericStackingResult

GenericStackingResult: Map<Dataset, Map<D, StackedDatum>>

StackedDatum

StackedDatum: object

Type declaration

  • offset: number
  • value: number

StackingResult

StackingResult: GenericStackingResult

Map of Dataset to stacks.

deprecated

Functions

normalizeKey

  • normalizeKey(key: any): string
  • Normalizes a key used for stacking

    Parameters

    • key: any

      The key to be normalized

    Returns string

    The stringified key

stack

  • Computes the StackingResult (value and offset) for each data point in each Dataset.

    Parameters

    • datasets: Dataset[]

      The Datasets to be stacked on top of each other in the order of stacking

    • keyAccessor: Accessor<any>

      Accessor for the key of the data

    • valueAccessor: Accessor<number>

      Accessor for the value of the data

    Returns StackingResult

    value and offset for each datapoint in each Dataset

stackedExtent

  • Computes the total extent over all data points in all Datasets, taking stacking into consideration.

    Parameters

    • stackingResult: StackingResult

      The value and offset information for each datapoint in each dataset

    • keyAccessor: Accessor<any>

      Accessor for the key of the data existent in the stackingResult

    • filter: Accessor<boolean>

      A filter for data to be considered when computing the total extent

    Returns number[]

    The total extent

stackedExtents

  • Computes the maximum and minimum extents of each stack individually.

    Type parameters

    • D

    Parameters

    • stackingResult: GenericStackingResult

      The value and offset information for each datapoint in each dataset

    Returns object

    } The maximum and minimum extents of each individual stack.

    • maximumExtents: Map<D, number>
    • minimumExtents: Map<D, number>

Generated using TypeDoc