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
| Kind | Settings | Notes |
|---|---|---|
multibandMulti-band | series, layout, lineWidth, xAxisLine, yAxisLine, gridLine, beacon, addColumn, envelope | Stacked 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. |
xyscatterX-Y scatter | xyXCol, xyYCol, xyColorCol, xyFit, xyXScale, xyYScale, xyPointRadius, xyColor, xyDrawMode, xyLineWidth, xyXAxisLine, xyYAxisLine, xyGridLine | Two 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. |
xyzmeshX-Y-Z mesh | xyzXCol, xyzYCol, xyzZCol, xyzViewMode, showMesh, meshStyle, meshOpacity, xyzXScale, xyzYScale, xyzZScale, xyzPointRadius, xyzMode, xyzColumns | 3-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. |
histogramHistogram | histColumn, histBins, histNormal, histLogY, histColor, histAlarm | histBins 0 picks the bin count automatically; histNormal overlays a normal curve. histAlarm (an AlarmLine, or null) draws a vertical line at a value. |
polarPolar | polarAngleCol, polarRadiusCol, polarMode, polarRadiusMin, polarRadiusMax, polarColor | polarMode 'waveform' or 'rose'. Radius limits are strings; '' is automatic. |
spectrumSpectrum | specSignalCol, specTimeCol, specSampleRate, specXMode, specYMode, specWindow, specLogX, specColor, specAlarm | FFT 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. |
boxplotBox Plot | boxValueCol, boxGroupCol, boxWhiskers, boxColor, boxAlarm | One box per group ('' groups by dataset). Whiskers '1.5iqr' or 'minmax'. boxAlarm (an AlarmLine, or null) draws a line across the value axis. |
spectrogramSpectrogram | sgSignalCol, sgTimeCol, sgSampleRate, sgWindowSize, sgOverlap, sgWinFunc, sgYMode, sgLogFreq, sgView | Short-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. |
heatmapHeatmap | hmMode, hmColumns, hmXCol, hmYCol, hmValueCol, hmXBins, hmYBins, hmColorScheme, hmShowValues, hmXMin, hmXMax, hmYMin, hmYMax, hmRange, hmSpacing, hmContours | hmMode '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). |
violinViolin | vlValueCol, vlGroupCol, vlShowBox, vlBandwidth, vlOrientation, vlColor, vlAlarm | Kernel density per group. vlBandwidth '' uses Silverman's rule. vlAlarm (an AlarmLine, or null) draws a line across the value axis. |
confusionConfusion Matrix | cfActualCol, cfPredictedCol, cfNormalize | Actual against predicted class counts, optionally normalised per row. |
rocROC Curve | rocScoreCol, rocLabelCol, rocMode, rocColor | Classifier scores against 0/1 labels. rocMode 'roc' or 'pr' (precision-recall). |
losscurveLoss Curves | lcXCol, lcLeftCols, lcRightCols, lcAlarm | Training curves on two Y axes. Column lists are { column, color }[]. lcAlarm (an AlarmLine, or null) draws a horizontal line on the left axis. |
controlchartControl Chart | ccValueCol, ccSubgroupCol, ccSigmaLevel, ccColor | SPC chart with control limits at ccSigmaLevel sigma. ccSubgroupCol '' plots individuals (I-MR). |
parallelcoordsParallel Coords | pcColumns, pcColorByCol, pcColor | One vertical axis per column; lines optionally coloured by a column. |
embeddingEmbedding | emXCol, emYCol, emColorCol, emColorMode, emLabelCol, emPointSize, emColor | 2-D embeddings (t-SNE, UMAP output) coloured 'categorical' or 'numeric'. |
flamegraphFlame Graph | fgNameCol, fgParentCol, fgValueCol, fgDirection | Hierarchy from name/parent rows ('' parent = flat). fgDirection 'topdown' or 'bottomup'. |
barchartBar Chart | bcCategoryCol, bcValueCols, bcMode, bcHorizontal, bcValueScale, bcAlarm | One 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. |
radarRadar | rdAxesCols, rdGroupCol, rdFill, rdColor | One spoke per column, one polygon per group; rdColor colours the first. |
areachartArea Chart | acXCol, acYCols, acStacked, acYScale, acAlarm | Filled 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. |
cdfchartCDF / ECDF | cdValueCols, cdComplement, cdLogX, cdAlarm | Empirical CDF per column; cdComplement plots 1 − CDF. cdAlarm (an AlarmLine, or null) draws a vertical line at a value. |
bubblechartBubble Chart | bbXCol, bbYCol, bbSizeCol, bbColorCol, bbColorMode, bbMaxRadius, bbColor, bbAlarm | Scatter with bubble size (and optional colour) from columns. bbAlarm (an AlarmLine, or null) draws a horizontal line. |
treemapTreemap | tmNameCol, tmParentCol, tmValueCol | Nested rectangles from name/parent/value rows. |
sankeySankey | skSourceCol, skTargetCol, skValueCol | Flows between nodes from source/target/value rows. |
calibrationCalibration Curve | cbScoreCol, cbLabelCol, cbBins, cbColor | Predicted probability against observed frequency, in cbBins bins. |
gaugeGauges | ggGauges | ggGauges 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. |
qqplotQ-Q Plot | qqValueCol, qqMode, qqRefCol, qqColor | Quantiles against a normal distribution ('normal') or another column ('column'). |
ganttGantt Chart | gtLabelCol, gtStartCol, gtEndCol, gtGroupCol, gtAlarm | One 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:
import { defaultHistogramPanelSettings, type HistogramPanelChartSettings } from '@kymoscope/sdk'
const settings: HistogramPanelChartSettings = { ...defaultHistogramPanelSettings(), histColumn: 'speed' }
engine.charts.replaceSettings(chartId, settings)