Resolution Comparison

A single-axis slider that scrubs sampling rate from 1 Hz to 8 kHz, simultaneously animating a time-domain waveform panel and a frequency-domain health-analysis panel. At 1 Hz, the waveform is sparse dots and the health analysis reads “NO HEALTH DATA.” At 8 kHz, the full waveform appears with a computed H5 / H7 health ratio revealing degradation.

Argument carried by this visualization: the insight is the user’s own discovery. They drag the slider, they see diagnostic capability appear. It’s the product demo in one interaction.

When to use

When NOT to use

Prop contract

Source: www/client/src/components/visualizations/ResolutionComparison.tsx

Prop Type Default Purpose
width number (px) 640 Max canvas width. Auto-shrinks below this if container is narrower.
height number (px) 320 Canvas height. Fixed; does not scale responsively.
className string undefined Pass-through for container styling
bareFrame boolean false When true, suppresses internal chrome so the component can be wrapped by <CanvasFrame>. See below.

Framing note

ResolutionComparison currently ships with its own internal chrome (dark rounded container, padded header, caption band). When placed inside a <CanvasFrame>, this double-nests. The bareFrame prop (planned for v3.2.0 consumer release) removes internal chrome so the external frame owns the container; for standalone usage the default remains false.

Tokens consumed

Accessibility

Interaction affordance

When the viewport-entry animation completes and the user has not yet interacted, a pulsing text prompt appears above the slider: ← drag to reduce resolution →. The pulse uses durations.slow + easings.default. The prompt hides on first interaction and never returns during the session.

Anti-patterns

  1. Split-screen drag (left vs. right) — was tried in an earlier version and rejected. The single-axis slider pattern (one value, both panels respond) is the canonical interaction.
  2. Smooth dashed interpolation at low sampling rates — implies reconstruction, contradicts the “insufficient data” argument. Use faint dots only.
  3. Health-ratio annotation at every resolution — only makes sense at 8 kHz. At low resolutions, the right panel shows “NO HEALTH DATA” with explanatory text.
  4. Multiple instances on one page — the scrub draws attention; two on-page instances compete. If a page needs two sampling stories, use two different visualizations (e.g., waveform-trace + resolution-comparison).
  5. Hardcoded teal color in consumer code — per the COLORS drift that motivated v3.2.0, consumers must read from viz.trace.primary, never hardcode #0fc8c3.

Source of truth

www/client/src/components/visualizations/ResolutionComparison.tsx

Live example: /platform/signals — “Why standard monitoring misses this” section.