Skip to content

Installation

Package Manager

bash
# npm
npm install velo-plot

# pnpm
pnpm add velo-plot

# yarn
yarn add velo-plot

Imports

Choose the smallest entry for your app. See Bundle Architecture for the full matrix.

ES Modules

typescript
// Core — line/scatter/step/band only (~51 KB gzip)
import { createChart } from 'velo-plot';

// Trading — candles, indicators, stacked, alerts (~72 KB gzip)
import { createStackedChart, PluginDrawingTools } from 'velo-plot/trading';

// Scientific — heatmap, analysis, 3D, LaTeX (~114 KB gzip)
import { createChart, PluginAnalysis, PluginForecasting } from 'velo-plot/scientific';

// Full — everything (heavier)
import { createChart } from 'velo-plot/full';

// Per-plugin (with core entry)
import { PluginAnnotations } from 'velo-plot/plugins/annotations';

// React components
import { VeloPlot, useVeloPlot } from 'velo-plot/react';

// Themes — core exports DARK/LIGHT/DEFAULT; extended themes on scientific/full
import { DARK_THEME, LIGHT_THEME } from 'velo-plot';
import { MIDNIGHT_THEME } from 'velo-plot/scientific';
EntryAPI doc
velo-plotCore Bundle
velo-plot/tradingTrading Bundle
velo-plot/scientificScientific Bundle

TypeScript Usage

Velo Plot is written in TypeScript and includes full type definitions.

typescript
import { 
  createChart, 
  type Chart, 
  type ChartOptions,
  type SeriesData 
} from 'velo-plot';

const options: ChartOptions = {
  container: document.getElementById('chart')!,
  xAxis: { label: 'Time (s)', auto: true },
  yAxis: { label: 'Voltage (mV)', auto: true },
};

const chart: Chart = createChart(options);

Peer Dependencies

For React usage, ensure you have React 16.8+ installed:

bash
npm install react react-dom

Browser Support

  • Chrome 80+
  • Firefox 75+
  • Safari 14+
  • Edge 80+

WebGL 2.0 is required for hardware acceleration. Most modern browsers support this out of the box.

Next Steps

Released under the MIT License.