ChartErrorBoundary
ChartErrorBoundary, ChartErrorBoundaryProps: generated from the source of active-charts.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Chart Error Boundary#
Props
- Type
ReactNode
- Type
(error) => ReactNode ReactNode
Custom fallback to render instead of the default SVG message.
- Type
number
Height of the fallback SVG. Default: 200.
- Type
unknown
When this value changes, the error state is cleared and children are re-rendered. Pass data identity (e.g. data reference or data.) to auto-recover after data changes.
- Type
ChartTranslate Fn
The host translator for the default fallback. When omitted, <Chart supplies it; the default fallback without either throws a configuration error (no English copy, ADR-028). A custom fallback needs neither.
- Type
number
Width of the fallback SVG. When omitted, fills parent via 100%.
Events
Called by the component when something happens.
Takes only the props listed.
Types#
The props of Chart, each described in its prop list on this page.
interface ChartErrorBoundaryProps {
children: ReactNode;
width?: number;
height?: number;
fallback?: ReactNode | ((error: Error) => ReactNode);
onError?: (error: Error, errorInfo: ErrorInfo) => void;
resetKey?: unknown;
t?: ChartTranslateFn;
}