chart-0714
Version:
Professional trading chart library with advanced customization for trading journal apps
26 lines (25 loc) • 782 B
TypeScript
import { Chart } from '../core/Chart';
import { UseChartOptions } from './types';
import { Candle, DrawingOptions } from '../types';
declare global {
interface Window {
__TAURI__?: {
event: {
listen: (event: string, handler: (event: {
payload: unknown;
}) => void) => Promise<() => void>;
};
};
}
}
export declare function useChart(options?: UseChartOptions): {
containerRef: import('react').RefObject<HTMLDivElement>;
chart: Chart | null;
isReady: boolean;
error: Error | null;
chartState: string;
updateData: (newData: Candle[]) => void;
resize: () => void;
dispose: () => void;
addDrawing: (type: string, options?: DrawingOptions) => void;
};