reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
Start
Overview
Start
Core Concepts
Core Concepts
Data model
Data model
Build & Operate
Production readiness
opt-charts · Charts
ChartContainer
ChartTooltip
ChartLegend
LineChart
BarChart
AreaChart
Sparkline
PieChart
ScatterChart
ComparisonChart
GaugeChart
FunnelChart
RetentionHeatmap
SankeyChart
PathFlowChart
CalendarHeatmap
WaterfallChart
BubbleChart
ComposedChart
RadarChart
RadialBarChart
Treemap
Histogram
BoxPlot
BulletChart
Heatmap
DataBar
GanttChart
Sunburst
CandlestickChart
TimeSeriesChart
TimeSeriesTooltip
LoadingChart
SmallMultiples
TraceWaterfall
VennDiagram
MetricsCard
TrendChart
EventSparkline
ReportWidget
Oopt-charts
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

Package Docs · data visualization

@reopt-ai/opt-charts

The data visualization package owns Recharts integration, chart data types, SVG analytics, and chart-specific shells. Existing opt-ui chart exports remain available for compatibility; new code imports directly from opt-charts.

1. Define the data shape

Start time-series and category comparisons with ChartDataPoint and ChartSeriesDef. Use dedicated types for funnels, gauges, and heatmaps.

2. Separate charts and shells

Use LineChart, BarChart, and PieChart for visualization. Use MetricsCard, TrendChart, and ReportWidget to compose product cards and widgets.

3. Set production requirements

Review height, aria-label, formatting, empty states, animation, and lazy loading to prevent dashboard regressions.

StartChart catalogopt-ui documentation
Analytics and data visualization developersopt-charts

Recharts-based charts, SVG visualizations, chart-specific shells, visualization metadata, and examples.

Installation and import boundariesChart catalog and specialized shellsChartContainer, Tooltip, and LegendData types for analytics Surfaces

When to use it and what to try

Build analytics views for revenue trends, channel comparisons, and cohort retention. Use lines for change over time, bars for category comparisons, and heatmaps for row-by-column distributions.

Choose the question and data shape before choosing a chart. Pair charts with opt-datagrid for editable rows, and use opt-ui or opt-shell to arrange multiple metrics on a screen.

Try the live examples

Time series and range selection

Compare multiple series and narrow the Brush range to explore a longer time series.

Actuals and targets

Compare stacked and grouped bars, target lines, and range annotations.

Build your first chart →

Slide chart examples

Register 35 chart types in opt-deck, edit matrix, graph, and cumulative-change data, and inspect the export contract.

Start

Install the package, build your first chart, understand import boundaries, and migrate from opt-ui compatibility exports.

Core Concepts

Learn the roles of visuals and shells, ChartContainer, Recharts accessibility, and token-based colors.

Data model

Explore ChartDataPoint, ChartSeriesDef, specialized chart types, formatters, empty states, and color assignment.

Production readiness

Check responsive sizing, server and client boundaries, performance, accessibility, and release smoke tests before deployment.

Production checklist

ChartContainer wraps ResponsiveContainer with role="img" by default, or role="group" in interactive mode to preserve controls.

Cartesian charts enable the Recharts accessibilityLayer. Use showGrid, showTooltip, showLegend, and showAxis to control visual density.

ReportWidget is a lightweight builder shell with dynamic imports by chart type and loading and empty labels.

seriesColor uses 16 categorical theme colors and assigns neutral colors to further series. Explicit colors take precedence; magnitude and polarity use separate color domains.

Cartesian

Compare categories, trends, and combinations using rows and series.

LineChartBarChartAreaChartComposedChartComparisonChart

Distribution

Show relationships, distributions, and outliers using coordinates and numeric samples.

ScatterChartBubbleChartHistogramBoxPlot

Composition & hierarchy

Compare proportions, multiple axes, hierarchies, and set intersections.

PieChartRadialBarChartRadarChartTreemapSunburstVennDiagram

Matrix & cohorts

Visualize matrices, cohorts, and daily intensity with dedicated data models.

HeatmapRetentionHeatmapCalendarHeatmap

Flow & contributions

Explore stage conversions, cumulative changes, and node-and-link flows.

FunnelChartWaterfallChartSankeyChartPathFlowChart

Time & intervals

Explore time series, repeated panels, schedules, trace intervals, and OHLC data.

TimeSeriesChartSmallMultiplesGanttChartTraceWaterfallCandlestickChart

Metrics & inline

Show values against ranges and targets with compact trends.

GaugeChartBulletChartDataBarSparkline

Chart shells

Compose metric cards and report widgets.

MetricsCardTrendChartEventSparklineReportWidget

Composition helpers

Compose chart frames, tooltips, legends, and loading states as supporting components, rather than standalone slide types.

ChartContainerChartTooltipChartLegendTimeSeriesTooltipLoadingChart

Import boundary

The root export includes visuals and shells. Use subpath exports when you need more explicit bundle boundaries.

import { LineChart, ChartContainer } from "@reopt-ai/opt-charts";
import type { ChartDataPoint, ChartSeriesDef } from "@reopt-ai/opt-charts";
import { LineChart } from "@reopt-ai/opt-charts/visuals";
import { ReportWidget } from "@reopt-ai/opt-charts/shells";

Relationship to opt-ui

opt-ui owns Core, Shells, and Surfaces; opt-charts owns charts. Legacy opt-ui chart exports preserve compatibility for existing consumers. Use opt-charts as the source of truth for new documentation, code, and release validation.