TinyBase logoTinyBase β

ChartSeriesProps

The ChartSeriesProps type describes the props that bind a chart series to Cell values in TinyBase data. An x Cell value can be a finite number, string, or boolean. A y Cell value must be a finite number.

{
  className?: string;
  xCellId: Id;
  yCellId: Id;
  label?: string;
  sortCellId?: Id;
  descending?: boolean;
  offset?: number;
  limit?: number;
}
TypeDescription
className?string

An optional string that will be added to the class attribute of the series' SVG group element.

xCellIdId

The Id of the Cell that provides each data point's x value. Finite numbers can be used as continuous x values in line series, while strings and booleans are used as category values. Boolean category labels are rendered as true and false.

yCellIdId

The Id of the Cell that provides each data point's y value. Only finite numbers are charted; rows with missing, non-numeric, or non-finite y values are ignored.

label?string

An optional label to use for the series in axis titles and tooltips, defaulting to the y Cell Id.

sortCellId?Id

The Id of the Cell used to sort the charted rows.

descending?boolean

Whether the charted rows should be sorted in descending order.

offset?number

The number of sorted rows to skip before charting.

limit?number

The maximum number of sorted rows to chart.

Since

v8.5.0