#1

Add scatter, range, and horizontal bar charts

Openoshtzwants to merge intofrom

Summary

Adds the missing Cartesian geometries needed for numeric comparisons while preserving existing chart APIs. This revision is rebased onto the current registry/CLI architecture.

  • Add ScatterChart and Scatter with numeric axes, dithered points, labels, X/Y tooltip values, nearest-point hover across every series, and selection.
  • Add RangeChart and Range for horizontal low/value/high intervals with dithered value markers and auto-domains derived only from registered range fields.
  • Add opt-in layout="horizontal" support to BarChart.
  • Preserve vertical bars as the default, including existing grouped and stacked behavior.
  • Generalize Cartesian scaling, axes, grid rendering, hit testing, and reusable dither painting for the new geometries.
  • Add exports, current-format registry entries/generated JSON, docs, mount regressions, and focused geometry tests.
  • Normalize generated registry source line endings so builds are deterministic across platforms.

Example

<ScatterChart
  data={data}
  config={config}
  xKey="cost"
  xDomain={[0, maxCost]}
  yDomain={[0, 1]}
>
  <XAxis />
  <YAxis />
  <Tooltip labelKey="model" />
  <Scatter dataKey="score" labelKey="model" radius={5} />
</ScatterChart>

<RangeChart
  data={data}
  config={config}
  categoryKey="model"
  domain={[0, 1]}
>
  <XAxis />
  <YAxis dataKey="model" />
  <Tooltip labelKey="model" />
  <Range dataKey="mean" lowKey="low" highKey="high" />
</RangeChart>

Horizontal bars use layout="horizontal", category labels on YAxis, and numeric values on XAxis.

Compatibility

Existing BarChart callers remain vertical by default. Existing grouped and stacked behavior is unchanged. No application-specific UI or SVG export changes are included.

Validation

  • npm test ? 35 Vitest component/geometry tests and 27 CLI tests passed
  • npm run build ? generated 11 registry items with 51 file references; CLI build passed
  • npx tsc --noEmit ? passed
  • Temporary Vite consumer previously verified at desktop/narrow widths in light and dark themes

Summary by Comp AI

No blocking issues found.

Written for commit 9d11218. New commits will trigger a re-review. Generated by Comp AI.

Activity

6
tripwire-dev[bot]4mo ago

passed — nothing tripped. good to merge.

ripgrim4mo ago

@oshtz Could you give some screenshots of your change?

oshtz4mo ago

@ripgrim sure (:

screenshot dark mode w/ tooltips for vis.

comp-ai-code-review[bot]4mo ago

✅ Comp AI code review complete — no issues found.

Reviewed commit 9d11218.

Posted by Comp AI Code Reviews.

comp-ai-code-review[bot]reviewed4mo ago
comp-ai-code-review[bot]4mo ago

No blocking issues found across the changed files.

Posted by Comp AI Code Reviews.