Skip to main content

EcgStripViewer

Renders chronological ECG samples as a paged, scrollable strip. samples are millivolts and sampleRate is samples per second.

<EcgStripViewer
samples={recording.samplesMv}
sampleRate={recording.sampleRate}
onPageChange={(page, pageCount) => setPage({ page, pageCount })}
/>

Props​

  • samples: readonly number[] — chronological millivolt samples.
  • sampleRate: number — samples per second.
  • speed?: number — paper speed in mm/s; defaults to 25.
  • gain?: number — gain in mm/mV; defaults to 10.
  • pageDurationSeconds?: number — page duration; defaults to 30.
  • initialPage?: number — zero-based initial page.
  • onPageChange?: (page: number, pageCount: number) => void.
  • testID?: string.
  • theme? and slots? — shared OvokUiProps.

Sample rate and page duration are clamped to positive values. The SVG path is down-sampled to at most 5,000 points per page. This component displays a waveform; it does not interpret rhythm, diagnose, validate units, or localize its built-in labels. The current page state is not reset when samples, sample rate, or page duration changes; remount the viewer or change its React key when replacing the recording and the page should start from the beginning.