ChartDefaults
ChartDefaults, ChartDefaultsProps, ChartDefaultsValue: generated from the source of active-charts.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Chart Defaults#
Props
- Type
ReactNode
- Type
AccessibilityOptions
- Type
FeatureOption<Animation Options>
- Type
ChartDiagnostic Sink
Where every chart below delivers its diagnostics (input a chart cannot draw, options without effect, a failed menu export). Replaced whole by a nearer provider. Without one, warnings and errors go to the console and debug notices are dropped.
- Type
ChartExport Fonts
The host's export fonts for every chart below: the PNG, SVG and PDF exports of the handle and of the context menu use them. An explicit fonts on an export call wins; fonts: 'inherit' skips this set for one call. A nested provider replaces the set as a whole. Live rendering never reads it.
- Type
ValuePresentation
- Type
ChartTranslate Fn
- Type
FeatureOption<Tooltip Options>
Takes only the props listed.
Types#
The props of Chart, each described in its prop list on this page.
interface ChartDefaultsProps extends ChartDefaultsValue {
children: ReactNode;
}App-wide default values for every chart rendered below this provider.
Any prop set on an individual chart takes precedence — this context only fills in values the consumer left unset. All fields are optional, with two ownership rules: locale is the presentation and t the translator of every chart below, and a chart with neither the prop nor the Chart value throws a configuration error (there is no 'en' fallback, active-format D14, and no English copy, ADR-028).
It carries no visual configuration: the palette, surfaces and text come from the host's CSS tokens, never from this provider.
interface ChartDefaultsValue {
locale?: ChartPresentation;
t?: ChartTranslateFn;
accessibility?: AccessibilityOptions;
tooltip?: FeatureOption<TooltipOptions>;
contextMenu?: FeatureOption<Omit<ChartContextMenuOptions, 'items'>>;
animation?: FeatureOption<AnimationOptions>;
exportFonts?: ChartExportFonts;
diagnostics?: ChartDiagnosticSink;
}