# Candlestick Chart

Source: https://lumeo.nativ.sh/components/charts/candlestick

# Candlestick Chart

Display financial OHLC (Open, High, Low, Close) data. Essential for stock market analysis and price movement visualization.

## Installation

.NET CLI PackageReference Lumeo CLI

dotnet add package Lumeo.Charts

One-time app setup (`AddLumeo()`, CSS & JS) is covered in the [installation guide](docs/introduction).

## Usage

@using Lumeo

<CandlestickChart />

Preview Code

Stock Price Candlestick

Preview Code

Loading state

Simulate loading

Hold skeleton open

Duration: 2s 

Cycle: 1400 ms 

Shape-aware skeleton with reserved space for legend and axes — no layout shift when real data arrives.

## API Reference

### CandlestickChart

Property

Type

Default

Description

Categories

List<string>

\[\]

X-axis date/time labels.

Data

List<double\[\]>

\[\]

OHLC data as \[open, close, low, high\] arrays.

DataZoom

bool

false

Enables zoom slider for scrolling through data.

LabelStrategy

ChartLabelStrategy

Smart

How category-axis labels are rendered. Smart auto-rotates at higher densities; ShowAll forces all horizontal; Auto thins overlapping labels.

LabelRotate

int?

null

Manual rotation override in degrees on top of LabelStrategy.

IsLoading

bool

false

When true, renders a shape-matched loading skeleton in place of the chart. Bind to your async fetch state.

ShowLoadingSkeleton

bool

true

Set to false to opt out of the skeleton (chart area stays empty while IsLoading is true).

SkeletonKind

ChartSkeletonKind

(chart default)

Override the skeleton silhouette (Bars, Line, Area, Pie, Scatter, Grid, Generic).

SkeletonStyle

ChartSkeletonStyle

Phantom

Phantom renders the real chart with placeholder data and morphs to real data via ECharts animation. Silhouette falls back to the legacy SVG skeleton overlay.

ShowLoadingLabel

bool

true

Shows a small "Loading…" pill in the top-right corner whenever `IsLoading` is true. Layered on top of any `SkeletonStyle`. Set to false for bare visuals. **(rc.18)**

LoadingText

string?

"Loading…"

Label rendered next to the spinner inside the loading pill. Set to empty to show the spinner alone. **(rc.18)**

ShowLegend

bool

true

Shows or hides the candlestick chart legend.

ShowTooltip

bool

true

Shows the hover tooltip with OHLC values.

Colors

List<string>?

null

Custom up/down candle colors overriding the theme defaults.

Width

string

"100%"

CSS width of the chart container.

Height

string

"350px"

CSS height of the chart container.

Theme

string?

null

ECharts theme name to apply to this chart instance.

PhantomCycleMs

int

1400

Phantom-mode refresh interval in milliseconds while loading.

ShowDataLabels

bool

false

Displays per-candle data labels on the chart.

LabelPosition

string

"top"

Position of data labels relative to each candle.

LabelFormat

string?

null

ECharts label format template for data labels.

Toolbox

bool

false

Shows the ECharts toolbox with save-as-image controls.

ColorPalette

List<string>?

null

Color palette applied to series across the chart.

AnimationDuration

int?

null

Entry animation duration in milliseconds for the chart.

AnimationEasing

string?

null

ECharts easing function name used during chart animations.

MarkLine

EChartMarkLine?

null

Optional reference lines overlaid on the candlestick chart.

MarkPoint

EChartMarkPoint?

null

Optional annotation points highlighted on the candlestick chart.

MarkArea

EChartMarkArea?

null

Optional highlighted regions overlaid on the candlestick chart.
