Baseline
Code
Read the docs →import { Chart } from '@tradecanvas/chart'
const chart = new Chart(document.getElementById('chart')!, {
theme: 'light',
chartType: 'baseline',
})
chart.setData(bars) // OHLCV bars, oldest first
chart.setChartType('baseline') // switch at any timeimport { Chart } from '@tradecanvas/chart'
const chart = new Chart(document.getElementById('chart')!, {
theme: 'dark',
chartType: 'baseline',
})
chart.setData(bars) // OHLCV bars, oldest first
chart.setChartType('baseline') // switch at any time● Simulated market data, generated in your browser
The line coloured above and below a price you choose: an entry, a prior close, a target.
API: chartType: 'baseline'
When to use it
- What it shows
- At once, how much of the time price spent in profit or loss against that level.
- Keep in mind
- The picture depends on the baseline; a moved baseline tells a different story.
- Who reaches for it
- Position holders measuring against their entry; reports against a benchmark level.
Switch the chart above between types of the same family; each keeps this market.







