API reference

Chart kinds

The 27 chart kinds, their labels and their key settings.

Generated from CHART_KINDS, in menu order. Settings are the fields of each kind’s settings type (for example HistogramPanelChartSettings), passed to charts.add(kind, { settings }) and charts.update. Column fields hold column names; most start empty, and the chart reports 'empty' until they are set.

All kinds

KindSettingsNotes
multiband
Multi-band
series, layout, lineWidth, xAxisLine, yAxisLine, gridLine, beacon, addColumn, envelopeStacked bands against the worksheet X key, each series with its own Y scale. Manage series with charts.addSeries and friends. Linked zoom, live scrolling, out-of-core data. A live chart follows the newest sample (the wheel resizes the window); with datasets shown or beacon on, its X axis stays put and the wheel zooms freely. beacon: { enabled, reference: "dataset" | "previous" | "none", datasetId, datasetColor, previousColor } shows one live cycle at a time (X starting over) against reference data.
xyscatter
X-Y scatter
xyXCol, xyYCol, xyColorCol, xyFit, xyXScale, xyYScale, xyPointRadius, xyColor, xyDrawMode, xyLineWidth, xyXAxisLine, xyYAxisLine, xyGridLineTwo columns against each other, optionally coloured by a third, with a polynomial fit of degree 1 to 3. xyDrawMode 'points', 'lines' (a line through the points in order) or 'both', with xyLineWidth in px. Each scale carries an optional alarm line.
xyzmesh
X-Y-Z mesh
xyzXCol, xyzYCol, xyzZCol, xyzViewMode, showMesh, meshStyle, meshOpacity, xyzXScale, xyzYScale, xyzZScale, xyzPointRadius, xyzMode, xyzColumns3-D points with an optional Delaunay surface (showMesh, meshStyle 'filled', 'wireframe' or 'both', meshOpacity 0 to 1). xyzMode 'matrix' draws a surface over a uniform grid instead: rows along X, the xyzColumns along Y, each value a height. view.autoscale() re-fits the camera.
histogram
Histogram
histColumn, histBins, histNormal, histLogY, histColor, histAlarmhistBins 0 picks the bin count automatically; histNormal overlays a normal curve. histAlarm (an AlarmLine, or null) draws a vertical line at a value.
polar
Polar
polarAngleCol, polarRadiusCol, polarMode, polarRadiusMin, polarRadiusMax, polarColorpolarMode 'waveform' or 'rose'. Radius limits are strings; '' is automatic.
spectrum
Spectrum
specSignalCol, specTimeCol, specSampleRate, specXMode, specYMode, specWindow, specLogX, specColor, specAlarmFFT of one signal. A specTimeCol sets the sample rate from that column (samples over the time span); with '' it comes from specSampleRate (Hz, as a string). specXMode 'hz' or 'order'. specAlarm (an AlarmLine, or null) draws a horizontal line at an amplitude.
boxplot
Box Plot
boxValueCol, boxGroupCol, boxWhiskers, boxColor, boxAlarmOne box per group ('' groups by dataset). Whiskers '1.5iqr' or 'minmax'. boxAlarm (an AlarmLine, or null) draws a line across the value axis.
spectrogram
Spectrogram
sgSignalCol, sgTimeCol, sgSampleRate, sgWindowSize, sgOverlap, sgWinFunc, sgYMode, sgLogFreq, sgViewShort-time FFT. sgWindowSize is a power of two, sgOverlap 0 to 0.95. sgView 'waterfall' draws it in 3-D (time, frequency, level as height) instead of the '2d' map; sgLogFreq applies to the map.
heatmap
Heatmap
hmMode, hmColumns, hmXCol, hmYCol, hmValueCol, hmXBins, hmYBins, hmColorScheme, hmShowValues, hmXMin, hmXMax, hmYMin, hmYMax, hmRange, hmSpacing, hmContourshmMode 'matrix' draws hmColumns as lines of a uniform grid (the data's rows along X); 'correlation' correlates hmColumns; 'raw', 'binned' and 'count' grid hmXCol by hmYCol (mean of hmValueCol, or counts) over hmXMin to hmXMax and hmYMin to hmYMax ('' is automatic). hmRange { scaleMin, scaleMax } fixes the colour range. hmSpacing 'values' sizes cells by position in 'matrix' and 'raw' modes, for breakpoint tables such as engine maps (matrix: X from the worksheet's X values, Y from the numbers in the column names; the largest Y at the top). hmContours draws that many isolines (0 to 20).
violin
Violin
vlValueCol, vlGroupCol, vlShowBox, vlBandwidth, vlOrientation, vlColor, vlAlarmKernel density per group. vlBandwidth '' uses Silverman's rule. vlAlarm (an AlarmLine, or null) draws a line across the value axis.
confusion
Confusion Matrix
cfActualCol, cfPredictedCol, cfNormalizeActual against predicted class counts, optionally normalised per row.
roc
ROC Curve
rocScoreCol, rocLabelCol, rocMode, rocColorClassifier scores against 0/1 labels. rocMode 'roc' or 'pr' (precision-recall).
losscurve
Loss Curves
lcXCol, lcLeftCols, lcRightCols, lcAlarmTraining curves on two Y axes. Column lists are { column, color }[]. lcAlarm (an AlarmLine, or null) draws a horizontal line on the left axis.
controlchart
Control Chart
ccValueCol, ccSubgroupCol, ccSigmaLevel, ccColorSPC chart with control limits at ccSigmaLevel sigma. ccSubgroupCol '' plots individuals (I-MR).
parallelcoords
Parallel Coords
pcColumns, pcColorByCol, pcColorOne vertical axis per column; lines optionally coloured by a column.
embedding
Embedding
emXCol, emYCol, emColorCol, emColorMode, emLabelCol, emPointSize, emColor2-D embeddings (t-SNE, UMAP output) coloured 'categorical' or 'numeric'.
flamegraph
Flame Graph
fgNameCol, fgParentCol, fgValueCol, fgDirectionHierarchy from name/parent rows ('' parent = flat). fgDirection 'topdown' or 'bottomup'.
barchart
Bar Chart
bcCategoryCol, bcValueCols, bcMode, bcHorizontal, bcValueScale, bcAlarmOne bar per value column per category, 'grouped' or 'stacked'. bcValueScale { scaleMin, scaleMax } fixes the value axis ('' is automatic). bcAlarm (an AlarmLine, or null) draws a line across the value axis.
radar
Radar
rdAxesCols, rdGroupCol, rdFill, rdColorOne spoke per column, one polygon per group; rdColor colours the first.
areachart
Area Chart
acXCol, acYCols, acStacked, acYScale, acAlarmFilled areas of several columns over an X column. acYScale { scaleMin, scaleMax } fixes the Y axis ('' is automatic). acAlarm (an AlarmLine, or null) draws a horizontal line.
cdfchart
CDF / ECDF
cdValueCols, cdComplement, cdLogX, cdAlarmEmpirical CDF per column; cdComplement plots 1 − CDF. cdAlarm (an AlarmLine, or null) draws a vertical line at a value.
bubblechart
Bubble Chart
bbXCol, bbYCol, bbSizeCol, bbColorCol, bbColorMode, bbMaxRadius, bbColor, bbAlarmScatter with bubble size (and optional colour) from columns. bbAlarm (an AlarmLine, or null) draws a horizontal line.
treemap
Treemap
tmNameCol, tmParentCol, tmValueColNested rectangles from name/parent/value rows.
sankey
Sankey
skSourceCol, skTargetCol, skValueColFlows between nodes from source/target/value rows.
calibration
Calibration Curve
cbScoreCol, cbLabelCol, cbBins, cbColorPredicted probability against observed frequency, in cbBins bins.
gauge
Gauges
ggGaugesggGauges lists the gauges in order, one per row of the dialog's signal table: { id, column, color, value: 'last' (the latest value: follows a live stream) | 'mean' | 'min' | 'max', style: 'arc' | 'linear', min, max ('' takes the data's range, rounded), alarm? (an AlarmLine: marked on the scale, the gauge takes its colour past it), colorMode? 'solid' | 'gradient' | 'zones', stops? { at, color }[] (values of the channel: a gradient blends through them, zones run from each stop to the next; presetStops('green-red' | 'red-green' | 'traffic', min, max) makes ready ones) }. newGaugeItem(column, index) makes one with the default look.
qqplot
Q-Q Plot
qqValueCol, qqMode, qqRefCol, qqColorQuantiles against a normal distribution ('normal') or another column ('column').
gantt
Gantt Chart
gtLabelCol, gtStartCol, gtEndCol, gtGroupCol, gtAlarmOne bar per row from start to end, optionally grouped. gtAlarm (an AlarmLine, or null) draws a vertical line at a time.

Colours and defaults

Most kinds also have a colour field (histColor, polarColor, rocColor, …). Each kind has a default factory exported from the package, for settings UIs that need a complete object:

TypeScript
import { defaultHistogramPanelSettings, type HistogramPanelChartSettings } from '@kymoscope/sdk'

const settings: HistogramPanelChartSettings = { ...defaultHistogramPanelSettings(), histColumn: 'speed' }
engine.charts.replaceSettings(chartId, settings)