sy-spectrogram

Spectrogram

시간에 따른 주파수별 세기를 색으로 표시합니다.

sy-spectrogram

오디오·진동·신호의 주파수 패턴을 확인하세요.

시간 간격·주파수 간격·선형 또는 dB 척도를 명시하세요. 예제는 이미 계산된 주파수 프레임입니다.

기본 차트 등급: Pro. 추가 렌더러·커스텀 브랜딩 등 기능의 권한은 별도입니다.

입력데이터 설명
data바깥 배열은 시간 프레임, 각 내부 배열은 주파수 bin의 세기입니다.
valueScalelinear 또는 db 척도입니다.

전체 적용 예제

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: 앱 시작 시 발급받은 인증서로 registerLicense를 완료하세요.
  // 홈페이지 미리보기의 인증서는 고객 앱에서 사용하지 않습니다.
  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 예제 차트');
    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);

  // SPA에서는 화면이 해제될 때 이 함수를 호출하세요.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('pointClick', onEvent);
    container.replaceChildren();
  }
</script>

Properties

data

바깥 배열은 시간 프레임, 각 내부 배열은 주파수 bin의 세기입니다.

항목값
JavaScript 프로퍼티data
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입SpectrogramInput
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

width

차트의 너비를 px 단위로 지정합니다. 컨테이너 너비가 변하는 앱에서는 ResizeObserver에서 width를 갱신하세요.

항목값
JavaScript 프로퍼티width
HTML attributewidth
타입number
기본값640

height

차트의 높이를 px 단위로 지정합니다. 축, 제목과 범례가 차지하는 공간을 함께 고려하세요.

항목값
JavaScript 프로퍼티height
HTML attributeheight
타입number
기본값400

brandPosition

로고를 고정할 코너입니다. Community·Pro 모두 네 코너 중 하나를 선택할 수 있으며 화면과 이미지 내보내기에 같은 위치를 사용합니다.

항목값
JavaScript 프로퍼티brandPosition
HTML attributebrand-position
타입'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
기본값'bottom-right'
허용값top-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).

항목값
JavaScript 프로퍼티sampleRate
HTML attributesample-rate
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

freqMin

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

항목값
JavaScript 프로퍼티freqMin
HTML attributefreq-min
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

freqMax

HTML attribute 또는 JavaScript 프로퍼티로 설정합니다. 타입: number.

항목값
JavaScript 프로퍼티freqMax
HTML attributefreq-max
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

hopSeconds

Seconds per frame (the hop).

항목값
JavaScript 프로퍼티hopSeconds
HTML attributehop-seconds
타입number
기본값1

timeOrigin

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

항목값
JavaScript 프로퍼티timeOrigin
HTML attributetime-origin
타입number
기본값0

valueScale

linear 또는 db 척도입니다.

항목값
JavaScript 프로퍼티valueScale
HTML attributevalue-scale
타입SpectrogramValueScale
기본값'db'
허용값linear, db

dbFloor

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

항목값
JavaScript 프로퍼티dbFloor
HTML attributedb-floor
타입number
기본값SPECTROGRAM_DEFAULT_DB_FLOOR

samples

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

항목값
JavaScript 프로퍼티samples
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입ArrayLike<number>
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

fftSize

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

항목값
JavaScript 프로퍼티fftSize
HTML attributefft-size
타입number
기본값1024

fftHop

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

항목값
JavaScript 프로퍼티fftHop
HTML attributefft-hop
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

fftWindow

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

항목값
JavaScript 프로퍼티fftWindow
HTML attributefft-window
타입SpectrogramWindowKind
기본값'hann'
허용값rect, hann, hamming, blackman

colors

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

항목값
JavaScript 프로퍼티colors
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입string | ReadonlyArray<string> | ReadonlyArray<readonly [number, string]>
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

valueMin

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

항목값
JavaScript 프로퍼티valueMin
HTML attributevalue-min
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

valueMax

HTML attribute 또는 JavaScript 프로퍼티로 설정합니다. 타입: number.

항목값
JavaScript 프로퍼티valueMax
HTML attributevalue-max
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

emptyColor

The colour of an empty cell — transparent by default.

항목값
JavaScript 프로퍼티emptyColor
HTML attributeempty-color
타입string
기본값'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.

항목값
JavaScript 프로퍼티lod
HTML attributelod
타입SpectrogramLodMode
기본값'auto'
허용값auto, point, area, smooth

areaReduce

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

항목값
JavaScript 프로퍼티areaReduce
HTML attributearea-reduce
타입'mean' | 'max'
기본값'max'
허용값max, mean

xAxis

가로축의 종류, 범주, 범위와 표시 형식을 설정합니다. category 축은 categories의 순서를 값 배열의 인덱스와 맞추세요. 여러 축을 받는 경우 축 배열로 전달할 수 있습니다.

항목값
JavaScript 프로퍼티xAxis
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입CartesianAxisInput
기본값undefined
타입에 포함된 리터럴auto, off

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

yAxis

세로축의 범위, 눈금, 레이블과 방향을 설정합니다. 비교하는 값의 단위를 맞추고, 막대의 길이를 비교할 때는 0 기준을 고려하세요.

항목값
JavaScript 프로퍼티yAxis
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입YAxisInput
기본값undefined
타입에 포함된 리터럴auto, off

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

gridLines

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

항목값
JavaScript 프로퍼티gridLines
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입CartesianGridLinesInput
기본값undefined
타입에 포함된 리터럴auto, off

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

crosshair

Crosshair that follows the cursor across the plot.

항목값
JavaScript 프로퍼티crosshair
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입CartesianCrosshairInput
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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.

항목값
JavaScript 프로퍼티zoom
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입CartesianZoomInput
기본값undefined
타입에 포함된 리터럴auto, off, true, false, x, y, xy, inside

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

chartTitle

차트 내부 제목입니다. 데이터의 단위와 의미를 함께 설명하세요.

항목값
JavaScript 프로퍼티chartTitle
HTML attributechart-title
타입string
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

chartSubtitle

차트 내부 부제목입니다.

항목값
JavaScript 프로퍼티chartSubtitle
HTML attributechart-subtitle
타입string
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

enableMouseTracking

HTML attribute 또는 JavaScript 프로퍼티로 설정합니다. 타입: boolean.

항목값
JavaScript 프로퍼티enableMouseTracking
HTML attributeenable-mouse-tracking
타입boolean
기본값true

tooltip

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

항목값
JavaScript 프로퍼티tooltip
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입CartesianTooltipInput
기본값undefined
타입에 포함된 리터럴auto, off

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

tooltipEnabled

HTML attribute 또는 JavaScript 프로퍼티로 설정합니다. 타입: boolean.

항목값
JavaScript 프로퍼티tooltipEnabled
HTML attributetooltip-show
타입boolean
기본값true

tooltipFormat

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

항목값
JavaScript 프로퍼티tooltipFormat
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입(detail: SpectrogramPointEventDetail) => string
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

animated

초기 표시와 데이터 변경의 애니메이션 사용 여부입니다.

항목값
JavaScript 프로퍼티animated
HTML attributeanimate
타입boolean
기본값false

animationDuration

애니메이션 지속 시간(ms).

항목값
JavaScript 프로퍼티animationDuration
HTML attributeanimation-duration
타입number
기본값600

animationEasing

허용값: linear, ease-out, ease-in, ease-in-out. 기본값: 'ease-out'.

항목값
JavaScript 프로퍼티animationEasing
HTML attributeanimation-easing
타입SpectrogramEasing
기본값'ease-out'
허용값linear, ease-out, ease-in, ease-in-out

animationType

허용값: initial, update. 기본값: undefined.

항목값
JavaScript 프로퍼티animationType
HTML attributeanimation-type
타입SpectrogramAnimationType
기본값undefined
허용값initial, update

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

streamSource

실시간 데이터를 전달하는 스트림 소스입니다. 해당 타입의 계약을 확인하세요.

항목값
JavaScript 프로퍼티streamSource
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입SpectrogramStreamSource
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

streamMax

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

항목값
JavaScript 프로퍼티streamMax
HTML attributestream-max
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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.

항목값
JavaScript 프로퍼티streamWindow
HTML attributestream-window
타입number
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

visualMap

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

항목값
JavaScript 프로퍼티visualMap
HTML attribute객체·배열·콜백은 JavaScript 프로퍼티로 전달
타입VisualMapBinding | null
기본값undefined

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

engine

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

항목값
JavaScript 프로퍼티engine
HTML attributeengine
타입SpectrogramEngineMode
기본값'auto'
허용값auto, standard, pro

unavailable

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

항목값
JavaScript 프로퍼티unavailable
HTML attributeunavailable
타입SpectrogramUnavailableBehaviour
기본값'fallback'
허용값fallback, error

Events

rendered

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

이벤트 이름: rendered. 대소문자를 구분합니다. payload는 CustomEvent<SpectrogramRenderResult & { tier: SpectrogramEngineTier; engine?: ChartEngineStatus }>의 detail에서 읽습니다.

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

pointClick

점 선택 이벤트입니다. CustomEvent.detail에서 선택한 데이터와 인덱스를 읽습니다.

이벤트 이름: pointClick. 대소문자를 구분합니다. payload는 CustomEvent<SpectrogramPointEventDetail>의 detail에서 읽습니다.

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

pointHover

CustomEvent.detail 타입: SpectrogramPointEventDetail | null. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: pointHover. 대소문자를 구분합니다. payload는 CustomEvent<SpectrogramPointEventDetail | null>의 detail에서 읽습니다.

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

crosshairMove

CustomEvent.detail 타입: CartesianCrosshairEventDetail | null. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: crosshairMove. 대소문자를 구분합니다. payload는 CustomEvent<CartesianCrosshairEventDetail | null>의 detail에서 읽습니다.

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

pointContextMenu

CustomEvent.detail 타입: ChartPointContextMenuEventDetail<SpectrogramPointEventDetail>. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: pointContextMenu. 대소문자를 구분합니다. payload는 CustomEvent<ChartPointContextMenuEventDetail<SpectrogramPointEventDetail>>의 detail에서 읽습니다.

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

appended

CustomEvent.detail 타입: { count: number }. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: appended. 대소문자를 구분합니다. payload는 CustomEvent<{ count: number }>의 detail에서 읽습니다.

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

windowSlid

CustomEvent.detail 타입: { dropped: number }. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: windowSlid. 대소문자를 구분합니다. payload는 CustomEvent<{ dropped: number }>의 detail에서 읽습니다.

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

chartAnimationStart

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: chartAnimationStart. 대소문자를 구분합니다. payload는 CustomEvent<void>의 detail에서 읽습니다.

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

chartAnimationEnd

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: chartAnimationEnd. 대소문자를 구분합니다. payload는 CustomEvent<void>의 detail에서 읽습니다.

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

chartAnimationInterrupted

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: chartAnimationInterrupted. 대소문자를 구분합니다. payload는 CustomEvent<void>의 detail에서 읽습니다.

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

tooltipShow

내장 툴팁 표시 여부입니다.

이벤트 이름: tooltipShow. 대소문자를 구분합니다. payload는 CustomEvent<CartesianTooltipEventDetail>의 detail에서 읽습니다.

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

tooltipHide

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: tooltipHide. 대소문자를 구분합니다. payload는 CustomEvent<void>의 detail에서 읽습니다.

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

tooltipAction

CustomEvent.detail 타입: CartesianTooltipActionEventDetail. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: tooltipAction. 대소문자를 구분합니다. payload는 CustomEvent<CartesianTooltipActionEventDetail>의 detail에서 읽습니다.

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.

이벤트 이름: zoomChange. 대소문자를 구분합니다. payload는 CustomEvent<CartesianZoomChangeEventDetail>의 detail에서 읽습니다.

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>

반환 타입: Promise<ChartDataTable>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

redraw

현재 데이터와 옵션으로 차트를 다시 그립니다. 반환되는 Promise가 완료되면 렌더링 결과를 확인할 수 있습니다.

typescript
redraw(): Promise<SpectrogramRenderResult>

반환 타입: Promise<SpectrogramRenderResult>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getActiveTier

비동기 메서드입니다. 아래 인수 타입과 반환 타입을 확인하세요.

typescript
getActiveTier(): Promise<SpectrogramEngineTier>

반환 타입: Promise<SpectrogramEngineTier>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getUnavailableReason

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

typescript
getUnavailableReason(): Promise<string | undefined>

반환 타입: Promise<string | undefined>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

setData

Replace the bar set.

typescript
setData(data: SpectrogramInput): Promise<void>
인수타입필수 여부
dataSpectrogramInput필수

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

appendFrame

비동기 메서드입니다. 아래 인수 타입과 반환 타입을 확인하세요.

typescript
appendFrame(frame: SpectrogramFrame): Promise<void>
인수타입필수 여부
frameSpectrogramFrame필수

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

appendBatch

스트림에 여러 값을 한 번에 추가합니다. 메서드 인수 타입과 스트리밍 기능의 라이선스 조건을 확인하세요.

typescript
appendBatch(frames: ReadonlyArray<SpectrogramFrame>): Promise<void>
인수타입필수 여부
framesReadonlyArray<SpectrogramFrame>필수

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
countnumber필수

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
framesReadonlyArray<SpectrogramFrame>필수

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>

반환 타입: Promise<SpectrogramStreamSource | undefined>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

setAnimation

비동기 메서드입니다. 아래 인수 타입과 반환 타입을 확인하세요.

typescript
setAnimation(options: { duration?: number; easing?: SpectrogramEasing; enabled?: boolean; type?: SpectrogramAnimationType }): Promise<void>
인수타입필수 여부
options{ duration?: number; easing?: SpectrogramEasing; enabled?: boolean; type?: SpectrogramAnimationType }필수

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

pauseAnimation

진행 중인 애니메이션을 일시 정지합니다.

typescript
pauseAnimation(): Promise<void>

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

resumeAnimation

일시 정지한 애니메이션을 다시 진행합니다.

typescript
resumeAnimation(): Promise<void>

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

replayAnimation

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

typescript
replayAnimation(): Promise<void>

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

hitTest

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

typescript
hitTest(cssX: number, cssY: number): Promise<SpectrogramPointEventDetail | null>
인수타입필수 여부
cssXnumber필수
cssYnumber필수

반환 타입: Promise<SpectrogramPointEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
framenumber필수
binnumber필수

반환 타입: Promise<CartesianTooltipEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

showTooltipAtIndex

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

typescript
showTooltipAtIndex(index: number): Promise<CartesianTooltipEventDetail | null>
인수타입필수 여부
indexnumber필수

반환 타입: Promise<CartesianTooltipEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

hideTooltip

현재 표시 중인 툴팁을 닫습니다.

typescript
hideTooltip(): Promise<void>

반환 타입: Promise<void>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
framenumber필수
binnumber필수

반환 타입: Promise<SpectrogramPointEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getValue

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

typescript
getValue(frame: number, bin: number): Promise<number | null>
인수타입필수 여부
framenumber필수
binnumber필수

반환 타입: Promise<number | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getValueExtent

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

typescript
getValueExtent(): Promise<SpectrogramValueExtent | null>

반환 타입: Promise<SpectrogramValueExtent | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getGridSize

Columns × rows of the current grid.

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

반환 타입: Promise<{ frames: number; bins: number; cells: number; dropped: number }>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getRanges

The time and frequency ranges the plane spans.

typescript
getRanges(): Promise<SpectrogramRanges>

반환 타입: Promise<SpectrogramRanges>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

appendSamples

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

typescript
appendSamples(samples: ArrayLike<number>): Promise<SpectrogramAppendSamplesResult>
인수타입필수 여부
samplesArrayLike<number>필수

반환 타입: Promise<SpectrogramAppendSamplesResult>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getFftInfo

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

typescript
getFftInfo(): Promise<SpectrogramFftInfo>

반환 타입: Promise<SpectrogramFftInfo>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
bindingVisualMapBinding | null필수

반환 타입: Promise<VisualMapBinding | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getVisualMap

비동기 메서드입니다. 아래 인수 타입과 반환 타입을 확인하세요.

typescript
getVisualMap(): Promise<VisualMapBinding | null>

반환 타입: Promise<VisualMapBinding | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
requestVisualMapExtentRequest선택

반환 타입: Promise<VisualMapExtent | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
requestCartesianZoomRequest필수

반환 타입: Promise<CartesianZoomChangeEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
factornumber필수
anchorFractionnumber선택

반환 타입: Promise<CartesianZoomChangeEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
delta{ x?: number; y?: number }필수

반환 타입: Promise<CartesianZoomChangeEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

resetZoom

확대·이동한 범위를 초기 데이터 범위로 되돌립니다.

typescript
resetZoom(): Promise<CartesianZoomChangeEventDetail | null>

반환 타입: Promise<CartesianZoomChangeEventDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

getZoom

현재 확대 범위를 읽습니다. 반환 타입의 null 허용 여부와 축별 범위를 확인하세요.

typescript
getZoom(): Promise<CartesianZoomState | null>

반환 타입: Promise<CartesianZoomState | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>
인수타입필수 여부
requestCartesianZoomExtentRequest선택

반환 타입: Promise<CartesianZoomExtentDetail | null>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

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>

반환 타입: Promise<ChartEngineStatus>. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.