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.

Chart "Revenue per quarter" with 2 series. 2025: 4 values, lowest 182,000 € at Q1, highest 271,000 € at Q4. 2026: 4 values, lowest 214,000 € at Q1, highest 305,000 € at Q4. Revenue per quarter150k200k250k300k350kQ1Q2Q3Q420252026Use Left and Right to move between points, Up and Down to change series. Press Escape to leave.
Code
Razor
<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

VariableUsed for
--rio-text, --rio-text-mutedTitles and legend; axis labels.
--rio-grid, --rio-axisGrid lines; the baseline and crosshair.
--rio-surfaceTooltip and slice gaps.
--rio-annotationReference lines, bands and their labels.
--rio-data-label-inverseLabels drawn on top of bars and slices.
--rio-data-label-darkLabels drawn on top of light fills, such as the yellow and light funnel stages.
--rio-positive, --rio-negativeRising and falling candlesticks.
--rio-series-1 … --rio-series-10The 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.

Razor
@* 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>
An unhandled error has occurred. Reload 🗙