Chart
proChart wraps Recharts with product tokens for dashboard series, tooltips, legends, and custom compositions.
Qualified opportunities and closed-won accounts by month.
Installation
Add this component with the NateUI CLI.
Examples
Line Chart
Reply and resolution counts over the last six weeks.
Area Chart
API requests and dashboard sessions for the current week.
Advanced Gradient
Bar Chart
Horizontal bars keep longer queue labels readable.
Pie Chart
Channel share for the current reporting period.
| Organic | 420 |
| Referral | 260 |
| Paid | 180 |
| Partners | 140 |
Donut With Content
Center content keeps the total anchored while slices show distribution.
Radar Chart
Legend
The legend reads the same series colors that the chart uses.
Tooltip Formatting
Tooltip labels and values are formatted at the chart boundary.
Custom Tooltip
Custom tooltip content can read the full row payload.
Colors
Custom fills keep the chart aligned to an external palette.
Custom And Compose
Compose bars, an area mark, and a reference line in the same surface.
API
The chart exports are thin wrappers over Recharts. Recharts-owned objects such as axis props, grid props, series props, and tooltip props follow Recharts' own API; the NateUI layer supplies the product defaults and common wrapper props below.
Shared Chart Props
LineChart, AreaChart, BarChart, PieChart, and RadarChart all receive
data and sizing through the shared chart props. Cartesian charts also receive
x/y axis props; polar charts use their own axis props.
| Prop | Description | Type | Default |
|---|---|---|---|
data | Records passed to the underlying Recharts chart. | ChartDatum[] | [] |
height | Pixel height applied to the responsive chart container. | number | 300 |
width | Pixel width applied to the chart container; omit for fluid width. | number | - |
xAxisConfig | Props forwarded to Recharts XAxis. | XAxisProps | {} |
yAxisConfig | Props forwarded to Recharts YAxis. | YAxisProps | {} |
tooltipConfig | Props forwarded to Recharts Tooltip. | TooltipProps<ValueType, NameType> | {} |
tooltipContentConfig | Props forwarded to NateUI's default tooltip content. | ChartTooltipContentConfig | - |
chartHorizontalSpace | Left and right margin passed to the Recharts chart. | number | 20 |
chartVerticalSpace | Top and bottom margin passed to the Recharts chart. | number | 10 |
children | Extra Recharts children, or a render function receiving defaultChartConfig. | ChartChildren | - |
Chart Components
| Component | Prop | Description | Type | Default |
|---|---|---|---|---|
LineChart | lineConfig | Series config for each rendered Line. | LineSeriesConfig[] | [] |
LineChart | cartesianGridConfig | Props forwarded to CartesianGrid. | CartesianGridProps | {} |
AreaChart | areaConfig | Series config for each rendered Area. | AreaSeriesConfig[] | [] |
AreaChart | cartesianGridConfig | Props forwarded to CartesianGrid. | CartesianGridProps | {} |
BarChart | barConfig | Series config for each rendered Bar. | BarSeriesConfig[] | [] |
BarChart | layout | Direction used by Recharts for horizontal or vertical bars. | BarLayout | - |
BarChart | stackOffset | Recharts stack offset behavior for stacked bars. | StackOffset | - |
BarChart | cartesianGridConfig | Props forwarded to CartesianGrid. | CartesianGridProps | {} |
PieChart | pieConfig | Props forwarded to the rendered Pie, excluding its data. | PieSeriesConfig | {} |
PieChart | cellConfig | Per-slice SVG props applied to each generated sector and its chart data entry. | CellConfig[] | [] |
PieChart | pieContent | Extra React node rendered inside the Pie, such as Recharts labels. | ReactNode | - |
RadarChart | radarConfig | Series config for each rendered Radar. | RadarSeriesConfig[] | [] |
RadarChart | angleAxisConfig | Props forwarded to PolarAngleAxis. | PolarAngleAxisProps | {} |
Helpers
| Component | Prop | Description | Type | Default |
|---|---|---|---|---|
ChartContainer | children | The Recharts element rendered inside ResponsiveContainer. | ReactElement | Required |
ChartContainer | height | Pixel height for the container. | number | 300 |
ChartContainer | width | Pixel width for the container; omit for fluid width. | number | '100%' |
ChartContainer | className | Classes merged onto the wrapper that owns chart reset styles. | string | - |
ChartContainer | style | Inline styles merged with the computed chart dimensions. | CSSProperties | - |
ChartTooltipContent | hideLabel | Hide the tooltip's top label row. | boolean | false |
ChartTooltipContent | hideIndicator | Hide each series color indicator. | boolean | false |
ChartTooltipContent | nameFormatter | Format the displayed series name. | ChartNameFormatter | - |
ChartTooltipContent | valueFormatter | Format the displayed series value. | ChartValueFormatter | - |
ChartTooltipContent | labelClassName | Classes merged onto the tooltip label. | string | - |
ChartTooltipContent | customContent | Replace the default tooltip body with custom rendered content. | ChartCustomContent | - |
ChartLegendContent | customContent | Replace the generated legend items with custom rendered content. | ChartLegendRenderer | - |
ChartLegendContent | verticalAlign | Legend alignment forwarded to Recharts and used for spacing. | 'top' | 'bottom' | 'bottom' |
ChartLegendContent | className | Classes merged onto the custom legend wrapper. | string | - |