variant="categorical": the Anvil2 line variable order follows that palette, and the pale patterned monochrome steps are fill treatments that a stroke cannot carry. Limit a line chart to six series, which matches the marker shape sequence and the Anvil2 clarity guidance.
- Design rules: Line charts
- Shared API / tooltips / palettes: Chart component
Minimal option
Define structure and data in the option. Colors and markers come fromvariant.
Variant styling
variant applies the following treatment:
Pass
variant="categorical" rather than authoring symbol or symbolSize lists. Avoid variant="monochrome" on a line chart, because the pale upper steps lose contrast against a light surface.
Dotted and dashed strokes
A solid stroke represents actual values, and a dotted or dashed stroke represents a target, forecast, or comparison. Keepvariant="categorical" for color and set lineStyle.type to "dotted" or "dashed" on the series that needs it. A consumer-defined lineStyle merges with the variant’s stroke color.
Tooltips
PassrenderTooltip to add tooltip content. See Chart component. A line with markers reports the single point under the pointer, and a line without markers reports the whole category.