Class DataSet

A DataSet is the root class of data that goes into the visualization. A data set consists of columns and rows. The columns correspond with the slots in the vizdef and the rows correspond with the actual data points (the result rows of a query).

Hierarchy

  • DataSet

Index

Properties

Accessors

Methods

Properties

cols

cols: Slot[]

Columns of the data set. Each column corresponds with a slot in the vizdef.

rows

rows: DataPoint[]

Data rows. Each row corresponds with a data point in the visualization.

slotMap

slotMap: Map<string, Slot>

Maps from name to slot. Can be used as an alternative to the cols array to retrieve a slot based on a name.

Accessors

hasSelections

  • get hasSelections(): boolean
  • If any of the data points in the data is selected, then this flag is set to true. If there are no selected data points, this flag is false.

    Returns boolean

Methods

Static filterRows

  • Filters an array of rows based on a column and a key.

    Parameters

    • _rows: DataPoint[]

      The rows to filter

    • _col: number

      The column number to filter on. Must be a categorical column.

    • _key: string

      The filter key.

    Returns DataPoint[]

    A subset of the rows.