svelte-lightweight-charts
Version:
Svelte wrapper for financial lightweight charts built with HTML5 canvas
23 lines (19 loc) • 712 B
TypeScript
import { SvelteComponentTyped } from 'svelte';
import type {
ITimeScaleApi,
TimeRange,
LogicalRange,
DeepPartial,
TimeScaleOptions,
} from 'lightweight-charts';
import type {Reference} from '../internal/utils.js';
export interface $$PROPS extends DeepPartial<TimeScaleOptions> {
ref?: Reference<ITimeScaleApi>;
}
export interface $$EVENTS_DETAIL {
visibleTimeRangeChange: TimeRange | null;
visibleLogicalRangeChange: LogicalRange | null;
sizeChange: { width: number; height: number };
}
export type $$EVENTS = { [K in keyof $$EVENTS_DETAIL]: CustomEvent<$$EVENTS_DETAIL[K]> & { type: K } };
export default class TimeScale extends SvelteComponentTyped<$$PROPS, $$EVENTS> {}