@pipsend/charts 2.3.13 → 2.3.15
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/pipsend-charts.development.mjs +297 -86
- package/dist/pipsend-charts.production.mjs +2 -2
- package/dist/pipsend-charts.standalone.development.js +297 -86
- package/dist/pipsend-charts.standalone.development.mjs +297 -86
- package/dist/pipsend-charts.standalone.production.js +2 -2
- package/dist/pipsend-charts.standalone.production.mjs +2 -2
- package/dist/typings.d.ts +41 -3
- package/package.json +1 -1
package/dist/typings.d.ts
CHANGED
|
@@ -37,6 +37,11 @@ declare abstract class DrawingToolBase implements IDrawingTool {
|
|
|
37
37
|
isVisible(): boolean;
|
|
38
38
|
/** Series the tool is attached to. */
|
|
39
39
|
series(): ISeriesApi<SeriesType>;
|
|
40
|
+
/**
|
|
41
|
+
* Box the selection toolbar anchors to, in pane pixels. Null falls back to
|
|
42
|
+
* the serialized points, which cannot place a line across the whole pane.
|
|
43
|
+
*/
|
|
44
|
+
selectionBox(): DrawingBounds | null;
|
|
40
45
|
getState(): DrawingToolState;
|
|
41
46
|
abstract remove(): void;
|
|
42
47
|
protected abstract _update(): void;
|
|
@@ -292,7 +297,9 @@ export declare class CrossLineTool extends DrawingToolBase {
|
|
|
292
297
|
private _grab;
|
|
293
298
|
private _moveStartTime;
|
|
294
299
|
private _moveStartPrice;
|
|
300
|
+
private _placement;
|
|
295
301
|
constructor(context: DrawingContext, options: CrossLineToolOptions);
|
|
302
|
+
isComplete(): boolean;
|
|
296
303
|
private _createPrimitive;
|
|
297
304
|
private _requestUpdate;
|
|
298
305
|
protected _update(): void;
|
|
@@ -464,11 +471,13 @@ export declare class DrawingToolsManager {
|
|
|
464
471
|
* the chart is panned or zoomed.
|
|
465
472
|
*/
|
|
466
473
|
selectionBounds(): DrawingBounds | null;
|
|
474
|
+
/** Relative to the chart element; the tool's box is relative to its pane. */
|
|
475
|
+
private _boundsOf;
|
|
467
476
|
/**
|
|
468
477
|
* Bounds come from the tool's own serialized points, so this works for every
|
|
469
478
|
* tool without each one having to report a box.
|
|
470
479
|
*/
|
|
471
|
-
private
|
|
480
|
+
private _boxFromPoints;
|
|
472
481
|
/** Panes below the first one are offset inside the chart element. */
|
|
473
482
|
private _paneOffsetOf;
|
|
474
483
|
private _emitSelection;
|
|
@@ -632,6 +641,7 @@ export declare class FibonacciExtensionTool extends DrawingToolBase {
|
|
|
632
641
|
private _isHovered;
|
|
633
642
|
private _isDragging;
|
|
634
643
|
private _dragTarget;
|
|
644
|
+
private _placement;
|
|
635
645
|
constructor(context: DrawingContext, options: FibonacciExtensionOptions);
|
|
636
646
|
private _createPrimitive;
|
|
637
647
|
private _createPaneView;
|
|
@@ -798,7 +808,11 @@ export declare class GanttTool extends DrawingToolBase {
|
|
|
798
808
|
private _grab;
|
|
799
809
|
private _moveStart;
|
|
800
810
|
private _hoveredSegmentIndex;
|
|
811
|
+
private _placement;
|
|
801
812
|
constructor(context: DrawingContext, options: GanttToolOptions);
|
|
813
|
+
private _placeAt;
|
|
814
|
+
isComplete(): boolean;
|
|
815
|
+
selectionBox(): DrawingBounds | null;
|
|
802
816
|
private _createPrimitive;
|
|
803
817
|
private _createPaneView;
|
|
804
818
|
drawToCanvas(ctx: CanvasRenderingContext2D, horizontalPixelRatio: number, verticalPixelRatio: number): void;
|
|
@@ -845,7 +859,11 @@ export declare class HorizontalLineTool extends DrawingToolBase {
|
|
|
845
859
|
private _isDragging;
|
|
846
860
|
private _grab;
|
|
847
861
|
private _moveStartPrice;
|
|
862
|
+
private _placement;
|
|
848
863
|
constructor(context: DrawingContext, options: HorizontalLineToolOptions);
|
|
864
|
+
private _placeAt;
|
|
865
|
+
isComplete(): boolean;
|
|
866
|
+
selectionBox(): DrawingBounds | null;
|
|
849
867
|
private _createPrimitive;
|
|
850
868
|
private _createPaneView;
|
|
851
869
|
/** Where the line starts, in CSS pixels. Zero unless it is a ray. */
|
|
@@ -1242,6 +1260,7 @@ export declare class PositionTool extends DrawingToolBase {
|
|
|
1242
1260
|
private _paneView;
|
|
1243
1261
|
private _isSelected;
|
|
1244
1262
|
private _isHovered;
|
|
1263
|
+
private _placement;
|
|
1245
1264
|
private _isDragging;
|
|
1246
1265
|
private _dragTarget;
|
|
1247
1266
|
private _grab;
|
|
@@ -1249,6 +1268,9 @@ export declare class PositionTool extends DrawingToolBase {
|
|
|
1249
1268
|
private _profitRect;
|
|
1250
1269
|
private _lossRect;
|
|
1251
1270
|
constructor(context: DrawingContext, options: PositionToolOptions);
|
|
1271
|
+
private _placeAt;
|
|
1272
|
+
isComplete(): boolean;
|
|
1273
|
+
private _span;
|
|
1252
1274
|
private _createPrimitive;
|
|
1253
1275
|
private _createPaneView;
|
|
1254
1276
|
drawToCanvas(ctx: CanvasRenderingContext2D, horizontalPixelRatio: number, verticalPixelRatio: number): void;
|
|
@@ -1482,6 +1504,7 @@ export declare class TextTool extends DrawingToolBase {
|
|
|
1482
1504
|
private _moveStart;
|
|
1483
1505
|
private _isEditing;
|
|
1484
1506
|
private _clickOutsideHandler;
|
|
1507
|
+
private _placement;
|
|
1485
1508
|
constructor(context: DrawingContext, options: TextToolOptions);
|
|
1486
1509
|
private _setupClickOutsideHandler;
|
|
1487
1510
|
private _createPrimitive;
|
|
@@ -1637,7 +1660,10 @@ export declare class VerticalLineTool extends DrawingToolBase {
|
|
|
1637
1660
|
private _isDragging;
|
|
1638
1661
|
private _grab;
|
|
1639
1662
|
private _moveStartTime;
|
|
1663
|
+
private _placement;
|
|
1640
1664
|
constructor(context: DrawingContext, options: VerticalLineToolOptions);
|
|
1665
|
+
isComplete(): boolean;
|
|
1666
|
+
selectionBox(): DrawingBounds | null;
|
|
1641
1667
|
private _createPrimitive;
|
|
1642
1668
|
private _createPaneView;
|
|
1643
1669
|
drawToCanvas(ctx: CanvasRenderingContext2D, horizontalPixelRatio: number, verticalPixelRatio: number): void;
|
|
@@ -3324,6 +3350,8 @@ export interface ControllableLine {
|
|
|
3324
3350
|
export interface CrossLineToolOptions extends DrawingToolOptions {
|
|
3325
3351
|
time?: Time;
|
|
3326
3352
|
price?: number;
|
|
3353
|
+
/** Waits for a click that sets the time and the price. */
|
|
3354
|
+
interactive?: boolean;
|
|
3327
3355
|
lineColor?: string;
|
|
3328
3356
|
lineWidth?: number;
|
|
3329
3357
|
lineStyle?: "solid" | "dashed" | "dotted";
|
|
@@ -3508,8 +3536,7 @@ export interface DraggablePriceLineOptions {
|
|
|
3508
3536
|
formatTitle?: (price: number) => string;
|
|
3509
3537
|
}
|
|
3510
3538
|
/**
|
|
3511
|
-
* Where a tool sits on screen, in pixels
|
|
3512
|
-
* floating UI can be anchored to it.
|
|
3539
|
+
* Where a tool sits on screen, in pixels, so a floating UI can be anchored to it.
|
|
3513
3540
|
*/
|
|
3514
3541
|
export interface DrawingBounds {
|
|
3515
3542
|
left: number;
|
|
@@ -3582,6 +3609,7 @@ export interface FibonacciExtensionOptions extends DrawingToolOptions {
|
|
|
3582
3609
|
lineWidth?: number;
|
|
3583
3610
|
showLabels?: boolean;
|
|
3584
3611
|
extendLines?: boolean;
|
|
3612
|
+
/** Waits for three clicks that set its points in order. */
|
|
3585
3613
|
interactive?: boolean;
|
|
3586
3614
|
onUpdate?: () => void;
|
|
3587
3615
|
onRemove?: () => void;
|
|
@@ -3663,6 +3691,8 @@ export interface GanttSegment {
|
|
|
3663
3691
|
}
|
|
3664
3692
|
export interface GanttToolOptions extends DrawingToolOptions {
|
|
3665
3693
|
segments?: GanttSegment[];
|
|
3694
|
+
/** Waits for a click that sets where the segments start, and in which row. */
|
|
3695
|
+
interactive?: boolean;
|
|
3666
3696
|
rowHeight?: number;
|
|
3667
3697
|
rowSpacing?: number;
|
|
3668
3698
|
fillOpacity?: number;
|
|
@@ -3820,6 +3850,7 @@ export interface HistogramStyleOptions {
|
|
|
3820
3850
|
}
|
|
3821
3851
|
export interface HorizontalLineToolOptions extends DrawingToolOptions {
|
|
3822
3852
|
price?: number;
|
|
3853
|
+
/** Waits for a click that sets the level, and the start of a ray. */
|
|
3823
3854
|
interactive?: boolean;
|
|
3824
3855
|
/**
|
|
3825
3856
|
* Where the line starts. Left undefined it spans the whole chart; set, the
|
|
@@ -6320,11 +6351,13 @@ export interface PositionMetrics {
|
|
|
6320
6351
|
export interface PositionToolOptions extends DrawingToolOptions {
|
|
6321
6352
|
entryPrice: number;
|
|
6322
6353
|
entryTime: Time;
|
|
6354
|
+
/** Right edge of the box. Without it the box spans a fifth of the pane. */
|
|
6323
6355
|
endTime?: Time;
|
|
6324
6356
|
stopLoss?: number;
|
|
6325
6357
|
takeProfit?: number;
|
|
6326
6358
|
quantity?: number;
|
|
6327
6359
|
pipConfig?: PipConfig;
|
|
6360
|
+
/** Waits for a click to place the entry; stop and target keep their distance from it. */
|
|
6328
6361
|
interactive?: boolean;
|
|
6329
6362
|
profitColor?: string;
|
|
6330
6363
|
lossColor?: string;
|
|
@@ -7268,9 +7301,13 @@ export interface TextToolOptions extends DrawingToolOptions {
|
|
|
7268
7301
|
anchor?: TextToolAnchor;
|
|
7269
7302
|
pointer?: boolean;
|
|
7270
7303
|
borderRadius?: number;
|
|
7304
|
+
/** Waits for a click that sets `time` and `price`. */
|
|
7305
|
+
interactive?: boolean;
|
|
7271
7306
|
onUpdate?: () => void;
|
|
7272
7307
|
onRemove?: () => void;
|
|
7273
7308
|
onTextChange?: (text: string) => void;
|
|
7309
|
+
/** Called once an interactive text has been placed. */
|
|
7310
|
+
onComplete?: () => void;
|
|
7274
7311
|
}
|
|
7275
7312
|
export interface TextWatermarkLineOptions {
|
|
7276
7313
|
/**
|
|
@@ -7604,6 +7641,7 @@ export interface VerticalGradientColor {
|
|
|
7604
7641
|
}
|
|
7605
7642
|
export interface VerticalLineToolOptions extends DrawingToolOptions {
|
|
7606
7643
|
time?: Time;
|
|
7644
|
+
/** Waits for a click that sets the time. */
|
|
7607
7645
|
interactive?: boolean;
|
|
7608
7646
|
lineColor?: string;
|
|
7609
7647
|
lineWidth?: number;
|