@a1um1/lightweight-charts-react-wrapper
Version:

12 lines (11 loc) • 555 B
TypeScript
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;