Skip to main content

Common Examples

The Chart component renders an ECharts option with Anvil2 styling. Native charts require explicit dimensions because they do not have a CSS container to fill.Set accessibilityLabel to describe the chart for VoiceOver and TalkBack. The drawing surface does not expose accessible children.Chart defaults to appearance="light" and variant="monochrome". Set appearance to match the surrounding theme.

Tooltips

Pass renderTooltip to provide tooltip content. The chart controls placement and keeps the tooltip within the plot.
Omit renderTooltip when the chart does not need a tooltip. Format each value for its product context.

Palette utilities

Use variant when colors follow the palette’s index order. The variant applies fills, borders, patterns, markers, corner treatments, and hover behavior.
Use chartPalette when an option needs a specific palette entry. chartStepItemStyle converts monochrome and semantic steps into ECharts itemStyle values.
Consumer-defined itemStyle values override variant styling.
Last modified on August 20, 2026