Skip to content
EliteChart

createChart

Documentation


Documentation / @elitechart/core / createChart

code
function createChart(container, opts): ChartHandle;

Defined in: chart.ts:626

Create a chart inside container.

Parameters

container

HTMLElement

opts

ChartOptions

Returns

ChartHandle

Example

code
const chart = createChart(el, {
  series: { symbol, resolution: { kind: 'minutes', value: 1 }, bars },
  kind: 'candle',
  theme: darkTheme,
});
chart.setTheme(lightTheme);
chart.destroy();