Setting the file. One moment.
Subchapter 1.31
references/series-styles.mdMarkdown998 BView on GitHub
Override visual properties for individual series by name. Useful for making reference series visually distinct from primary data.
seriesStyles: Record<string, SeriesStyle> on the chart spec. Field shape: SeriesStyle in index.d.ts (lineStyle, showPoints, strokeWidth, opacity).
Series names are the values of the color encoding field. Only specified series get overrides; others render normally.
Show “Fed funds rate” as a dashed reference line alongside solid CPI data:
{
"seriesStyles"
| Pattern | Use case |
|---|---|
"lineStyle": "dashed" | Benchmark / reference series |
"opacity": 0.4 | Context series that shouldn’t dominate |
"showPoints": true | Sparse series where individual values matter |
"strokeWidth": 3 | Hero series to emphasize |