Area
Code
Read the docs →import { Chart } from '@tradecanvas/chart'
const chart = new Chart(document.getElementById('chart')!, {
theme: 'light',
chartType: 'area',
})
chart.setData(bars) // OHLCV bars, oldest first
chart.setChartType('area') // switch at any timeimport { Chart } from '@tradecanvas/chart'
const chart = new Chart(document.getElementById('chart')!, {
theme: 'dark',
chartType: 'area',
})
chart.setData(bars) // OHLCV bars, oldest first
chart.setChartType('area') // switch at any time● Simulated market data, generated in your browser
The close line with the area under it filled.
API: chartType: 'area'
When to use it
- What it shows
- The path and its magnitude at a glance; it reads well small, on a landing page or a card.
- Keep in mind
- The fill suggests a zero floor that a price chart rarely has.
- Who reaches for it
- Overview screens, portfolio values, embedded tickers.
Switch the chart above between types of the same family; each keeps this market.







