Quick Start
- Create a container element.
- Pass a valid
IBasicDataFeedimplementation. - Create
Chart. - Wait for
onChartReady. - 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
Chartis the single entry point.chart.getApi()returns the unified API surface.chart.destroy()cleans up the workspace and event wiring.