Error bars
Error bars show how certain a value is: a standard deviation around an average, or the interval a measurement falls in. Bar, line and scatter series draw them, as a line from the low end to the high end with a short cap at each.
Plus or minus an amount
ErrorValue gives each item's plus-or-minus amount, e.g. a standard deviation; Error gives one amount
for every point. Items combined into one point (Aggregate) take the average amount. The axis makes room for the
bars, and the tooltip shows "74 ± 6". On bars the error bar is drawn in the text color so it stands out; on lines and points
it takes the series color.
Code
<RioChart TItem="Score" Title="Test scores">
<BarSeries Name="2025" Items="scores2025" XValue="s => s.Class" YValue="s => s.Mean" ErrorValue="s => s.Sd" />
<BarSeries Name="2026" Items="scores2026" XValue="s => s.Class" YValue="s => s.Mean" ErrorValue="s => s.Sd" />
</RioChart>
@code {
record Score(string Class, double Mean, double Sd);
}A low and a high end
When the interval is not the same both ways, give its ends with ErrorLowValue and ErrorHighValue
(values, not distances). Here a median response time with the range most requests fall in, which reaches further up than
down. Combined items take the lowest low and the highest high. Stacked bars carry their error bars at the top of their
segment; bars stacked to 100 % draw none.
Code
<RioChart TItem="Day" Items="days" Title="Response time">
<LineSeries Name="Median" XValue="d => d.Date" YValue="d => d.Median"
ErrorLowValue="d => d.Fast" ErrorHighValue="d => d.Slow" Format="0 ms" />
</RioChart>
@code {
record Day(DateOnly Date, double Median, double Fast, double Slow);
}In JSON definitions
On bar, line and scatter series: "errorField" with each row's plus-or-minus amount, "errorLow" and
"errorHigh" with the ends, or "error" with one amount for every point.
{ "dataset": "scores", "series": [ { "type": "bar", "x": "class", "y": "mean", "errorField": "sd" } ] }