Stock Chart

Build professional stock charts for trading platforms and portfolio trackers. Candlestick, OHLC, volume, and area charts with technical indicators, real-time streaming, and zoom/pan navigation. Free and open source alternative to TradingView.

$npm install @chartts/core
example.tsx
import { candlestick } from "@chartts/core"

const svg = candlestick({
  data: stockData,
  x: "date",
  open: "open",
  high: "high",
  low: "low",
  close: "close",
  volume: "volume",
  overlays: [
    { type: "sma", period: 20 },
    { type: "bollinger", period: 20, stdDev: 2 },
  ],
})

Features

Candlestick and OHLC chart types
Volume bars with up/down coloring
Technical indicators (SMA, EMA, Bollinger, MACD)
Real-time data streaming
Zoom and pan with time axis
Multi-timeframe support
Free and open source (MIT)