Chart
Install @bloxwap/chart and render your first financial chart.
@bloxwap/chart is Bloxwap's TypeScript library for financial charts. It renders to canvas, with built-in indicators and drawing tools, WebAssembly acceleration, and a JavaScript fallback.
Project site · Documentation · GitHub · npm
Install
npm install @bloxwap/chart0.0.1 is an early developer preview; expect breaking changes before 1.0.
Render a chart
Your app supplies the canvas and the candles. One config object describes the data and series:
// 1. Import module
import { createChart, defineConfig } from '@bloxwap/chart';
// 2. Describe the chart in one config object
const config = defineConfig({
data: candles, // [{ time, open, high, low, close, volume? }] — UNIX seconds
series: { type: 'candlestick', upColor: '#26a69a', downColor: '#ef5350' },
});
// 3. Create the chart on a canvas
const chart = createChart({ container: document.querySelector('canvas')!, config });
await chart.ready; // WASM kernels live (or JS fallback chosen)
// Add an indicator
chart.addIndicator({ name: 'sma', params: { period: 20 } });Try the chart
Open the interactive playground to try drawing tools, indicators, timeframes, and simulated live data in your browser.
Go further
The documentation site has the full guides and API reference:
- React integration — mount, resize, and clean up a chart component.
- Data and updates — provide candles and update the series.
- Toolbar and settings — add drawing tools and chart controls.
- Configuration reference — configure series, scales, indicators, and appearance.
Chart is released under the MIT license.