Table of Contents

Class BOBCandlestickChart<TX>

Namespace
BlazOrbit.Charts.Components
Assembly
BlazOrbit.Charts.dll

Candlestick / OHLC chart for financial time series. Each BOBChartCandlePoint<TX> renders as a vertical wick from Low to High with a body spanning Open to Close. Bullish bars (Close ≥ Open) use UpColor; bearish bars use DownColor. Set ShowVolumePane to overlay a volume bar pane on the bottom 20% of the plot, sharing the X axis.

public class BOBCandlestickChart<TX> : BOBChartBase<TX, double>, IDataVisualizationFamilyComponent, IHasAxes where TX : notnull

Type Parameters

TX

X-axis type (DateTime / int / etc).

Inheritance
object
ComponentBase
BOBChartBase<TX, double>
BOBCandlestickChart<TX>
Implements
Inherited Members

Constructors

BOBCandlestickChart()

public BOBCandlestickChart()

Properties

BodyRatio

Body width fraction (0..1) of the per-candle band. Default 0.7.

[Parameter]
public double BodyRatio { get; set; }

Property Value

double

Candles

The OHLC data, in plot order (oldest first).

[Parameter]
public IEnumerable<BOBChartCandlePoint<TX>>? Candles { get; set; }

Property Value

IEnumerable<BOBChartCandlePoint<TX>>

DownColor

Bearish (Close < Open) candle color. Default red.

[Parameter]
public string DownColor { get; set; }

Property Value

string

ReferenceLines

Optional moving averages drawn on top of the candles (label, window, color). Useful for SMA / EMA overlays.

[Parameter]
public IEnumerable<BOBChartReferenceLine>? ReferenceLines { get; set; }

Property Value

IEnumerable<BOBChartReferenceLine>

ShowVolumePane

When true, the bottom 20% of the plot is reserved for a volume bar pane (one bar per candle, colored by direction). The Y axis labels apply to the price pane only. Default false.

[Parameter]
public bool ShowVolumePane { get; set; }

Property Value

bool

UpColor

Bullish (Close ≥ Open) candle color. Default green.

[Parameter]
public string UpColor { get; set; }

Property Value

string

XAxis

Configuration for the horizontal axis.

[Parameter]
public BOBChartAxis XAxis { get; set; }

Property Value

BOBChartAxis

YAxis

Configuration for the vertical axis.

[Parameter]
public BOBChartAxis YAxis { get; set; }

Property Value

BOBChartAxis

Methods

BuildAriaLabel()

Default ARIA label for the chart's <svg> root. Subclasses override to inject series / value summaries (improves screen-reader experience).

protected override string BuildAriaLabel()

Returns

string

RenderSvg(RenderTreeBuilder)

Concrete charts override this to emit SVG content. The supplied builder is positioned inside the <svg> root, so implementations only need to add geometry primitives (lines, paths, rects, text). Sequence numbers must remain unique within the override.

protected override void RenderSvg(RenderTreeBuilder builder)

Parameters

builder RenderTreeBuilder

Render tree builder positioned inside the SVG root.