Scientific Bundle (velo-plot/scientific)
Focused bundle for scientific and specialized visualization. Excludes trading-only plugins (drawings, replay, alerts) while including analysis, 3D, and extended series.
~114 KB gzip (minified ESM). Importing this entry runs registerScientific.ts, which registers extended series buffers, frame renderers, overlay drawers, heatmap shaders, WebGPU hook, and SVG export.
Import
import {
createChart,
createStackedChart,
Series,
PluginAnalysis,
PluginForecasting,
PluginLaTeX,
Plugin3D,
PluginRegression,
PluginBrokenAxis,
PluginVirtualization,
LinearScale,
DARK_THEME,
} from 'velo-plot/scientific'What you get vs core
| Category | Included |
|---|---|
| Series | bar, heatmap, polar, boxplot, waterfall, gauge, sankey (+ all core types) |
| Export | chart.exportSVG() (sync, patched) |
| Renderer | renderer: 'webgpu' opt-in |
| Stacked | createStackedChart |
| Analysis | PluginAnalysis, FFT, peaks, integration — standalone utils via velo-plot/plugins/analysis or re-exported from scientific |
| Math / fit | PluginRegression, PluginForecasting |
| Labels | PluginLaTeX |
| 3D | Plugin3D and 3D renderer exports |
| Layout | PluginBrokenAxis, PluginVirtualization |
| Themes | Extended theme set (MIDNIGHT_THEME, ELECTROCHEM_THEME, …) |
What is excluded (use trading entry)
| Feature | Import instead |
|---|---|
chart.addIndicator() presets | velo-plot/trading |
| Price alerts, position lines | velo-plot/trading |
PluginDrawingTools, PluginReplay | velo-plot/trading |
| Heikin-ashi, business-day scale | velo-plot/trading |
| Datafeed / mock OHLCV | velo-plot/trading |
For apps that need both trading and scientific features, use velo-plot/full.
Financial indicators
Functions like sma, ema, and rsi are not re-exported from the main scientific entry. Import them from velo-plot/plugins/analysis or use velo-plot/full.
Extended series example
import { createChart } from 'velo-plot/scientific'
const chart = createChart({ container })
chart.addSeries({
id: 'density',
type: 'heatmap',
data: { /* xValues, yValues, zValues */ },
style: { colorScale: { name: 'viridis' } },
})Analysis plugins
import { createChart, PluginAnalysis } from 'velo-plot/scientific'
const chart = createChart({ container })
const analysis = chart.use(PluginAnalysis())
// Plugin API available on chart.analysis after initSee Scientific Analysis guide and Analysis API.
3D
import { Plugin3D } from 'velo-plot/scientific'
chart.use(Plugin3D({ /* … */ }))See 3D Getting Started.
Registration
Like trading, the scientific entry performs side-effect registration on import:
// src/scientific/index.ts
import './registerScientific'registerScientific calls registerExtendedSeries() + patchExportSVG(). It does not patch trading chart methods.
Bundle size
| Metric | Value |
|---|---|
| Gzip (minified ESM) | ~114 KB |
| CI budget | 200 KB |
| vs core-only | +~63 KB |
Related
Known limitations
- Trading-only APIs (
addIndicator, alerts, drawings) are not included — usevelo-plot/tradingor/fullfor those. - Import side-effects register extended series — always import from
velo-plot/scientific, not deep paths.