Theming
Theme charts with CSS: every color is a CSS variable. Light and dark defaults follow prefers-color-scheme, or an ancestor
with data-theme="dark", Bootstrap's data-bs-theme="dark" or class dark. Use the toggle at the top to switch this site.
Your own palette
Set any token anywhere above the chart, e.g. on :root or a wrapper element.
Code
<div style="--rio-series-1: #0b6e4f; --rio-series-2: #c4721a; --rio-grid: #dfe7e2;">
<RioChart TItem="Sales" Title="Revenue per quarter">
<LineSeries Items="quarters" Name="2025" XValue="s => s.Quarter" YValue="s => s.LastYear" Format="#,0 €" />
<LineSeries Items="quarters" Name="2026" XValue="s => s.Quarter" YValue="s => s.ThisYear" Format="#,0 €" />
</RioChart>
</div>Tokens
| Variable | Used for |
|---|---|
--rio-text, --rio-text-muted | Titles and legend; axis labels. |
--rio-grid, --rio-axis | Grid lines; the baseline and crosshair. |
--rio-surface | Tooltip and slice gaps. |
--rio-annotation | Reference lines, bands and their labels. |
--rio-data-label-inverse | Labels drawn on top of bars and slices. |
--rio-data-label-dark | Labels drawn on top of light fills, such as the yellow and light funnel stages. |
--rio-positive, --rio-negative | Rising and falling candlesticks. |
--rio-series-1 … --rio-series-10 | The palette, in series order (colorblind-aware by default). |
Charts inherit the page font and use tabular numbers.
Motion
RioCharts doesn't animate charts. The only motion is a fade when the series first appear (0.35 seconds), plus brief fades when the tooltip, the buttons and the series that dim on legend hover appear.
There are no animation options: bars don't grow, lines don't draw on and pies don't sweep in. Changed data is drawn in its new place right away, and zoom, pan and live data follow the pointer and the data without delay. A transition there would show values that aren't in the data, and the chart would lag behind what you do.
When the user asks for reduced motion (prefers-reduced-motion), nothing moves. To turn motion off
yourself, set Animate="false". To change only the fade's length, set
--rio-enter-duration (0s turns it off) anywhere above the chart.
@* No motion at all *@
<RioChart TItem="Sales" Animate="false">…</RioChart>
@* A quicker fade for every chart on the page *@
<div style="--rio-enter-duration: 0.15s">…</div>