Skip to main content

Function: waveformPath()

function waveformPath(data, options): string;

Defined in: display.ts:518

Builds an SVG path (d attribute) for a waveform, usable with react-native-svg's <Path d={…} /> or Skia's Skia.Path.MakeFromSVGString.

Pass normalized values (0…1) for a waveform mirrored around the center line, or a normalized signed envelope (resampleMinMax + normalizeMinMax) for an asymmetric one.

Parameters​

ParameterType
dataArrayLike<number> | MinMax
optionsWaveformPathOptions

Returns​

string