DemosStep line

Step line

import { Chart } from '@tradecanvas/chart'

const chart = new Chart(document.getElementById('chart')!, {
  theme: 'light',
  chartType: 'stepLine',
})
chart.setData(bars)          // OHLCV bars, oldest first
chart.setChartType('stepLine')  // switch at any time
import { Chart } from '@tradecanvas/chart'

const chart = new Chart(document.getElementById('chart')!, {
  theme: 'dark',
  chartType: 'stepLine',
})
chart.setData(bars)          // OHLCV bars, oldest first
chart.setChartType('stepLine')  // switch at any time

● Simulated market data, generated in your browser

A staircase: each value holds flat until the next one.

API: chartType: 'stepLine'

When to use it

What it shows
Values that change in steps and stay put between them: rates, limits, published prices.
Keep in mind
It implies nothing happened between steps, which is wrong for a traded price.
Who reaches for it
Rates, policy and reference-price charts; settlement prices.

Switch the chart above between types of the same family; each keeps this market.