Line
Code
Read the docs →import { Chart } from '@tradecanvas/chart'
const chart = new Chart(document.getElementById('chart')!, {
theme: 'light',
chartType: 'line',
})
chart.setData(bars) // OHLCV bars, oldest first
chart.setChartType('line') // switch at any timeimport { Chart } from '@tradecanvas/chart'
const chart = new Chart(document.getElementById('chart')!, {
theme: 'dark',
chartType: 'line',
})
chart.setData(bars) // OHLCV bars, oldest first
chart.setChartType('line') // switch at any time● Simulated market data, generated in your browser
A line through the closes: the cleanest picture of where price has been.
API: chartType: 'line'
When to use it
- What it shows
- The overall path and the levels price kept closing at, without intrabar noise.
- Keep in mind
- Highs and lows are invisible; a spike that reversed in the bar leaves no trace.
- Who reaches for it
- Investors, long horizons, comparisons and small embedded charts.
Switch the chart above between types of the same family; each keeps this market.







