Candlesticks

A candlestick shows how a value moved within each period: where it started, how high and low it went, and where it ended. Prices, but also measurements: the first, highest, lowest and last temperature per hour or day.

From readings

Give CandlestickSeries the raw readings and a Bucket: the readings of each hour (or day, week, …) become one candle, in the series color: a rising period is lightly filled, a falling one solid. Three weeks of hourly candles are too narrow to see, so they merge into longer periods of the clock and calendar (6 or 12 hours, days, depending on the width) that keep the highs and lows; drag to zoom in and the hours come back.

Chart with 1 series. Outdoor: 504 values, lowest 7.8 °C at 11/9/2026 2:00 AM, highest 19.6 °C at 11/11/2026 2:00 PM, trend stable. 5101520Oct 26Nov 2Nov 9°CUse Left and Right to move between points. Plus and minus zoom, Shift with Left and Right pans, 0 shows all data. Press Escape to leave.
Code
Razor
<RioChart TItem="Reading" Items="readings" Zoomable="true">
    <CandlestickSeries Name="Outdoor" XValue="r => r.Time" YValue="r => r.Value"
                       Bucket="TimeBucket.Hour" Format="0.0 °C" />
</RioChart>

@code {
    record Reading(DateTime Time, double? Value); // every 15 minutes
}

From numbers computed elsewhere

With one item per period, pass OpenValue, HighValue, LowValue and CloseValue. For prices, DirectionColors="true" colors rising candles green and falling ones red (--rio-positive and --rio-negative) and adds the change in percent to the tooltip. It is off by default: red and green read as good and bad, and a percentage of, say, a temperature means nothing. Here a line on the same chart shows the average of each day's first and last price.

Chart with 2 series. Price: 30 values, lowest 27.2 € at 11/7/2026 12:00 AM, highest 87.7 € at 10/26/2026 12:00 AM, trend falling. Midpoint: 30 values, lowest 29.6 € at 11/7/2026 12:00 AM, highest 82.9 € at 10/23/2026 12:00 AM, trend falling. 20406080100Oct 19Oct 26Nov 2Nov 9€/MWhPriceMidpointUse Left and Right to move between points, Up and Down to change series. Press Escape to leave.
Code
Razor
<RioChart TItem="PriceDay" Items="prices">
    <CandlestickSeries Name="Price" XValue="p => p.Date" OpenValue="p => p.First" HighValue="p => p.Highest"
                       LowValue="p => p.Lowest" CloseValue="p => p.Last" Format="0.0 €" DirectionColors="true" />
    <LineSeries Name="Midpoint" XValue="p => p.Date" YValue="p => (p.First + p.Last) / 2" />
</RioChart>

In JSON definitions

"type": "candlestick" (also "ohlc", "candle") with a time x, y and a timeBucket makes candles from the rows' y values per bucket (a day when not set). With open, high and low, each row is a candle and y its close. "directionColors": true colors candles by direction.

An unhandled error has occurred. Reload 🗙