MiHCM
data/@mihcm/ui·v0.21.0·stable

Chart

Theme-aware Recharts wrapper. ChartContainer injects CSS custom properties from a ChartConfig while preserving the full Recharts composition and prop surface.

Props

The full prop API for Chart. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.

PropTypeDefaultDescriptionSince
configChartConfigMaps data keys to labels, colors, and optional icons. Required on ChartContainer.0.6.0
initialDimension{ width: number; height: number }{ width: 320, height: 200 }Server-safe initial size forwarded to Recharts ResponsiveContainer.0.8.2
indicator'dot' | 'line' | 'dashed''dot'Tooltip indicator style. On ChartTooltipContent.0.6.0
hideLabelbooleanfalseHides the tooltip label row. On ChartTooltipContent.0.6.0
hideIndicatorbooleanfalseHides the color indicator dot/line. On ChartTooltipContent.0.6.0
nameKeystringConfig key used by tooltip or legend content for labels.0.6.0
labelKeystringPayload/config key used for tooltip label resolution.0.6.0
formatterDefaultTooltipContentProps["formatter"]Recharts tooltip formatter passthrough. On ChartTooltipContent.0.8.2
hideIconbooleanfalseHides legend marker icons. On ChartLegendContent.0.8.2
Recharts propsRecharts component propsAll chart root, axis, grid, series, reference, brush, sync, animation, formatter, hook, and event props stay on Recharts primitives composed inside ChartContainer.0.8.2
classNamestringAdditional Tailwind classes.0.6.0

Upstream library

This component intentionally keeps the MiHCM API small while preserving the supported upstream behavior listed below. Use these links when you need the full underlying option surface.

  • Recharts APIChartContainer is a theme shell; chart roots, axes, grids, sync, events, animation, and series props stay on Recharts primitives.

Import

import { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, type ChartConfig } from '@mihcm/ui/Chart';