<style>
.finance-candles,
.finance-candles-live {
display: grid;
width: 100%;
gap: 10px;
}
.finance-candles c2-candlestick-chart,
.finance-candles-live c2-candlestick-chart {
--c2-chart--height: 310px;
}
.finance-candles-live__controls {
display: flex;
align-items: center;
gap: 12px;
color: var(--site-color-on-surface-muted);
font-size: 12px;
}
</style>
<div data-label="Default">
<c2-candlestick-chart label-field="date" data='[{"date":"Sep 22","open":248.3,"close":256.08,"low":248.12,"high":256.64},{"date":"Sep 23","open":255.88,"close":254.43,"low":253.58,"high":257.34},{"date":"Sep 24","open":255.22,"close":252.31,"low":251.04,"high":255.74},{"date":"Sep 25","open":253.21,"close":256.87,"low":252.4,"high":257.17},{"date":"Sep 26","open":254.1,"close":255.46,"low":253.05,"high":257.6}]'></c2-candlestick-chart>
</div>
<div data-label="Custom legend + tooltip" data-finance-demo>
<div class="finance-candles">
<c2-candlestick-chart id="candles-aapl" name="AAPL" label-field="date" data='[{"date":"Sep 22","open":248.3,"close":256.08,"low":248.12,"high":256.64},{"date":"Sep 23","open":255.88,"close":254.43,"low":253.58,"high":257.34},{"date":"Sep 24","open":255.22,"close":252.31,"low":251.04,"high":255.74},{"date":"Sep 25","open":253.21,"close":256.87,"low":252.4,"high":257.17},{"date":"Sep 26","open":254.1,"close":255.46,"low":253.05,"high":257.6}]'></c2-candlestick-chart>
<c2-chart-legend for="candles-aapl"></c2-chart-legend>
<c2-chart-tooltip for="candles-aapl"></c2-chart-tooltip>
</div>
</div>
<div data-label="Realtime replay" data-advanced-realtime>
<div class="finance-candles-live">
<c2-candlestick-chart name="AAPL" label-field="date" data='[{"date":"Sep 22","open":248.3,"close":256.08,"low":248.12,"high":256.64}]'></c2-candlestick-chart>
<div class="finance-candles-live__controls">
<c2-button size="sm">Replay</c2-button>
<span data-advanced-status>Sep 22 · $256.08</span>
</div>
</div>
</div>