UNPKG

@a1um1/lightweight-charts-react-wrapper

Version:

![bundle-size](https://badgen.net/bundlephobia/minzip/lightweight-charts-react-wrapper/)

12 lines (11 loc) 555 B
import { type ChartOptions, type DeepPartial, type IChartApi, type MouseEventHandler, type Time } from "lightweight-charts"; import { type ActionResult } from "./utils.js"; export interface ChartActionParams extends DeepPartial<ChartOptions> { onClick?: MouseEventHandler<Time>; onCrosshairMove?: MouseEventHandler<Time>; } export declare type ChartActionResult = ActionResult<ChartActionParams> & { subject(): IChartApi; alive(): boolean; }; export declare function chart(node: HTMLElement, params: ChartActionParams): ChartActionResult;