Skip to content
EliteChart

Chart

Documentation


Documentation / @elitechart/react / Chart

code
const Chart: ForwardRefExoticComponent<ChartProps & RefAttributes<ChartRef>>;

Defined in: react/src/chart.tsx:57

React component wrapper around createChart from @elitechart/core.

Mounts the engine into a <div> container on first paint and disposes on unmount. onReady fires once with the live handle. The same handle is exposed through the forwarded ref.

Example

code
'use client';
import { Chart } from '@elitechart/react';
import { darkTheme } from '@elitechart/themes';

export function BtcChart({ series }) {
  return (
    <Chart
      series={series}
      kind="candle"
      theme={darkTheme}
      style={{ height: 480 }}
    />
  );
}