@reopt-ai/opt-charts
v1.1.0
Published
Data visualization components for Reopt interfaces. Recharts adapters, SVG visualizations, chart frames, and chart-specific shells.
Maintainers
Readme
@reopt-ai/opt-charts
Chart primitives, chart-specific shells, and metadata for the reopt design
system. @reopt-ai/opt-ui/visuals keeps legacy compatibility re-exports, but
new chart work should import this package directly.
Install
bun add @reopt-ai/opt-charts rechartsreact and react-dom are peer dependencies. recharts is a peer so product
apps can control the visualization runtime version.
Exports
| Export | Purpose |
| ------------------------------ | --------------------------------------- |
| @reopt-ai/opt-charts | All chart components, shells, and types |
| @reopt-ai/opt-charts/visuals | Low-level chart visuals |
| @reopt-ai/opt-charts/shells | Product-ready chart shells |
| @reopt-ai/opt-charts/meta | Component metadata for docs and tooling |
Example
import { LineChart } from "@reopt-ai/opt-charts";
export function RevenueTrend() {
return (
<LineChart
data={[
{ month: "Jan", revenue: 120 },
{ month: "Feb", revenue: 164 },
]}
xKey="month"
yKey="revenue"
/>
);
}Development
bun run --filter @reopt-ai/opt-charts lint
bun run --filter @reopt-ai/opt-charts typecheck
bun run --filter @reopt-ai/opt-charts test
bun run --filter @reopt-ai/opt-charts buildThe package emits ESM, CJS, and type declarations under dist/.
