sy-spectrogram

Spectrogram

Show frequency intensity over time using color.

sy-spectrogram

Inspect frequency patterns in audio, vibration, and signals.

State the time interval, frequency spacing, and linear or dB scale. The example uses frequency frames that have already been calculated.

Base chart tier: Pro. Features such as additional renderers and custom branding have separate entitlement requirements.

InputData description
dataThe outer array contains time frames; each inner array contains frequency-bin intensities.
valueScalelinear or db.

Complete implementation example

html
<div id="chart-container" style="width: 100%; min-width: 0;"></div>

<script type="module">
  import { defineCustomElement as define0 } from '@syidax/advanced-pro/components/sy-spectrogram.js';
  define0();

  // Pro: complete registerLicense at app startup using your issued certificate.
  // The website preview certificate is not for use in customer apps.
  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-spectrogram",
      "props": {
        "data": [
          [0, 0, 0.19999999999999996, 0.4, 0.6, 0.8, 1, 0.8, 0.6, 0.4, 0.19999999999999996, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0.04106453536395094, 0.2410645353639509, 0.44106453536395096, 0.6410645353639509, 0.841064535363951, 0.9589354646360491, 0.7589354646360491, 0.558935464636049, 0.3589354646360491, 0.15893546463604902, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0.08846532615307956, 0.2884653261530795, 0.4884653261530796, 0.6884653261530795, 0.8884653261530795, 0.9115346738469204, 0.7115346738469205, 0.5115346738469204, 0.31153467384692046, 0.1115346738469205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0.14828602128397184, 0.3482860212839718, 0.5482860212839717, 0.7482860212839718, 0.9482860212839718, 0.8517139787160282, 0.6517139787160282, 0.45171397871602825, 0.2517139787160282, 0.05171397871602823, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0.0261151272803819, 0.22611512728038186, 0.4261151272803818, 0.6261151272803819, 0.8261151272803818, 0.9738848727196181, 0.7738848727196181, 0.5738848727196182, 0.3738848727196181, 0.17388487271961817, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0.12682321215368264, 0.3268232121536826, 0.5268232121536827, 0.7268232121536826, 0.9268232121536826, 0.8731767878463174, 0.6731767878463174, 0.47317678784631734, 0.2731767878463174, 0.07317678784631743, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0.05436873122621899, 0.25436873122621895, 0.454368731226219, 0.654368731226219, 0.8543687312262189, 0.945631268773781, 0.745631268773781, 0.545631268773781, 0.34563126877378103, 0.14563126877378108, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0.011640216009231708, 0.21164021600923166, 0.41164021600923173, 0.6116402160092317, 0.8116402160092318, 0.9883597839907683, 0.7883597839907683, 0.5883597839907683, 0.3883597839907683, 0.18835978399076825, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0.0003411175667960009, 0.20034111756679596, 0.400341117566796, 0.600341117566796, 0.800341117566796, 0.999658882433204, 0.799658882433204, 0.599658882433204, 0.399658882433204, 0.19965888243320395, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0.020921895297443927, 0.22092189529744388, 0.42092189529744384, 0.6209218952974439, 0.8209218952974439, 0.9790781047025561, 0.7790781047025561, 0.5790781047025562, 0.3790781047025561, 0.17907810470255614, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0.07256205853945441, 0.2725620585394545, 0.47256205853945443, 0.6725620585394545, 0.8725620585394545, 0.9274379414605456, 0.7274379414605455, 0.5274379414605456, 0.3274379414605455, 0.12743794146054555, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0, 0.15320287694432788, 0.35320287694432795, 0.5532028769443279, 0.753202876944328, 0.9532028769443279, 0.8467971230556721, 0.646797123055672, 0.4467971230556721, 0.24679712305567203, 0.046797123055672074, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0.0596294555590795, 0.25962945555907946, 0.4596294555590795, 0.6596294555590795, 0.8596294555590795, 0.9403705444409205, 0.7403705444409205, 0.5403705444409205, 0.3403705444409205, 0.14037054444092045, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0, 0.18759890254282863, 0.3875989025428286, 0.5875989025428285, 0.7875989025428286, 0.9875989025428286, 0.8124010974571714, 0.6124010974571714, 0.41240109745717146, 0.2124010974571714, 0.01240109745717144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0, 0.13200947987527623, 0.3320094798752763, 0.5320094798752762, 0.7320094798752763, 0.9320094798752763, 0.8679905201247238, 0.6679905201247237, 0.46799052012472375, 0.2679905201247237, 0.06799052012472373, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0, 0.0871039935521063, 0.28710399355210625, 0.4871039935521063, 0.6871039935521063, 0.8871039935521063, 0.9128960064478937, 0.7128960064478937, 0.5128960064478937, 0.3128960064478937, 0.11289600644789366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0.046699314742064124, 0.2466993147420642, 0.44669931474206415, 0.6466993147420641, 0.8466993147420642, 0.9533006852579359, 0.7533006852579358, 0.5533006852579359, 0.3533006852579359, 0.15330068525793583, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.004432881621465379, 0.20443288162146533, 0.4044328816214653, 0.6044328816214654, 0.8044328816214653, 0.9955671183785346, 0.7955671183785347, 0.5955671183785347, 0.39556711837853464, 0.1955671183785347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.15401635463588192, 0.3540163546358819, 0.554016354635882, 0.7540163546358819, 0.954016354635882, 0.8459836453641181, 0.6459836453641181, 0.44598364536411805, 0.2459836453641181, 0.04598364536411803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.28948631275417536, 0.4894863127541754, 0.6894863127541754, 0.8894863127541754, 0.9105136872458246, 0.7105136872458246, 0.5105136872458246, 0.3105136872458246, 0.11051368724582455, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.4054419962463426, 0.6054419962463425, 0.8054419962463426, 0.9945580037536574, 0.7945580037536575, 0.5945580037536574, 0.39455800375365746, 0.1945580037536574, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.4972606179308705, 0.6972606179308706, 0.8972606179308705, 0.9027393820691294, 0.7027393820691294, 0.5027393820691295, 0.3027393820691294, 0.10273938206912947, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.5612816591116129, 0.7612816591116129, 0.9612816591116129, 0.8387183408883871, 0.6387183408883871, 0.4387183408883871, 0.23871834088838706, 0.038718340888387104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.5949528029067717, 0.7949528029067716, 0.9949528029067716, 0.8050471970932284, 0.6050471970932284, 0.40504719709322834, 0.20504719709322838, 0.005047197093228428, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.5969316870686725, 0.7969316870686725, 0.9969316870686724, 0.8030683129313275, 0.6030683129313276, 0.4030683129313275, 0.20306831293132754, 0.003068312931327477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.5671394197305107, 0.7671394197305108, 0.9671394197305108, 0.8328605802694893, 0.6328605802694892, 0.43286058026948926, 0.2328605802694892, 0.032860580269489126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.5067637245761225, 0.7067637245761225, 0.9067637245761225, 0.8932362754238775, 0.6932362754238774, 0.4932362754238775, 0.29323627542387753, 0.09323627542387736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.4182115900447897, 0.6182115900447898, 0.8182115900447897, 0.9817884099552103, 0.7817884099552103, 0.5817884099552103, 0.38178840995521024, 0.18178840995521028, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.3050133102978567, 0.5050133102978567, 0.7050133102978566, 0.9050133102978567, 0.8949866897021433, 0.6949866897021433, 0.4949866897021433, 0.29498668970214337, 0.0949866897021433, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.17168174353100518, 0.37168174353100514, 0.5716817435310052, 0.7716817435310052, 0.9716817435310052, 0.8283182564689948, 0.6283182564689949, 0.4283182564689948, 0.22831825646899484, 0.028318256468994774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0.023532398559140688, 0.22353239855914064, 0.4235323985591407, 0.6235323985591407, 0.8235323985591407, 0.9764676014408593, 0.7764676014408594, 0.5764676014408593, 0.37646760144085933, 0.17646760144085927, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          [0, 0.0664715222539971, 0.2664715222539972, 0.46647152225399713, 0.6664715222539972, 0.8664715222539972, 0.9335284777460029, 0.7335284777460028, 0.5335284777460029, 0.3335284777460028, 0.13352847774600285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        ],
        "valueScale": "linear",
        "width": 640,
        "height": 360,
        "brandPosition": "bottom-right",
        "brandLogo": ""
      }
    }
  ];
  const container = document.querySelector('#chart-container');
  const elements = specs.map(({ tag, id, props }) => {
    const element = document.createElement(tag);
    element.id = id;
    Object.assign(element, props);
    element.setAttribute('aria-label', 'spectrogram example chart');
    return element;
  });
  container.replaceChildren(...elements);
  const chart = elements.at(-1);
  const onEvent = event => {
    console.log('pointClick', event.detail);
  };
  chart.addEventListener('pointClick', onEvent);
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.max(160, Math.floor(entry.contentRect.width));
    elements.forEach(element => { element.width = width; });
  });
  observer.observe(container);

  // In an SPA, call this function when the view is disposed.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('pointClick', onEvent);
    container.replaceChildren();
  }
</script>

Properties

data

The outer array contains time frames; each inner array contains frequency-bin intensities.

ItemValue
JavaScript propertydata
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeSpectrogramInput
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

width

Chart width in pixels. If the container width changes, update width from a ResizeObserver.

ItemValue
JavaScript propertywidth
HTML attributewidth
Typenumber
Default640

height

Chart height in pixels. Allow space for axes, titles, and the legend.

ItemValue
JavaScript propertyheight
HTML attributeheight
Typenumber
Default400

brandPosition

The corner where the logo is anchored. Community and Pro both support all four corners, using the same position on screen and in image exports.

ItemValue
JavaScript propertybrandPosition
HTML attributebrand-position
Type'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
Default'bottom-right'
Allowed valuestop-left, top-right, bottom-left, bottom-right

sampleRate

The sampling rate in Hz: the frequency axis then spans 0 … sampleRate / 2 (unless freq-min / freq-max say otherwise).

ItemValue
JavaScript propertysampleRate
HTML attributesample-rate
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

freqMin

The frequency axis ends in Hz (default 0 … sampleRate / 2, else 0 … bins as bin indexes).

ItemValue
JavaScript propertyfreqMin
HTML attributefreq-min
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

freqMax

Set as an HTML attribute or JavaScript property. type: number.

ItemValue
JavaScript propertyfreqMax
HTML attributefreq-max
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

hopSeconds

Seconds per frame (the hop).

ItemValue
JavaScript propertyhopSeconds
HTML attributehop-seconds
Typenumber
Default1

timeOrigin

Seconds at the first frame of the data (the window's drops advance it).

ItemValue
JavaScript propertytimeOrigin
HTML attributetime-origin
Typenumber
Default0

valueScale

linear or db.

ItemValue
JavaScript propertyvalueScale
HTML attributevalue-scale
TypeSpectrogramValueScale
Default'db'
Allowed valueslinear, db

dbFloor

The dB a zero magnitude reads (the linear scale).

ItemValue
JavaScript propertydbFloor
HTML attributedb-floor
Typenumber
DefaultSPECTROGRAM_DEFAULT_DB_FLOOR

samples

Raw samples (a property; ignored while data is set): the FFT pipeline frames them into dB.

ItemValue
JavaScript propertysamples
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeArrayLike<number>
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

fftSize

The FFT size, a power of two (default 1,024): bins = fft-size / 2 and each bin is sample-rate / fft-size wide.

ItemValue
JavaScript propertyfftSize
HTML attributefft-size
Typenumber
Default1024

fftHop

Samples between frame starts (default fft-size / 2).

ItemValue
JavaScript propertyfftHop
HTML attributefft-hop
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

fftWindow

The analysis window: hann (default), hamming, blackman, rect.

ItemValue
JavaScript propertyfftWindow
HTML attributefft-window
TypeSpectrogramWindowKind
Default'hann'
Allowed valuesrect, hann, hamming, blackman

colors

The colour ramp over the dB domain (a scheme name, a colour list / comma list, or [t, colour] stops).

ItemValue
JavaScript propertycolors
HTML attributePass objects, arrays, and callbacks as JavaScript properties
Typestring | ReadonlyArray<string> | ReadonlyArray<readonly [number, string]>
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

valueMin

Domain ends in dB; an omitted end follows the data (the min never more than 80 dB under the max).

ItemValue
JavaScript propertyvalueMin
HTML attributevalue-min
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

valueMax

Set as an HTML attribute or JavaScript property. type: number.

ItemValue
JavaScript propertyvalueMax
HTML attributevalue-max
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

emptyColor

The colour of an empty cell — transparent by default.

ItemValue
JavaScript propertyemptyColor
HTML attributeempty-color
Typestring
Default'transparent'

lod

The plane's level of detail: auto (area-folded once a frame or bin is under a device px — the usual case), point, area, smooth.

ItemValue
JavaScript propertylod
HTML attributelod
TypeSpectrogramLodMode
Default'auto'
Allowed valuesauto, point, area, smooth

areaReduce

how the area LOD folds sub-pixel bins / frames: max (default, peak-hold — a narrow line survives) or mean.

ItemValue
JavaScript propertyareaReduce
HTML attributearea-reduce
Type'mean' | 'max'
Default'max'
Allowed valuesmax, mean

xAxis

Configure the horizontal axis type, categories, range, and formatting. For a category axis, match the categories order to the value array indices. Charts supporting multiple axes can accept an axis array.

ItemValue
JavaScript propertyxAxis
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianAxisInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

yAxis

Configure the vertical axis range, ticks, labels, and direction. Use consistent units for comparisons, and consider a zero baseline when comparing bar lengths.

ItemValue
JavaScript propertyyAxis
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeYAxisInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

gridLines

Grid lines default OFF (the plane tiles the plot).

ItemValue
JavaScript propertygridLines
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianGridLinesInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

crosshair

Crosshair that follows the cursor across the plot.

ItemValue
JavaScript propertycrosshair
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianCrosshairInput
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

zoom

Zoom (2026-09-10) — the shared cartesian zoom on the time (s) / frequency (Hz) axes: a mode ('x' | 'y' | 'xy'), true, 'inside' or the object (drag rectangle, pan, wheel, pinch, keyboard, reset button). Off by default.

ItemValue
JavaScript propertyzoom
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianZoomInput
Defaultundefined
Literals in the typeauto, off, true, false, x, y, xy, inside

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

chartTitle

The title inside the chart. Explain the data's unit and meaning alongside it.

ItemValue
JavaScript propertychartTitle
HTML attributechart-title
Typestring
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

chartSubtitle

The subtitle inside the chart.

ItemValue
JavaScript propertychartSubtitle
HTML attributechart-subtitle
Typestring
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

enableMouseTracking

Set as an HTML attribute or JavaScript property. type: boolean.

ItemValue
JavaScript propertyenableMouseTracking
HTML attributeenable-mouse-tracking
Typeboolean
Defaulttrue

tooltip

the cell tooltip (the shared cartesian tooltip input: show / trigger / format / html / connector / draggable …).

ItemValue
JavaScript propertytooltip
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianTooltipInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

tooltipEnabled

Set as an HTML attribute or JavaScript property. type: boolean.

ItemValue
JavaScript propertytooltipEnabled
HTML attributetooltip-show
Typeboolean
Defaulttrue

tooltipFormat

a plain-text formatter of the default tooltip (tooltip.format wins).

ItemValue
JavaScript propertytooltipFormat
HTML attributePass objects, arrays, and callbacks as JavaScript properties
Type(detail: SpectrogramPointEventDetail) => string
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

animated

Whether to animate initial display and data changes.

ItemValue
JavaScript propertyanimated
HTML attributeanimate
Typeboolean
Defaultfalse

animationDuration

Animation duration in milliseconds.

ItemValue
JavaScript propertyanimationDuration
HTML attributeanimation-duration
Typenumber
Default600

animationEasing

Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.

ItemValue
JavaScript propertyanimationEasing
HTML attributeanimation-easing
TypeSpectrogramEasing
Default'ease-out'
Allowed valueslinear, ease-out, ease-in, ease-in-out

animationType

Allowed values: initial, update. Default: undefined.

ItemValue
JavaScript propertyanimationType
HTML attributeanimation-type
TypeSpectrogramAnimationType
Defaultundefined
Allowed valuesinitial, update

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamSource

A stream source for live data. Check the contract for the specific type.

ItemValue
JavaScript propertystreamSource
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeSpectrogramStreamSource
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamMax

The scrolling window: frames kept at most (default 4,096) — the oldest scroll out first and the time origin advances.

ItemValue
JavaScript propertystreamMax
HTML attributestream-max
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamWindow

The newest N streamed frames the chart renders (the whole buffer when unset); the frames before the window stay buffered, the time axis starts at the window.

ItemValue
JavaScript propertystreamWindow
HTML attributestream-window
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

visualMap

A visual-map binding (a sy-visual-map snapshot + dimension); it overrides colors / value-min / value-max while bound.

ItemValue
JavaScript propertyvisualMap
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeVisualMapBinding | null
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

engine

auto, standard and pro all run the one WebGPU renderer (a Pro-only type has no other); switching never tears it down.

ItemValue
JavaScript propertyengine
HTML attributeengine
TypeSpectrogramEngineMode
Default'auto'
Allowed valuesauto, standard, pro

unavailable

fallback shows the on-chart notice when the renderer cannot run; error throws.

ItemValue
JavaScript propertyunavailable
HTML attributeunavailable
TypeSpectrogramUnavailableBehaviour
Default'fallback'
Allowed valuesfallback, error

Events

rendered

Every drawn frame; engine is the engine status (requested / effective / code / the governing license feature).

Event name: rendered. Names are case-sensitive. Read the payload from detail on CustomEvent<SpectrogramRenderResult & { tier: SpectrogramEngineTier; engine?: ChartEngineStatus }>.

javascript
chart.addEventListener('rendered', event => {
  console.log(event.detail); // SpectrogramRenderResult & { tier: SpectrogramEngineTier; engine?: ChartEngineStatus }
});

pointClick

A point selection event. Read the selected data and index from CustomEvent.detail.

Event name: pointClick. Names are case-sensitive. Read the payload from detail on CustomEvent<SpectrogramPointEventDetail>.

javascript
chart.addEventListener('pointClick', event => {
  console.log(event.detail); // SpectrogramPointEventDetail
});

pointHover

CustomEvent.detail type: SpectrogramPointEventDetail | null. Event names are case-sensitive.

Event name: pointHover. Names are case-sensitive. Read the payload from detail on CustomEvent<SpectrogramPointEventDetail | null>.

javascript
chart.addEventListener('pointHover', event => {
  console.log(event.detail); // SpectrogramPointEventDetail | null
});

crosshairMove

CustomEvent.detail type: CartesianCrosshairEventDetail | null. Event names are case-sensitive.

Event name: crosshairMove. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianCrosshairEventDetail | null>.

javascript
chart.addEventListener('crosshairMove', event => {
  console.log(event.detail); // CartesianCrosshairEventDetail | null
});

pointContextMenu

CustomEvent.detail type: ChartPointContextMenuEventDetail<SpectrogramPointEventDetail>. Event names are case-sensitive.

Event name: pointContextMenu. Names are case-sensitive. Read the payload from detail on CustomEvent<ChartPointContextMenuEventDetail<SpectrogramPointEventDetail>>.

javascript
chart.addEventListener('pointContextMenu', event => {
  console.log(event.detail); // ChartPointContextMenuEventDetail<SpectrogramPointEventDetail>
});

appended

CustomEvent.detail type: { count: number }. Event names are case-sensitive.

Event name: appended. Names are case-sensitive. Read the payload from detail on CustomEvent<{ count: number }>.

javascript
chart.addEventListener('appended', event => {
  console.log(event.detail); // { count: number }
});

windowSlid

CustomEvent.detail type: { dropped: number }. Event names are case-sensitive.

Event name: windowSlid. Names are case-sensitive. Read the payload from detail on CustomEvent<{ dropped: number }>.

javascript
chart.addEventListener('windowSlid', event => {
  console.log(event.detail); // { dropped: number }
});

chartAnimationStart

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationStart. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationStart', event => {
  console.log(event.detail); // void
});

chartAnimationEnd

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationEnd. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationEnd', event => {
  console.log(event.detail); // void
});

chartAnimationInterrupted

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationInterrupted. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationInterrupted', event => {
  console.log(event.detail); // void
});

tooltipShow

Whether to display the built-in tooltip.

Event name: tooltipShow. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianTooltipEventDetail>.

javascript
chart.addEventListener('tooltipShow', event => {
  console.log(event.detail); // CartesianTooltipEventDetail
});

tooltipHide

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: tooltipHide. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('tooltipHide', event => {
  console.log(event.detail); // void
});

tooltipAction

CustomEvent.detail type: CartesianTooltipActionEventDetail. Event names are case-sensitive.

Event name: tooltipAction. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianTooltipActionEventDetail>.

javascript
chart.addEventListener('tooltipAction', event => {
  console.log(event.detail); // CartesianTooltipActionEventDetail
});

zoomChange

Zoom — every zoom / pan change (drag, keyboard, wheel, pinch, API, reset); null zoom = the full extent.

Event name: zoomChange. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianZoomChangeEventDetail>.

javascript
chart.addEventListener('zoomChange', event => {
  console.log(event.detail); // CartesianZoomChangeEventDetail
});

Methods

getDataTable

Current normalized table, including the retained stream; independent of GPU availability.

typescript
getDataTable(): Promise<ChartDataTable>

Return type: Promise<ChartDataTable>. Call the method after element registration and await its Promise result.

redraw

Redraw the chart using its current data and options. Inspect the rendered result after the returned Promise resolves.

typescript
redraw(): Promise<SpectrogramRenderResult>

Return type: Promise<SpectrogramRenderResult>. Call the method after element registration and await its Promise result.

getActiveTier

An asynchronous method. Check the argument and return types below.

typescript
getActiveTier(): Promise<SpectrogramEngineTier>

Return type: Promise<SpectrogramEngineTier>. Call the method after element registration and await its Promise result.

getUnavailableReason

The reason the renderer cannot run (undefined while it runs).

typescript
getUnavailableReason(): Promise<string | undefined>

Return type: Promise<string | undefined>. Call the method after element registration and await its Promise result.

setData

Replace the bar set.

typescript
setData(data: SpectrogramInput): Promise<void>
ArgumentsTypeRequired
dataSpectrogramInputRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

appendFrame

An asynchronous method. Check the argument and return types below.

typescript
appendFrame(frame: SpectrogramFrame): Promise<void>
ArgumentsTypeRequired
frameSpectrogramFrameRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

appendBatch

Append multiple values to the stream. Check the argument type and the licensing requirements for streaming.

typescript
appendBatch(frames: ReadonlyArray<SpectrogramFrame>): Promise<void>
ArgumentsTypeRequired
framesReadonlyArray<SpectrogramFrame>Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

shift

Drop the count oldest frames — the data frames too (they fold into the internal source on the first shift as on the first append). (carry-over C8) — shift(n) drops the n oldest frames on screen. With an internal source the recording is folded into it (it shifts them itself); under an EXTERNAL source the recording's leading frames go first (before the source lost its frames while the recording's old frames came back into the window), then the source.

typescript
shift(count: number): Promise<void>
ArgumentsTypeRequired
countnumberRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

replace

Swap the streamed set (replace([]) clears it); the base values never leave. Without chart.streaming the dies upsert into the base like a batch (quietly: no appended, no binChanged, as a ring replace).

typescript
replace(frames: ReadonlyArray<SpectrogramFrame>): Promise<void>
ArgumentsTypeRequired
framesReadonlyArray<SpectrogramFrame>Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

getStreamSource

The stream session's source (Chart Pro): like the stream methods it waits for a license still being confirmed.

typescript
getStreamSource(): Promise<SpectrogramStreamSource | undefined>

Return type: Promise<SpectrogramStreamSource | undefined>. Call the method after element registration and await its Promise result.

setAnimation

An asynchronous method. Check the argument and return types below.

typescript
setAnimation(options: { duration?: number; easing?: SpectrogramEasing; enabled?: boolean; type?: SpectrogramAnimationType }): Promise<void>
ArgumentsTypeRequired
options{ duration?: number; easing?: SpectrogramEasing; enabled?: boolean; type?: SpectrogramAnimationType }Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

pauseAnimation

Pause the current animation.

typescript
pauseAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

resumeAnimation

Resume a paused animation.

typescript
resumeAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

replayAnimation

Replay the initial sweep from min → value(s). No-op when animation is off / reduced.

typescript
replayAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

hitTest

The cell under host-relative CSS coordinates, or null.

typescript
hitTest(cssX: number, cssY: number): Promise<SpectrogramPointEventDetail | null>
ArgumentsTypeRequired
cssXnumberRequired
cssYnumberRequired

Return type: Promise<SpectrogramPointEventDetail | null>. Call the method after element registration and await its Promise result.

showTooltipAtCell

open the tooltip on a cell (frame / bin), honouring the tooltip input; null when the tooltip is off or the cell is outside.

typescript
showTooltipAtCell(frame: number, bin: number): Promise<CartesianTooltipEventDetail | null>
ArgumentsTypeRequired
framenumberRequired
binnumberRequired

Return type: Promise<CartesianTooltipEventDetail | null>. Call the method after element registration and await its Promise result.

showTooltipAtIndex

open the tooltip on a cell by its index (frame * bins + bin; the facade's showTooltipAtPoint).

typescript
showTooltipAtIndex(index: number): Promise<CartesianTooltipEventDetail | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<CartesianTooltipEventDetail | null>. Call the method after element registration and await its Promise result.

hideTooltip

Close the currently visible tooltip.

typescript
hideTooltip(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

focusCellAt

move the keyboard focus ring to a cell and announce it (null outside the grid).

typescript
focusCellAt(frame: number, bin: number): Promise<SpectrogramPointEventDetail | null>
ArgumentsTypeRequired
framenumberRequired
binnumberRequired

Return type: Promise<SpectrogramPointEventDetail | null>. Call the method after element registration and await its Promise result.

getValue

The dB value of a cell (null when empty or outside the grid).

typescript
getValue(frame: number, bin: number): Promise<number | null>
ArgumentsTypeRequired
framenumberRequired
binnumberRequired

Return type: Promise<number | null>. Call the method after element registration and await its Promise result.

getValueExtent

The dB extent of the plane (min / max over the finite cells).

typescript
getValueExtent(): Promise<SpectrogramValueExtent | null>

Return type: Promise<SpectrogramValueExtent | null>. Call the method after element registration and await its Promise result.

getGridSize

Columns × rows of the current grid.

typescript
getGridSize(): Promise<{ frames: number; bins: number; cells: number; dropped: number }>

Return type: Promise<{ frames: number; bins: number; cells: number; dropped: number }>. Call the method after element registration and await its Promise result.

getRanges

The time and frequency ranges the plane spans.

typescript
getRanges(): Promise<SpectrogramRanges>

Return type: Promise<SpectrogramRanges>. Call the method after element registration and await its Promise result.

appendSamples

feed raw samples: every completed window becomes a frame (appended through the stream); the rest waits.

typescript
appendSamples(samples: ArrayLike<number>): Promise<SpectrogramAppendSamplesResult>
ArgumentsTypeRequired
samplesArrayLike<number>Required

Return type: Promise<SpectrogramAppendSamplesResult>. Call the method after element registration and await its Promise result.

getFftInfo

the FFT pipeline's resolved parameters (bins, bin width, frame seconds, the window's coherent gain).

typescript
getFftInfo(): Promise<SpectrogramFftInfo>

Return type: Promise<SpectrogramFftInfo>. Call the method after element registration and await its Promise result.

setVisualMap

Bind (or clear with null) a visual-map snapshot; it wins over the visualMap prop until the prop changes again.

typescript
setVisualMap(binding: VisualMapBinding | null): Promise<VisualMapBinding | null>
ArgumentsTypeRequired
bindingVisualMapBinding | nullRequired

Return type: Promise<VisualMapBinding | null>. Call the method after element registration and await its Promise result.

getVisualMap

An asynchronous method. Check the argument and return types below.

typescript
getVisualMap(): Promise<VisualMapBinding | null>

Return type: Promise<VisualMapBinding | null>. Call the method after element registration and await its Promise result.

getVisualExtent

The extent of a dimension: value = dB, x = time (s), y = frequency (Hz), index = the cell indexes.

typescript
getVisualExtent(request?: VisualMapExtentRequest): Promise<VisualMapExtent | null>
ArgumentsTypeRequired
requestVisualMapExtentRequestOptional

Return type: Promise<VisualMapExtent | null>. Call the method after element registration and await its Promise result.

zoomTo

Zoom to explicit windows in axis units: x (seconds) / y (Hz) as { min, max } or [min, max] (null clears that orientation).

typescript
zoomTo(request: CartesianZoomRequest): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
requestCartesianZoomRequestRequired

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

zoomBy

Scale the current windows by factor (< 1 zooms in) around anchorFraction (0..1, default centre).

typescript
zoomBy(factor: number, anchorFraction?: number): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
factornumberRequired
anchorFractionnumberOptional

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

panBy

Slide the zoomed windows by axis units ({ x?: seconds, y?: Hz }); a no-op at the full extent.

typescript
panBy(delta: { x?: number; y?: number }): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
delta{ x?: number; y?: number }Required

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

resetZoom

Reset the zoomed or panned range to the original data range.

typescript
resetZoom(): Promise<CartesianZoomChangeEventDetail | null>

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

getZoom

Read the current zoom range. Check the return type's nullability and the range for each axis.

typescript
getZoom(): Promise<CartesianZoomState | null>

Return type: Promise<CartesianZoomState | null>. Call the method after element registration and await its Promise result.

getZoomExtent

The full extent (and key) of the primary — or the named — axes: the time span in seconds, the frequency span in Hz.

typescript
getZoomExtent(request?: CartesianZoomExtentRequest): Promise<CartesianZoomExtentDetail | null>
ArgumentsTypeRequired
requestCartesianZoomExtentRequestOptional

Return type: Promise<CartesianZoomExtentDetail | null>. Call the method after element registration and await its Promise result.

getEngineStatus

Requested engine vs what runs, and why (CHART-ADD-08): the decision for the current inputs, read without side effects (ProChartLicense.engineStatus); a renderer that failed at run time reports engine-unsupported.

typescript
getEngineStatus(): Promise<ChartEngineStatus>

Return type: Promise<ChartEngineStatus>. Call the method after element registration and await its Promise result.