UNPKG

react-lightweight-charts-simple

Version:

A simple react wrapper for lightweight-charts library

13 lines (12 loc) 645 B
import { IChartApi, ISeriesApi, MouseEventParams, SeriesOptionsMap } from 'lightweight-charts'; declare type MapValueType<T> = T extends Map<unknown, infer V> ? V : never; export declare type SeriesHoverDataHandler = (value: MapValueType<MouseEventParams['seriesPrices']> | undefined, event: MouseEventParams, series: ISeriesApi<keyof SeriesOptionsMap>, chart: IChartApi) => void; /** * Call `handler` when hovering the chart, with current pointed time and value. * * ❗Only use inside `<Series />`. */ export declare const SeriesHoverDataSubscriber: ({ handler, }: { handler: SeriesHoverDataHandler; }) => null; export {};