Skip to content

Charts

genericChart

tsx
function genericChart({
  preset?: 'line' | 'line-fast' | 'bar' | 'bar-fast';
  options?: ChartOptions;
}): Chart;

A Charting component using the Chart.js library, to visualize data streams.

Parameters

OptionTypeDescriptionRequiredDefault
presetstringThe chart preset. Available presets are 'line', 'line-fast', 'bar', 'bar-fast'.'line'
optionsChartOptionsCustom Chart Options{}

Custom chart options can be passed as an object that is compatible with Chart.js's options (see online documentation), with 2 additional shorthand options xlabel and ylabel.

Example

js
TODO;

scatterPlot

tsx
function scatterPlot(dataset: Stream<number[][]>, labels: Stream<string[] | number[]>): ScatterPlot;

A scatter plot component using the scatterGL library.

Parameters

OptionTypeDescriptionRequired
datasetStream<number[][]>Stream of number arrays containing 2-dimensional data to be plotted
labelsStream<string[] | number[]>Stream of labels (either as strings or numbers) used to apply colors on data points