@qfo/qfchart 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +524 -12
- package/dist/qfchart.min.browser.js +34 -18
- package/dist/qfchart.min.es.js +34 -18
- package/package.json +1 -1
- package/src/QFChart.ts +109 -272
- package/src/components/AbstractPlugin.ts +234 -104
- package/src/components/DrawingEditor.ts +297 -248
- package/src/components/DrawingRendererRegistry.ts +13 -0
- package/src/components/GraphicBuilder.ts +2 -2
- package/src/components/LayoutManager.ts +92 -52
- package/src/components/SeriesBuilder.ts +10 -10
- package/src/components/TooltipFormatter.ts +1 -1
- package/src/index.ts +25 -6
- package/src/plugins/ABCDPatternTool/ABCDPatternDrawingRenderer.ts +112 -0
- package/src/plugins/ABCDPatternTool/ABCDPatternTool.ts +136 -0
- package/src/plugins/ABCDPatternTool/index.ts +2 -0
- package/src/plugins/CrossLineTool/CrossLineDrawingRenderer.ts +49 -0
- package/src/plugins/CrossLineTool/CrossLineTool.ts +52 -0
- package/src/plugins/CrossLineTool/index.ts +2 -0
- package/src/plugins/CypherPatternTool/CypherPatternDrawingRenderer.ts +80 -0
- package/src/plugins/CypherPatternTool/CypherPatternTool.ts +84 -0
- package/src/plugins/CypherPatternTool/index.ts +2 -0
- package/src/plugins/ExtendedLineTool/ExtendedLineDrawingRenderer.ts +73 -0
- package/src/plugins/ExtendedLineTool/ExtendedLineTool.ts +173 -0
- package/src/plugins/ExtendedLineTool/index.ts +2 -0
- package/src/plugins/FibSpeedResistanceFanTool/FibSpeedResistanceFanDrawingRenderer.ts +163 -0
- package/src/plugins/FibSpeedResistanceFanTool/FibSpeedResistanceFanTool.ts +210 -0
- package/src/plugins/FibSpeedResistanceFanTool/index.ts +2 -0
- package/src/plugins/FibTrendExtensionTool/FibTrendExtensionDrawingRenderer.ts +141 -0
- package/src/plugins/FibTrendExtensionTool/FibTrendExtensionTool.ts +188 -0
- package/src/plugins/FibTrendExtensionTool/index.ts +2 -0
- package/src/plugins/FibonacciChannelTool/FibonacciChannelDrawingRenderer.ts +128 -0
- package/src/plugins/FibonacciChannelTool/FibonacciChannelTool.ts +231 -0
- package/src/plugins/FibonacciChannelTool/index.ts +2 -0
- package/src/plugins/FibonacciTool/FibonacciDrawingRenderer.ts +107 -0
- package/src/plugins/{FibonacciTool.ts → FibonacciTool/FibonacciTool.ts} +195 -192
- package/src/plugins/FibonacciTool/index.ts +2 -0
- package/src/plugins/HeadAndShouldersTool/HeadAndShouldersDrawingRenderer.ts +95 -0
- package/src/plugins/HeadAndShouldersTool/HeadAndShouldersTool.ts +97 -0
- package/src/plugins/HeadAndShouldersTool/index.ts +2 -0
- package/src/plugins/HorizontalLineTool/HorizontalLineDrawingRenderer.ts +54 -0
- package/src/plugins/HorizontalLineTool/HorizontalLineTool.ts +52 -0
- package/src/plugins/HorizontalLineTool/index.ts +2 -0
- package/src/plugins/HorizontalRayTool/HorizontalRayDrawingRenderer.ts +34 -0
- package/src/plugins/HorizontalRayTool/HorizontalRayTool.ts +52 -0
- package/src/plugins/HorizontalRayTool/index.ts +2 -0
- package/src/plugins/InfoLineTool/InfoLineDrawingRenderer.ts +72 -0
- package/src/plugins/InfoLineTool/InfoLineTool.ts +130 -0
- package/src/plugins/InfoLineTool/index.ts +2 -0
- package/src/plugins/LineTool/LineDrawingRenderer.ts +49 -0
- package/src/plugins/{LineTool.ts → LineTool/LineTool.ts} +161 -190
- package/src/plugins/LineTool/index.ts +2 -0
- package/src/plugins/{MeasureTool.ts → MeasureTool/MeasureTool.ts} +324 -344
- package/src/plugins/MeasureTool/index.ts +1 -0
- package/src/plugins/RayTool/RayDrawingRenderer.ts +69 -0
- package/src/plugins/RayTool/RayTool.ts +162 -0
- package/src/plugins/RayTool/index.ts +2 -0
- package/src/plugins/ThreeDrivesPatternTool/ThreeDrivesPatternDrawingRenderer.ts +106 -0
- package/src/plugins/ThreeDrivesPatternTool/ThreeDrivesPatternTool.ts +98 -0
- package/src/plugins/ThreeDrivesPatternTool/index.ts +2 -0
- package/src/plugins/ToolGroup.ts +211 -0
- package/src/plugins/TrendAngleTool/TrendAngleDrawingRenderer.ts +87 -0
- package/src/plugins/TrendAngleTool/TrendAngleTool.ts +176 -0
- package/src/plugins/TrendAngleTool/index.ts +2 -0
- package/src/plugins/TrianglePatternTool/TrianglePatternDrawingRenderer.ts +107 -0
- package/src/plugins/TrianglePatternTool/TrianglePatternTool.ts +98 -0
- package/src/plugins/TrianglePatternTool/index.ts +2 -0
- package/src/plugins/VerticalLineTool/VerticalLineDrawingRenderer.ts +35 -0
- package/src/plugins/VerticalLineTool/VerticalLineTool.ts +52 -0
- package/src/plugins/VerticalLineTool/index.ts +2 -0
- package/src/plugins/XABCDPatternTool/XABCDPatternDrawingRenderer.ts +178 -0
- package/src/plugins/XABCDPatternTool/XABCDPatternTool.ts +213 -0
- package/src/plugins/XABCDPatternTool/index.ts +2 -0
- package/src/types.ts +39 -11
package/dist/index.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ interface QFChartOptions {
|
|
|
95
95
|
};
|
|
96
96
|
dataZoom?: {
|
|
97
97
|
visible?: boolean;
|
|
98
|
+
pannable?: boolean;
|
|
98
99
|
position?: 'top' | 'bottom';
|
|
99
100
|
height?: number;
|
|
100
101
|
start?: number;
|
|
@@ -147,8 +148,10 @@ interface ChartContext {
|
|
|
147
148
|
updateDrawing(drawing: DrawingElement): void;
|
|
148
149
|
lockChart(): void;
|
|
149
150
|
unlockChart(): void;
|
|
151
|
+
registerDrawingRenderer(renderer: DrawingRenderer): void;
|
|
152
|
+
snapToCandle(point: Coordinate): Coordinate;
|
|
150
153
|
}
|
|
151
|
-
type DrawingType =
|
|
154
|
+
type DrawingType = string;
|
|
152
155
|
interface DrawingElement {
|
|
153
156
|
id: string;
|
|
154
157
|
type: DrawingType;
|
|
@@ -159,6 +162,28 @@ interface DrawingElement {
|
|
|
159
162
|
lineWidth?: number;
|
|
160
163
|
};
|
|
161
164
|
}
|
|
165
|
+
interface DrawingRenderContext {
|
|
166
|
+
drawing: DrawingElement;
|
|
167
|
+
/** Pixel coords for each point, in the same order as drawing.points */
|
|
168
|
+
pixelPoints: [number, number][];
|
|
169
|
+
/** Whether this drawing is currently selected */
|
|
170
|
+
isSelected: boolean;
|
|
171
|
+
/** The ECharts custom series api object */
|
|
172
|
+
api: any;
|
|
173
|
+
/** Grid coordinate system bounds (x, y, width, height in pixels) */
|
|
174
|
+
coordSys: {
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
width: number;
|
|
178
|
+
height: number;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
interface DrawingRenderer {
|
|
182
|
+
/** The drawing type this renderer handles */
|
|
183
|
+
type: string;
|
|
184
|
+
/** Return an ECharts custom series renderItem group element */
|
|
185
|
+
render(ctx: DrawingRenderContext): any;
|
|
186
|
+
}
|
|
162
187
|
interface PluginConfig {
|
|
163
188
|
id: string;
|
|
164
189
|
name?: string;
|
|
@@ -253,6 +278,7 @@ declare class QFChart implements ChartContext {
|
|
|
253
278
|
private countdownInterval;
|
|
254
279
|
private selectedDrawingId;
|
|
255
280
|
private drawings;
|
|
281
|
+
private drawingRenderers;
|
|
256
282
|
coordinateConversion: {
|
|
257
283
|
pixelToData: (point: {
|
|
258
284
|
x: number;
|
|
@@ -308,6 +334,14 @@ declare class QFChart implements ChartContext {
|
|
|
308
334
|
getOptions(): QFChartOptions;
|
|
309
335
|
disableTools(): void;
|
|
310
336
|
registerPlugin(plugin: Plugin): void;
|
|
337
|
+
registerDrawingRenderer(renderer: DrawingRenderer): void;
|
|
338
|
+
snapToCandle(point: {
|
|
339
|
+
x: number;
|
|
340
|
+
y: number;
|
|
341
|
+
}): {
|
|
342
|
+
x: number;
|
|
343
|
+
y: number;
|
|
344
|
+
};
|
|
311
345
|
addDrawing(drawing: DrawingElement): void;
|
|
312
346
|
removeDrawing(id: string): void;
|
|
313
347
|
getDrawing(id: string): DrawingElement | undefined;
|
|
@@ -422,6 +456,13 @@ declare abstract class AbstractPlugin implements Plugin {
|
|
|
422
456
|
icon?: string;
|
|
423
457
|
protected context: ChartContext;
|
|
424
458
|
private eventListeners;
|
|
459
|
+
private _snapIndicator;
|
|
460
|
+
private _snapMoveHandler;
|
|
461
|
+
private _snapKeyDownHandler;
|
|
462
|
+
private _snapKeyUpHandler;
|
|
463
|
+
private _snapBlurHandler;
|
|
464
|
+
private _snapActive;
|
|
465
|
+
private _lastMouseEvent;
|
|
425
466
|
constructor(config: PluginConfig);
|
|
426
467
|
init(context: ChartContext): void;
|
|
427
468
|
/**
|
|
@@ -464,6 +505,16 @@ declare abstract class AbstractPlugin implements Plugin {
|
|
|
464
505
|
* Access to market data.
|
|
465
506
|
*/
|
|
466
507
|
protected get marketData(): OHLCV[];
|
|
508
|
+
/**
|
|
509
|
+
* Get the event point coordinates, snapping to nearest candle OHLC if Ctrl is held.
|
|
510
|
+
* Use this instead of [params.offsetX, params.offsetY] in click/mousemove handlers.
|
|
511
|
+
*/
|
|
512
|
+
protected getPoint(params: any): [number, number];
|
|
513
|
+
private _bindSnapIndicator;
|
|
514
|
+
private _unbindSnapIndicator;
|
|
515
|
+
private _removeSnapGraphic;
|
|
516
|
+
private _showSnapAt;
|
|
517
|
+
private _hideSnap;
|
|
467
518
|
}
|
|
468
519
|
|
|
469
520
|
declare class MeasureTool extends AbstractPlugin {
|
|
@@ -479,7 +530,7 @@ declare class MeasureTool extends AbstractPlugin {
|
|
|
479
530
|
private lineH;
|
|
480
531
|
private arrowStart;
|
|
481
532
|
private arrowEnd;
|
|
482
|
-
constructor(options
|
|
533
|
+
constructor(options?: {
|
|
483
534
|
name?: string;
|
|
484
535
|
icon?: string;
|
|
485
536
|
});
|
|
@@ -508,7 +559,7 @@ declare class LineTool extends AbstractPlugin {
|
|
|
508
559
|
private line;
|
|
509
560
|
private startCircle;
|
|
510
561
|
private endCircle;
|
|
511
|
-
constructor(options
|
|
562
|
+
constructor(options?: {
|
|
512
563
|
name?: string;
|
|
513
564
|
icon?: string;
|
|
514
565
|
});
|
|
@@ -516,20 +567,216 @@ declare class LineTool extends AbstractPlugin {
|
|
|
516
567
|
protected onActivate(): void;
|
|
517
568
|
protected onDeactivate(): void;
|
|
518
569
|
protected onDestroy(): void;
|
|
519
|
-
private onMouseDown;
|
|
520
|
-
private onChartInteraction;
|
|
521
570
|
private onClick;
|
|
522
|
-
private saveDataCoordinates;
|
|
523
|
-
private updateGraphicFromData;
|
|
524
|
-
private enableClearListeners;
|
|
525
|
-
private clearHandlers;
|
|
526
|
-
private disableClearListeners;
|
|
527
571
|
private onMouseMove;
|
|
528
572
|
private initGraphic;
|
|
529
573
|
private removeGraphic;
|
|
530
574
|
private updateGraphic;
|
|
531
575
|
}
|
|
532
576
|
|
|
577
|
+
declare class LineDrawingRenderer implements DrawingRenderer {
|
|
578
|
+
type: string;
|
|
579
|
+
render(ctx: DrawingRenderContext): any;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
declare class RayTool extends AbstractPlugin {
|
|
583
|
+
private zr;
|
|
584
|
+
private state;
|
|
585
|
+
private startPoint;
|
|
586
|
+
private endPoint;
|
|
587
|
+
private group;
|
|
588
|
+
private line;
|
|
589
|
+
private dashLine;
|
|
590
|
+
private startCircle;
|
|
591
|
+
private endCircle;
|
|
592
|
+
constructor(options?: {
|
|
593
|
+
name?: string;
|
|
594
|
+
icon?: string;
|
|
595
|
+
});
|
|
596
|
+
protected onInit(): void;
|
|
597
|
+
protected onActivate(): void;
|
|
598
|
+
protected onDeactivate(): void;
|
|
599
|
+
protected onDestroy(): void;
|
|
600
|
+
private onClick;
|
|
601
|
+
private onMouseMove;
|
|
602
|
+
private initGraphic;
|
|
603
|
+
private removeGraphic;
|
|
604
|
+
private updateGraphic;
|
|
605
|
+
private extendToEdge;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
declare class RayDrawingRenderer implements DrawingRenderer {
|
|
609
|
+
type: string;
|
|
610
|
+
render(ctx: DrawingRenderContext): any;
|
|
611
|
+
private extendToEdge;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare class InfoLineTool extends AbstractPlugin {
|
|
615
|
+
private zr;
|
|
616
|
+
private state;
|
|
617
|
+
private startPoint;
|
|
618
|
+
private endPoint;
|
|
619
|
+
private group;
|
|
620
|
+
private line;
|
|
621
|
+
private startCircle;
|
|
622
|
+
private endCircle;
|
|
623
|
+
constructor(options?: {
|
|
624
|
+
name?: string;
|
|
625
|
+
icon?: string;
|
|
626
|
+
});
|
|
627
|
+
protected onInit(): void;
|
|
628
|
+
protected onActivate(): void;
|
|
629
|
+
protected onDeactivate(): void;
|
|
630
|
+
protected onDestroy(): void;
|
|
631
|
+
private onClick;
|
|
632
|
+
private onMouseMove;
|
|
633
|
+
private initGraphic;
|
|
634
|
+
private removeGraphic;
|
|
635
|
+
private updateGraphic;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
declare class InfoLineDrawingRenderer implements DrawingRenderer {
|
|
639
|
+
type: string;
|
|
640
|
+
render(ctx: DrawingRenderContext): any;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
declare class ExtendedLineTool extends AbstractPlugin {
|
|
644
|
+
private zr;
|
|
645
|
+
private state;
|
|
646
|
+
private startPoint;
|
|
647
|
+
private endPoint;
|
|
648
|
+
private group;
|
|
649
|
+
private line;
|
|
650
|
+
private dashLineForward;
|
|
651
|
+
private dashLineBackward;
|
|
652
|
+
private startCircle;
|
|
653
|
+
private endCircle;
|
|
654
|
+
constructor(options?: {
|
|
655
|
+
name?: string;
|
|
656
|
+
icon?: string;
|
|
657
|
+
});
|
|
658
|
+
protected onInit(): void;
|
|
659
|
+
protected onActivate(): void;
|
|
660
|
+
protected onDeactivate(): void;
|
|
661
|
+
protected onDestroy(): void;
|
|
662
|
+
private onClick;
|
|
663
|
+
private onMouseMove;
|
|
664
|
+
private initGraphic;
|
|
665
|
+
private removeGraphic;
|
|
666
|
+
private updateGraphic;
|
|
667
|
+
private extendToEdge;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
declare class ExtendedLineDrawingRenderer implements DrawingRenderer {
|
|
671
|
+
type: string;
|
|
672
|
+
render(ctx: DrawingRenderContext): any;
|
|
673
|
+
private extendToEdge;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
declare class TrendAngleTool extends AbstractPlugin {
|
|
677
|
+
private zr;
|
|
678
|
+
private state;
|
|
679
|
+
private startPoint;
|
|
680
|
+
private endPoint;
|
|
681
|
+
private group;
|
|
682
|
+
private line;
|
|
683
|
+
private hRefLine;
|
|
684
|
+
private arc;
|
|
685
|
+
private angleText;
|
|
686
|
+
private startCircle;
|
|
687
|
+
private endCircle;
|
|
688
|
+
constructor(options?: {
|
|
689
|
+
name?: string;
|
|
690
|
+
icon?: string;
|
|
691
|
+
});
|
|
692
|
+
protected onInit(): void;
|
|
693
|
+
protected onActivate(): void;
|
|
694
|
+
protected onDeactivate(): void;
|
|
695
|
+
protected onDestroy(): void;
|
|
696
|
+
private onClick;
|
|
697
|
+
private onMouseMove;
|
|
698
|
+
private initGraphic;
|
|
699
|
+
private removeGraphic;
|
|
700
|
+
private updateGraphic;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
declare class TrendAngleDrawingRenderer implements DrawingRenderer {
|
|
704
|
+
type: string;
|
|
705
|
+
render(ctx: DrawingRenderContext): any;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
declare class HorizontalLineTool extends AbstractPlugin {
|
|
709
|
+
private zr;
|
|
710
|
+
constructor(options?: {
|
|
711
|
+
name?: string;
|
|
712
|
+
icon?: string;
|
|
713
|
+
});
|
|
714
|
+
protected onInit(): void;
|
|
715
|
+
protected onActivate(): void;
|
|
716
|
+
protected onDeactivate(): void;
|
|
717
|
+
protected onDestroy(): void;
|
|
718
|
+
private onClick;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
declare class HorizontalLineDrawingRenderer implements DrawingRenderer {
|
|
722
|
+
type: string;
|
|
723
|
+
render(ctx: DrawingRenderContext): any;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
declare class HorizontalRayTool extends AbstractPlugin {
|
|
727
|
+
private zr;
|
|
728
|
+
constructor(options?: {
|
|
729
|
+
name?: string;
|
|
730
|
+
icon?: string;
|
|
731
|
+
});
|
|
732
|
+
protected onInit(): void;
|
|
733
|
+
protected onActivate(): void;
|
|
734
|
+
protected onDeactivate(): void;
|
|
735
|
+
protected onDestroy(): void;
|
|
736
|
+
private onClick;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
declare class HorizontalRayDrawingRenderer implements DrawingRenderer {
|
|
740
|
+
type: string;
|
|
741
|
+
render(ctx: DrawingRenderContext): any;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
declare class VerticalLineTool extends AbstractPlugin {
|
|
745
|
+
private zr;
|
|
746
|
+
constructor(options?: {
|
|
747
|
+
name?: string;
|
|
748
|
+
icon?: string;
|
|
749
|
+
});
|
|
750
|
+
protected onInit(): void;
|
|
751
|
+
protected onActivate(): void;
|
|
752
|
+
protected onDeactivate(): void;
|
|
753
|
+
protected onDestroy(): void;
|
|
754
|
+
private onClick;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
declare class VerticalLineDrawingRenderer implements DrawingRenderer {
|
|
758
|
+
type: string;
|
|
759
|
+
render(ctx: DrawingRenderContext): any;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
declare class CrossLineTool extends AbstractPlugin {
|
|
763
|
+
private zr;
|
|
764
|
+
constructor(options?: {
|
|
765
|
+
name?: string;
|
|
766
|
+
icon?: string;
|
|
767
|
+
});
|
|
768
|
+
protected onInit(): void;
|
|
769
|
+
protected onActivate(): void;
|
|
770
|
+
protected onDeactivate(): void;
|
|
771
|
+
protected onDestroy(): void;
|
|
772
|
+
private onClick;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
declare class CrossLineDrawingRenderer implements DrawingRenderer {
|
|
776
|
+
type: string;
|
|
777
|
+
render(ctx: DrawingRenderContext): any;
|
|
778
|
+
}
|
|
779
|
+
|
|
533
780
|
declare class FibonacciTool extends AbstractPlugin {
|
|
534
781
|
private startPoint;
|
|
535
782
|
private endPoint;
|
|
@@ -541,6 +788,7 @@ declare class FibonacciTool extends AbstractPlugin {
|
|
|
541
788
|
name?: string;
|
|
542
789
|
icon?: string;
|
|
543
790
|
});
|
|
791
|
+
protected onInit(): void;
|
|
544
792
|
onActivate(): void;
|
|
545
793
|
onDeactivate(): void;
|
|
546
794
|
private bindEvents;
|
|
@@ -553,5 +801,269 @@ declare class FibonacciTool extends AbstractPlugin {
|
|
|
553
801
|
private saveDrawing;
|
|
554
802
|
}
|
|
555
803
|
|
|
556
|
-
|
|
557
|
-
|
|
804
|
+
declare class FibonacciDrawingRenderer implements DrawingRenderer {
|
|
805
|
+
type: string;
|
|
806
|
+
render(ctx: DrawingRenderContext): any;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
declare class FibonacciChannelTool extends AbstractPlugin {
|
|
810
|
+
private startPoint;
|
|
811
|
+
private endPoint;
|
|
812
|
+
private widthPoint;
|
|
813
|
+
private state;
|
|
814
|
+
private graphicGroup;
|
|
815
|
+
private readonly levels;
|
|
816
|
+
private readonly colors;
|
|
817
|
+
constructor(options?: {
|
|
818
|
+
name?: string;
|
|
819
|
+
icon?: string;
|
|
820
|
+
});
|
|
821
|
+
protected onInit(): void;
|
|
822
|
+
onActivate(): void;
|
|
823
|
+
onDeactivate(): void;
|
|
824
|
+
private bindEvents;
|
|
825
|
+
private unbindEvents;
|
|
826
|
+
private onClick;
|
|
827
|
+
private onMouseMove;
|
|
828
|
+
private initGraphic;
|
|
829
|
+
private removeGraphic;
|
|
830
|
+
private updateGraphic;
|
|
831
|
+
private saveDrawing;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
declare class FibonacciChannelDrawingRenderer implements DrawingRenderer {
|
|
835
|
+
type: string;
|
|
836
|
+
render(ctx: DrawingRenderContext): any;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare class FibSpeedResistanceFanTool extends AbstractPlugin {
|
|
840
|
+
private startPoint;
|
|
841
|
+
private endPoint;
|
|
842
|
+
private state;
|
|
843
|
+
private graphicGroup;
|
|
844
|
+
constructor(options?: {
|
|
845
|
+
name?: string;
|
|
846
|
+
icon?: string;
|
|
847
|
+
});
|
|
848
|
+
protected onInit(): void;
|
|
849
|
+
protected onActivate(): void;
|
|
850
|
+
protected onDeactivate(): void;
|
|
851
|
+
private bindEvents;
|
|
852
|
+
private unbindEvents;
|
|
853
|
+
private onClick;
|
|
854
|
+
private onMouseMove;
|
|
855
|
+
private initGraphic;
|
|
856
|
+
private removeGraphic;
|
|
857
|
+
private updateGraphic;
|
|
858
|
+
private saveDrawing;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
declare class FibSpeedResistanceFanDrawingRenderer implements DrawingRenderer {
|
|
862
|
+
type: string;
|
|
863
|
+
render(ctx: DrawingRenderContext): any;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
declare class FibTrendExtensionTool extends AbstractPlugin {
|
|
867
|
+
private points;
|
|
868
|
+
private state;
|
|
869
|
+
private graphicGroup;
|
|
870
|
+
constructor(options?: {
|
|
871
|
+
name?: string;
|
|
872
|
+
icon?: string;
|
|
873
|
+
});
|
|
874
|
+
protected onInit(): void;
|
|
875
|
+
protected onActivate(): void;
|
|
876
|
+
protected onDeactivate(): void;
|
|
877
|
+
private bindEvents;
|
|
878
|
+
private unbindEvents;
|
|
879
|
+
private onClick;
|
|
880
|
+
private onMouseMove;
|
|
881
|
+
private initGraphic;
|
|
882
|
+
private removeGraphic;
|
|
883
|
+
private updateGraphic;
|
|
884
|
+
private saveDrawing;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
declare class FibTrendExtensionDrawingRenderer implements DrawingRenderer {
|
|
888
|
+
type: string;
|
|
889
|
+
render(ctx: DrawingRenderContext): any;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
declare class XABCDPatternTool extends AbstractPlugin {
|
|
893
|
+
private points;
|
|
894
|
+
private state;
|
|
895
|
+
private graphicGroup;
|
|
896
|
+
constructor(options?: {
|
|
897
|
+
name?: string;
|
|
898
|
+
icon?: string;
|
|
899
|
+
});
|
|
900
|
+
protected onInit(): void;
|
|
901
|
+
protected onActivate(): void;
|
|
902
|
+
protected onDeactivate(): void;
|
|
903
|
+
private bindEvents;
|
|
904
|
+
private unbindEvents;
|
|
905
|
+
private onClick;
|
|
906
|
+
private onMouseMove;
|
|
907
|
+
private initGraphic;
|
|
908
|
+
private removeGraphic;
|
|
909
|
+
private updateGraphic;
|
|
910
|
+
private saveDrawing;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
declare class XABCDPatternDrawingRenderer implements DrawingRenderer {
|
|
914
|
+
type: string;
|
|
915
|
+
render(ctx: DrawingRenderContext): any;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
declare class ABCDPatternTool extends AbstractPlugin {
|
|
919
|
+
private points;
|
|
920
|
+
private state;
|
|
921
|
+
private graphicGroup;
|
|
922
|
+
constructor(options?: {
|
|
923
|
+
name?: string;
|
|
924
|
+
icon?: string;
|
|
925
|
+
});
|
|
926
|
+
protected onInit(): void;
|
|
927
|
+
protected onActivate(): void;
|
|
928
|
+
protected onDeactivate(): void;
|
|
929
|
+
private onClick;
|
|
930
|
+
private onMouseMove;
|
|
931
|
+
private initGraphic;
|
|
932
|
+
private removeGraphic;
|
|
933
|
+
private updateGraphic;
|
|
934
|
+
private saveDrawing;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
declare class ABCDPatternDrawingRenderer implements DrawingRenderer {
|
|
938
|
+
type: string;
|
|
939
|
+
render(ctx: DrawingRenderContext): any;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
declare class CypherPatternTool extends AbstractPlugin {
|
|
943
|
+
private points;
|
|
944
|
+
private state;
|
|
945
|
+
private graphicGroup;
|
|
946
|
+
constructor(options?: {
|
|
947
|
+
name?: string;
|
|
948
|
+
icon?: string;
|
|
949
|
+
});
|
|
950
|
+
protected onInit(): void;
|
|
951
|
+
protected onActivate(): void;
|
|
952
|
+
protected onDeactivate(): void;
|
|
953
|
+
private onClick;
|
|
954
|
+
private onMouseMove;
|
|
955
|
+
private initGraphic;
|
|
956
|
+
private removeGraphic;
|
|
957
|
+
private updateGraphic;
|
|
958
|
+
private saveDrawing;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
declare class CypherPatternDrawingRenderer implements DrawingRenderer {
|
|
962
|
+
type: string;
|
|
963
|
+
render(ctx: DrawingRenderContext): any;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
declare class HeadAndShouldersTool extends AbstractPlugin {
|
|
967
|
+
private points;
|
|
968
|
+
private state;
|
|
969
|
+
private graphicGroup;
|
|
970
|
+
constructor(options?: {
|
|
971
|
+
name?: string;
|
|
972
|
+
icon?: string;
|
|
973
|
+
});
|
|
974
|
+
protected onInit(): void;
|
|
975
|
+
protected onActivate(): void;
|
|
976
|
+
protected onDeactivate(): void;
|
|
977
|
+
private onClick;
|
|
978
|
+
private onMouseMove;
|
|
979
|
+
private initGraphic;
|
|
980
|
+
private removeGraphic;
|
|
981
|
+
private updateGraphic;
|
|
982
|
+
private saveDrawing;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
declare class HeadAndShouldersDrawingRenderer implements DrawingRenderer {
|
|
986
|
+
type: string;
|
|
987
|
+
render(ctx: DrawingRenderContext): any;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
declare class TrianglePatternTool extends AbstractPlugin {
|
|
991
|
+
private points;
|
|
992
|
+
private state;
|
|
993
|
+
private graphicGroup;
|
|
994
|
+
constructor(options?: {
|
|
995
|
+
name?: string;
|
|
996
|
+
icon?: string;
|
|
997
|
+
});
|
|
998
|
+
protected onInit(): void;
|
|
999
|
+
protected onActivate(): void;
|
|
1000
|
+
protected onDeactivate(): void;
|
|
1001
|
+
private onClick;
|
|
1002
|
+
private onMouseMove;
|
|
1003
|
+
private initGraphic;
|
|
1004
|
+
private removeGraphic;
|
|
1005
|
+
private updateGraphic;
|
|
1006
|
+
private saveDrawing;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
declare class TrianglePatternDrawingRenderer implements DrawingRenderer {
|
|
1010
|
+
type: string;
|
|
1011
|
+
render(ctx: DrawingRenderContext): any;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
declare class ThreeDrivesPatternTool extends AbstractPlugin {
|
|
1015
|
+
private points;
|
|
1016
|
+
private state;
|
|
1017
|
+
private graphicGroup;
|
|
1018
|
+
constructor(options?: {
|
|
1019
|
+
name?: string;
|
|
1020
|
+
icon?: string;
|
|
1021
|
+
});
|
|
1022
|
+
protected onInit(): void;
|
|
1023
|
+
protected onActivate(): void;
|
|
1024
|
+
protected onDeactivate(): void;
|
|
1025
|
+
private onClick;
|
|
1026
|
+
private onMouseMove;
|
|
1027
|
+
private initGraphic;
|
|
1028
|
+
private removeGraphic;
|
|
1029
|
+
private updateGraphic;
|
|
1030
|
+
private saveDrawing;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
declare class ThreeDrivesPatternDrawingRenderer implements DrawingRenderer {
|
|
1034
|
+
type: string;
|
|
1035
|
+
render(ctx: DrawingRenderContext): any;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
interface ToolGroupConfig extends Omit<PluginConfig, 'id'> {
|
|
1039
|
+
id?: string;
|
|
1040
|
+
name: string;
|
|
1041
|
+
icon?: string;
|
|
1042
|
+
}
|
|
1043
|
+
declare class ToolGroup extends AbstractPlugin {
|
|
1044
|
+
private plugins;
|
|
1045
|
+
private activeSubPlugin;
|
|
1046
|
+
private menuElement;
|
|
1047
|
+
private buttonElement;
|
|
1048
|
+
private originalIcon;
|
|
1049
|
+
private arrowSvg;
|
|
1050
|
+
constructor(config: ToolGroupConfig);
|
|
1051
|
+
add(plugin: Plugin): void;
|
|
1052
|
+
protected onInit(): void;
|
|
1053
|
+
protected onActivate(): void;
|
|
1054
|
+
protected onDeactivate(): void;
|
|
1055
|
+
protected onDestroy(): void;
|
|
1056
|
+
private showMenu;
|
|
1057
|
+
private hideMenu;
|
|
1058
|
+
private handleOutsideClick;
|
|
1059
|
+
private activateSubPlugin;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
declare class DrawingRendererRegistry {
|
|
1063
|
+
private renderers;
|
|
1064
|
+
register(renderer: DrawingRenderer): void;
|
|
1065
|
+
get(type: string): DrawingRenderer | undefined;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
export { ABCDPatternDrawingRenderer, ABCDPatternTool, AbstractPlugin, CrossLineDrawingRenderer, CrossLineTool, CypherPatternDrawingRenderer, CypherPatternTool, DrawingRendererRegistry, ExtendedLineDrawingRenderer, ExtendedLineTool, FibSpeedResistanceFanDrawingRenderer, FibSpeedResistanceFanTool, FibTrendExtensionDrawingRenderer, FibTrendExtensionTool, FibonacciChannelDrawingRenderer, FibonacciChannelTool, FibonacciDrawingRenderer, FibonacciTool, HeadAndShouldersDrawingRenderer, HeadAndShouldersTool, HorizontalLineDrawingRenderer, HorizontalLineTool, HorizontalRayDrawingRenderer, HorizontalRayTool, InfoLineDrawingRenderer, InfoLineTool, LineDrawingRenderer, LineTool, MeasureTool, QFChart, RayDrawingRenderer, RayTool, ThreeDrivesPatternDrawingRenderer, ThreeDrivesPatternTool, ToolGroup, TrendAngleDrawingRenderer, TrendAngleTool, TrianglePatternDrawingRenderer, TrianglePatternTool, VerticalLineDrawingRenderer, VerticalLineTool, XABCDPatternDrawingRenderer, XABCDPatternTool };
|
|
1069
|
+
export type { ChartContext, Coordinate, DataCoordinate, DrawingElement, DrawingRenderContext, DrawingRenderer, DrawingType, Indicator$1 as Indicator, IndicatorOptions, IndicatorPlot, IndicatorPoint, IndicatorStyle, OHLCV, Plugin, PluginConfig, QFChartOptions, ToolGroupConfig };
|