Coming from Blazor-ApexCharts

Moving from Blazor-ApexCharts to RioCharts? Both libraries have the same creator, and most of it will feel familiar: items with XValue and YValue selectors, YAggregate, series as child components. This page maps the main concepts.

Set your expectations. Blazor-ApexCharts is production ready and battle-proven, built on a mature JavaScript library used by many apps. RioCharts is a 1.0 release candidate: new, with its API frozen for 1.0. It is not trying to match Blazor-ApexCharts feature for feature; it is a different approach (layout in .NET, typed parameters, the same chart on the server and from JSON), so some features you rely on may never be here.

The main difference

Blazor-ApexCharts wraps the ApexCharts JavaScript library: your options go to JavaScript, which lays out and draws the chart. RioCharts lays out the chart in .NET and renders SVG through Blazor; a small JS module only measures text and handles the pointer. So there is no options object to send: the chart is configured with typed parameters, a change to a parameter or to Items draws the chart again, and the same layout renders on the server (PNG/SVG export) and from JSON definitions.

Side by side

Order value per country, summed, as bars.

Razor
@* Blazor-ApexCharts *@
<ApexChart TItem="Order" Title="Order value">
    <ApexPointSeries TItem="Order" Items="orders" Name="Value" SeriesType="SeriesType.Bar"
                     XValue="o => o.Country" YAggregate="g => g.Sum(o => o.Value)" />
</ApexChart>
Razor
@* RioCharts *@
<RioChart TItem="Order" Items="orders" Title="Order value">
    <BarSeries Name="Value" XValue="o => o.Country" YAggregate="g => g.Sum(o => o.Value)" />
</RioChart>

Concepts

Blazor-ApexChartsRioCharts
AddApexCharts(o => o.GlobalOptions = ...), IApexChartServiceOptional: builder.Services.AddRioCharts(new RioChartDefaults { Culture = ..., Height = ... }) for app-wide defaults; a cascaded RioChartDefaults for part of the app, or to change them at runtime (the charts follow). Theme switches need no call: colors follow the page's theme. See Getting started.
<ApexChart TItem Title Height><RioChart TItem Title Height>; the width follows the container.
<ApexPointSeries SeriesType="SeriesType.Bar">One component per type: LineSeries, AreaSeries, BarSeries, ScatterSeries, PieSeries, DonutSeries, RadialBarSeries, RadarSeries, HeatmapSeries, TreemapSeries.
XValue, YValue, YAggregateThe same names. Common aggregates also as Aggregate="Aggregate.Sum" (Average, Min, Max, Count, Last).
OrderBy, OrderByDescendingSort Items with LINQ; categories keep the order of the items.
PointColorColorValue, plus ColorBands to color by value (a line turns red above a limit).
Data labels in the optionsDataLabels="true" on the series.
Range, candle and box plot seriesRangeAreaSeries (LowValue and YValue), CandlestickSeries (OpenValue, HighValue, LowValue, CloseValue, or raw readings with Bucket), BoxPlotSeries (raw values, or Q1Value, MedianValue, ...).
X and y axis options, several y axesXAxis, YAxis and YAxes (AxisOptions), and YAxisId on the series.
Annotations in the optionsChild components: ReferenceLine, ReferenceBand, PointAnnotation, Callout; a reference line can be dragged (@bind-Value).
Curve in the stroke optionsCurve="CurveType.Monotone" (or Step) on the series.
Stacking in the chart optionsStack="name" on each series to stack; Stacking = StackMode.Percent on the y axis for 100 % stacked.
ApexChartOptions plus the series, built in codeA chart definition (ChartDefinition): the whole chart in one object, series and their fields included, passed as <RioChart Definition>. Its parts are options: AxisOptions, SeriesOptions, LegendOptions, TooltipOptions.
Tooltip options, custom tooltipTooltip (TooltipOptions), TooltipValue per series, or a TooltipTemplate with your own Razor.
Chart group (synced charts)Group="name": shared crosshair and zoom, and the plots line up.
Zoom and the toolbarZoomable="true" (drag, pinch, Ctrl+wheel, keyboard), Exportable="true" for PNG, SVG and CSV downloads.
Colors and theme modeCSS variables (--rio-series-1 ... , --rio-text, ...); light and dark follow the page. See Theming.
AnimationsNone: RioCharts does not animate charts. Bars don't grow, lines don't draw on, and updates are drawn in place. The only motion is a short fade when the series first appear (Animate="false" turns it off). See Motion.
Data point selection eventOnPointClick, or Selection="ChartSelectionMode.Points" with @bind-SelectedItems (and ChartSelectionMode.Range).
Legend click eventOnLegendClick, and OnLegendClicking to cancel.
Zoomed event@bind-VisibleRange or OnZoomChanging.
Updating series, rendering againNot needed: pass a new Items list, or change DataVersion after changing a list in place. For live data, append to a SeriesBuffer.
Zooming, showing and hiding series from codeZoomToAsync, ResetZoomAsync, ShowSeriesAsync, HideSeriesAsync, ToggleSeriesAsync, HighlightSeriesAsync.

What else is different

  • Series render nothing themselves; the chart lays them out together. Selectors run once per data change, not per render.
  • Large data is downsampled (LTTB) and can draw on a canvas layer (SeriesLayer="SeriesLayer.Canvas"); see Large data.
  • The same chart renders without a browser: server-side export to SVG and PNG, and static SSR as plain SVG.
  • A chart definition can also be written as JSON, which is how AI agents create charts; see Chart definitions.
  • The chart's own texts (empty states, screen reader texts) come in eight languages; see Languages and texts.
An unhandled error has occurred. Reload 🗙