UNPKG

chart-0714

Version:

Professional trading chart library with advanced customization for trading journal apps

60 lines (59 loc) 1.55 kB
export type DrawingToolType = 'line' | 'trendline' | 'horizontal' | 'vertical' | 'text' | 'marker' | 'circle' | 'rectangle' | 'measure' | 'fibonacci'; export interface DrawingObject { id: string; type: DrawingToolType; points: ChartPoint[]; options?: { color?: string; lineWidth?: number; text?: string; markerType?: MarkerType; magnetic?: boolean; fontSize?: number; bold?: boolean; }; temporaryEndX?: number; temporaryEndY?: number; snapToPrice?: boolean; label?: string; priceLevel?: number; radius?: number; style?: any; selected?: boolean; text?: string; markerType?: MarkerType; markerPosition?: MarkerPosition; locked?: boolean; } export interface DrawingOptions { color?: string; lineWidth?: number; text?: string; markerType?: MarkerType; magnetic?: boolean; fontSize?: number; bold?: boolean; opacity?: number; } export interface DrawingUpdateOptions { id?: string; updates?: { points?: ChartPoint[]; options?: DrawingOptions; label?: string; priceLevel?: number; markerType?: MarkerType; style?: any; }; points?: ChartPoint[]; options?: DrawingOptions; text?: string; markerType?: MarkerType; style?: any; } export interface ChartPoint { time: number; price: number; } export type MarkerType = 'arrowUp' | 'arrowDown' | 'triangleUp' | 'triangleDown'; export type MarkerPosition = 'above' | 'below';