Skip to main content

Getting Started

Installation

The package has zero runtime dependencies. It ships as ESM and CJS with full TypeScript declarations.

Create a Chart

Every chart needs a container element with a defined height.
You can also pass an HTMLElement directly:

Add a Series

Chart Options

Live Streaming

For real-time data, use update() instead of setData():
In live mode, the chart adds a phantom leading point that lerps smoothly to the latest value, giving fluid motion even with infrequent ticks. A pulsing dot marks the current price.

Max Data Length

For streaming use cases, cap the data buffer to prevent memory growth:
Older points are dropped from the front as new ones arrive.

Volume Pane

Adding a volume series automatically creates a second pane at 22% height:

Cleanup

Next Steps

  • API Reference — full Chart, Series, and Scale APIs
  • Data Providers — connect to polynode REST, WebSocket, and short-form endpoints
  • Live Streaming — real-time crypto prices with price-to-beat overlays