Search documentation

Search all pages, headings and text, in the current package or topic or in all documentation.

Theming

The CSS tokens a chart reads, the package defaults, and how this site uses active-ui's tokens so charts and components share one visual system.

@workspace/active-charts 6.0.0Status unknowncontent differs from the recorded release 6.0.0baseline ce081dc3

A chart has no theme prop and no provider for colour. It reads CSS custom properties from the page:

  • Chart tokens: --chart-1 to --chart-10 for series, --chart-positive, --chart-negative and --chart-caution for meaning, --chart-sequential-* and --chart-diverging-* for scales, --chart-on-fill-light and --chart-on-fill-dark for labels on a mark.
  • Semantic tokens of the host: surfaces, text, borders and focus (--background, --foreground, --popover, --border, --ring, …) for tooltips, menus, tables and focus.

When the host sets none, the package's stylesheet gives complete light and dark defaults.

On this site#

active-ui defines the chart tokens next to its other tokens, in light and dark, so every chart on this site takes its colours from the same system as the components beside it; there is no mapping file and no second palette. Switch the colour scheme of this site to see the charts follow.

Every chart familyClient

A brand of your own#

Set the tokens once in your global stylesheet, per mode. A scoped override (on a wrapper element) reaches the charts inside it only. The full list and the rules are in the API reference, § 13.

This page as Markdown