Exciting Update: Version 1.0.0 is now available, introducing high-performance technical indicators and custom drawing tools. Read more
Version: 1.0.0

Price Formatting

Price formatters control how numerical axis tags and price status texts are represented on screen.

Formatting Rules

The chart engine uses standard decimal formatting (such as price.toFixed(2)) inside price scales and indicators. For custom formats (e.g. currency symbols or percentage units), the formatter can wrap coordinate queries:

// Price formatting fallback in Y-axis
const fmt = (v) => v !== undefined && v !== null ? '$' + v.toFixed(2) : '—';

Status Line OHLC

The status line drawn in the top-left area dynamically queries the active bar values (queried under the mouse position if hovering, or the last available bar) and outputs formatted values:

// Dynamic calculation of change percentage
const change = (activeBar.close - activeBar.open);
const changePct = (change / activeBar.open * 100);
const sign = change >= 0 ? '+' : '';
const changeText = `${sign}${change.toFixed(2)} (${sign}${changePct.toFixed(2)}%)`;

// Status line output renders:
// BTCUSD · 30m  O 25000.00  H 25100.00  L 24900.00  C 25050.00  +50.00 (+0.20%)