Skip to main content

Quick Start

  1. Create a container element.
  2. Pass a valid IBasicDataFeed implementation.
  3. Create Chart.
  4. Wait for onChartReady.
  5. Use the unified API from the chart instance.
import { Chart } from "financial-charting-library";

const chart = new Chart({
container: document.getElementById("chart")!,
datafeed,
symbol: "AAPL",
interval: "1D",
theme: "dark",
});

chart.onChartReady(() => {
const api = chart.getApi();
api.setTheme("dark");
api.setSymbol("MSFT");
});

First Things To Know

  • Chart is the single entry point.
  • chart.getApi() returns the unified API surface.
  • chart.destroy() cleans up the workspace and event wiring.