Skip to main content

EcgStripViewer

EcgStripViewer renders chronological ECG samples in a scrollable strip with page controls. Pass the samples in millivolts and the sampling rate in samples per second. It is a presentation component; your app extracts and validates the ECG data before rendering.

Import it from @ovok/native/ui.

import { EcgStripViewer } from "@ovok/native/ui";

<EcgStripViewer
samples={recording.samplesMv}
sampleRate={recording.sampleRate}
pageDurationSeconds={10}
onPageChange={(page, pageCount) => {
setVisiblePage({ page, pageCount });
}}
/>;

Props​

PropDefaultPurpose
samples—Read-only chronological ECG samples in millivolts.
sampleRate—Samples per second.
speed25 mm/sPaper speed used to lay out the trace.
gain10 mm/mVVertical gain for the trace.
pageDurationSeconds30Duration shown on each page.
initialPage0Zero-based page to show initially.
onPageChange—Called with the zero-based page index and total page count.
theme and slots—Shared OvokUiProps theme and primitive overrides.
testID—Identifier for the viewer and its horizontal scroll view.

The viewer resets its page to initialPage when the samples, sample rate, page duration, or page count changes. It downsamples each SVG trace to at most 5,000 points to bound rendering work.

The component does not parse a Bluetooth result, diagnose a rhythm, or validate sample units. Keep data decoding and clinical interpretation in app and clinical code; pass a prepared sample array to the viewer.

See the Bluetooth guide for measurement delivery and the App UI guide for shared theme and slot behavior.