Skip to content

Indy ChartsFinancial charting, batteries included

Candlesticks, volume, and ten-plus technical indicators on Chart.js — Vue, React, Angular, or vanilla JS.

See it in action

A price chart with an EMA overlay:

A standalone RSI oscillator:

An oscillator paired with the price chart (:with-overlay="true"):

Each instance is independent and manages its own ChartManager. Drop as many as you want on a page.

Install

bash
npm install @facioquo/indy-charts chart.js chartjs-plugin-annotation
bash
pnpm add @facioquo/indy-charts chart.js chartjs-plugin-annotation
bash
yarn add @facioquo/indy-charts chart.js chartjs-plugin-annotation

Use it

In any TS/JS project:

typescript
import { createApiClient, OverlayChart, setupIndyCharts } from "@facioquo/indy-charts";

setupIndyCharts();

const client = createApiClient({ baseUrl: "https://api.example.com" });
const quotes = await client.getQuotes();

const canvas = document.getElementById("chart") as HTMLCanvasElement;
const chart = new OverlayChart(canvas, { isDarkTheme: false, showTooltips: true });
chart.render(quotes.slice(-250));

In Vue / VitePress, register the adapter once and use the global component:

typescript
// .vitepress/theme/index.ts (or main.ts)
import { setupIndyChartsForVue } from "@facioquo/indy-charts/vue";

export default {
  enhanceApp({ app }) {
    setupIndyChartsForVue(app, {
      api: { baseUrl: "https://api.example.com" },
      indicators: { ema: { uiid: "EMA", params: { lookbackPeriods: 20 } } }
    });
  }
};
vue
<ClientOnly>
  <StockIndicatorChart indicator="ema" />
</ClientOnly>

Under the hood

Built on Chart.js. Runs anywhere ES2020 + Canvas + fetch are available — every browser shipped in the last few years. Source: github.com/facioquo/stock-charts.