@fintatech/fintachart 3.1.11 → 3.1.12
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/CHANGELOG.md +33 -0
- package/css/FintaChart.min.css +1 -1
- package/d.ts/FintaChart.d.ts +291 -10
- package/htmldialogs/MainSettings.html +12 -0
- package/htmldialogs/Toolbar.html +59 -1
- package/img/svg-icons/calendar.svg +1 -0
- package/localization/en.json +43 -1
- package/localization/uk.json +43 -1
- package/package.json +1 -1
- package/scripts/FintaChart.min.js +2 -2
package/d.ts/FintaChart.d.ts
CHANGED
|
@@ -42,6 +42,28 @@ declare module FintaChart {
|
|
|
42
42
|
}
|
|
43
43
|
declare module FintaChart {
|
|
44
44
|
}
|
|
45
|
+
declare module FintaChart {
|
|
46
|
+
interface BBRun {
|
|
47
|
+
text: string;
|
|
48
|
+
bold: boolean;
|
|
49
|
+
italic: boolean;
|
|
50
|
+
underline: boolean;
|
|
51
|
+
color?: string;
|
|
52
|
+
}
|
|
53
|
+
class BBCode {
|
|
54
|
+
private static readonly MAX_LEN;
|
|
55
|
+
private static readonly MAX_TAGS;
|
|
56
|
+
private static readonly MAX_DEPTH;
|
|
57
|
+
private static readonly MAX_COLOR_LEN;
|
|
58
|
+
private static readonly NAMED_COLORS;
|
|
59
|
+
static parse(text: string): BBRun[][];
|
|
60
|
+
private static literal;
|
|
61
|
+
private static parseInternal;
|
|
62
|
+
private static readTag;
|
|
63
|
+
private static safeColor;
|
|
64
|
+
private static inByteRange;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
45
67
|
declare module FintaChart {
|
|
46
68
|
}
|
|
47
69
|
interface Math {
|
|
@@ -382,6 +404,11 @@ declare module FintaChart {
|
|
|
382
404
|
* @param width
|
|
383
405
|
* @param height
|
|
384
406
|
*/
|
|
407
|
+
/**
|
|
408
|
+
* Upper bound for the device pixel ratio used when sizing canvases.
|
|
409
|
+
* Lower values trade sharpness for far cheaper fills on mobile.
|
|
410
|
+
*/
|
|
411
|
+
static dprCap: number;
|
|
385
412
|
static canvasRetina(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D, width: number, height: number): void;
|
|
386
413
|
/**
|
|
387
414
|
* Returns full screen is enabled
|
|
@@ -533,6 +560,15 @@ declare module FintaChart {
|
|
|
533
560
|
* @param value The CSS property value.
|
|
534
561
|
*/
|
|
535
562
|
static css(el: HTMLElement, prop: string, value: string | number): void;
|
|
563
|
+
private static _rectCache;
|
|
564
|
+
private static _rectCacheStamp;
|
|
565
|
+
/**
|
|
566
|
+
* Bounding rect cached within an 8ms frame bucket.
|
|
567
|
+
*
|
|
568
|
+
* @param el The element.
|
|
569
|
+
* @return The (possibly cached) bounding rect.
|
|
570
|
+
*/
|
|
571
|
+
static cachedBoundingRect(el: HTMLElement): DOMRect;
|
|
536
572
|
/**
|
|
537
573
|
* Converts client (viewport) coordinates to local element coordinates.
|
|
538
574
|
*
|
|
@@ -698,6 +734,8 @@ declare module FintaChart {
|
|
|
698
734
|
destroy(): void;
|
|
699
735
|
/** Enables or disables dragging. */
|
|
700
736
|
setEnabled(enabled: boolean): void;
|
|
737
|
+
/** Re-clamps the element inside its containment (e.g. after a resize). */
|
|
738
|
+
reclamp(): void;
|
|
701
739
|
}
|
|
702
740
|
/**
|
|
703
741
|
* Makes an element draggable using native pointer events.
|
|
@@ -2446,6 +2484,10 @@ declare module FintaChart {
|
|
|
2446
2484
|
* Event object
|
|
2447
2485
|
*/
|
|
2448
2486
|
evt: Event;
|
|
2487
|
+
/**
|
|
2488
|
+
* Overrides the native (read-only) `which` button value.
|
|
2489
|
+
*/
|
|
2490
|
+
which?: number;
|
|
2449
2491
|
/**
|
|
2450
2492
|
* Pane
|
|
2451
2493
|
*/
|
|
@@ -2783,7 +2825,6 @@ declare module FintaChart {
|
|
|
2783
2825
|
*/
|
|
2784
2826
|
constructor(config?: IContextMenuMotionEventConfig);
|
|
2785
2827
|
handleEvent(event: IWindowEvent): boolean;
|
|
2786
|
-
private snapshot;
|
|
2787
2828
|
private finish;
|
|
2788
2829
|
private startTimer;
|
|
2789
2830
|
private stopTimer;
|
|
@@ -2895,6 +2936,7 @@ declare module FintaChart {
|
|
|
2895
2936
|
private _lastScale;
|
|
2896
2937
|
private _prevScale;
|
|
2897
2938
|
private _scaleThreshold;
|
|
2939
|
+
private _wheelDeltaAccum;
|
|
2898
2940
|
/**
|
|
2899
2941
|
* Delta
|
|
2900
2942
|
*/
|
|
@@ -3882,6 +3924,7 @@ declare module FintaChart {
|
|
|
3882
3924
|
private _lineDashFunc;
|
|
3883
3925
|
private _canvas;
|
|
3884
3926
|
private _context;
|
|
3927
|
+
private _linearGradientCache;
|
|
3885
3928
|
/**
|
|
3886
3929
|
* Get canvas
|
|
3887
3930
|
*/
|
|
@@ -4751,6 +4794,8 @@ declare module FintaChart {
|
|
|
4751
4794
|
private _canvasEl;
|
|
4752
4795
|
private _parentEl;
|
|
4753
4796
|
private _renderer;
|
|
4797
|
+
private _sizeCache;
|
|
4798
|
+
private _sizeCacheStamp;
|
|
4754
4799
|
/**
|
|
4755
4800
|
* The canvas element.
|
|
4756
4801
|
*/
|
|
@@ -5348,14 +5393,29 @@ declare module FintaChart {
|
|
|
5348
5393
|
* Control Drag Pane's root container
|
|
5349
5394
|
*/
|
|
5350
5395
|
protected rootContainer: HTMLElement;
|
|
5351
|
-
/**
|
|
5352
|
-
* Draggable controller instance
|
|
5353
|
-
*/
|
|
5354
|
-
private _draggableController;
|
|
5355
5396
|
/**
|
|
5356
5397
|
* Bound resize handler reference for cleanup
|
|
5357
5398
|
*/
|
|
5358
5399
|
private _resizeHandler;
|
|
5400
|
+
/**
|
|
5401
|
+
* Whether the pane has been placed at its initial position
|
|
5402
|
+
*/
|
|
5403
|
+
private _positioned;
|
|
5404
|
+
/**
|
|
5405
|
+
* Pointer offset from the pane top-left at drag start
|
|
5406
|
+
*/
|
|
5407
|
+
private _dragOffsetX;
|
|
5408
|
+
private _dragOffsetY;
|
|
5409
|
+
/**
|
|
5410
|
+
* Bound drag handlers for cleanup
|
|
5411
|
+
*/
|
|
5412
|
+
private _onDragStart;
|
|
5413
|
+
private _onDragMove;
|
|
5414
|
+
private _onDragEnd;
|
|
5415
|
+
/**
|
|
5416
|
+
* Drag handle element
|
|
5417
|
+
*/
|
|
5418
|
+
private _handleEl;
|
|
5359
5419
|
get visible(): boolean;
|
|
5360
5420
|
/**
|
|
5361
5421
|
* Creates an instance of DragPane.
|
|
@@ -5376,7 +5436,18 @@ declare module FintaChart {
|
|
|
5376
5436
|
* Shows Control Drag Pane
|
|
5377
5437
|
*/
|
|
5378
5438
|
protected show(): void;
|
|
5379
|
-
|
|
5439
|
+
/** Returns the offsetParent rect the pane is positioned against. */
|
|
5440
|
+
private parentRect;
|
|
5441
|
+
/** Places the pane near the top-center of the chart. */
|
|
5442
|
+
private placeInitial;
|
|
5443
|
+
private onDragStart;
|
|
5444
|
+
private onDragMove;
|
|
5445
|
+
private onDragEnd;
|
|
5446
|
+
/** Sets absolute position within the offsetParent, clamped inside it. */
|
|
5447
|
+
private applyPosition;
|
|
5448
|
+
private clampIntoViewport;
|
|
5449
|
+
private eventPoint;
|
|
5450
|
+
private teardownDrag;
|
|
5380
5451
|
private onResize;
|
|
5381
5452
|
}
|
|
5382
5453
|
}
|
|
@@ -6041,6 +6112,42 @@ declare module FintaChart {
|
|
|
6041
6112
|
private unsubscribe;
|
|
6042
6113
|
}
|
|
6043
6114
|
}
|
|
6115
|
+
declare module FintaChart {
|
|
6116
|
+
class ToolbarCalendar {
|
|
6117
|
+
private _chart;
|
|
6118
|
+
private _element;
|
|
6119
|
+
private _onSelect;
|
|
6120
|
+
private _selected;
|
|
6121
|
+
private _viewYear;
|
|
6122
|
+
private _viewMonth;
|
|
6123
|
+
private _months;
|
|
6124
|
+
private _weekdaysShort;
|
|
6125
|
+
private _clearText;
|
|
6126
|
+
private _todayText;
|
|
6127
|
+
constructor(chart: Chart, host: HTMLElement);
|
|
6128
|
+
get isVisible(): boolean;
|
|
6129
|
+
/**
|
|
6130
|
+
* Shows the calendar for the given selection.
|
|
6131
|
+
*
|
|
6132
|
+
* @param selected Currently selected date, highlighted in the grid.
|
|
6133
|
+
* @param onSelect Invoked with the picked date, or `null` when cleared.
|
|
6134
|
+
*/
|
|
6135
|
+
show(selected: Date | null, onSelect: (date: Date | null) => void): void;
|
|
6136
|
+
hide(): void;
|
|
6137
|
+
private _loadLocalization;
|
|
6138
|
+
private _localize;
|
|
6139
|
+
private _splitLocalized;
|
|
6140
|
+
private _render;
|
|
6141
|
+
private _renderHeader;
|
|
6142
|
+
private _renderNavButton;
|
|
6143
|
+
private _renderGrid;
|
|
6144
|
+
private _renderDay;
|
|
6145
|
+
private _renderFooter;
|
|
6146
|
+
private _pick;
|
|
6147
|
+
private _isSameDay;
|
|
6148
|
+
private _shiftMonth;
|
|
6149
|
+
}
|
|
6150
|
+
}
|
|
6044
6151
|
declare module FintaChart {
|
|
6045
6152
|
/**
|
|
6046
6153
|
* Represents Toolbar Config
|
|
@@ -6080,6 +6187,14 @@ declare module FintaChart {
|
|
|
6080
6187
|
private _logScaleBtn;
|
|
6081
6188
|
private _percentScaleBtn;
|
|
6082
6189
|
private _lockShapesBtn;
|
|
6190
|
+
private _dateRangeButtons;
|
|
6191
|
+
private _dateRangeMenuItems;
|
|
6192
|
+
private _applyingDateRangePreset;
|
|
6193
|
+
private _dateRangeFrom;
|
|
6194
|
+
private _dateRangeTo;
|
|
6195
|
+
private _openDateRangePopup;
|
|
6196
|
+
private _dateRangeResizeObserver;
|
|
6197
|
+
private _dateRangeInlineWidth;
|
|
6083
6198
|
private _scalePercentageAdapter;
|
|
6084
6199
|
onAmountChanged: (quantity: number) => void;
|
|
6085
6200
|
/**
|
|
@@ -6126,6 +6241,26 @@ declare module FintaChart {
|
|
|
6126
6241
|
supportedTimeFramesShow(): void;
|
|
6127
6242
|
private _createPeriodicityForm;
|
|
6128
6243
|
private _subscribeToCreateCustomTimeFrame;
|
|
6244
|
+
private _subscribeDateRangeControls;
|
|
6245
|
+
private onDocumentTap;
|
|
6246
|
+
private _subscribeCollapsedDateRange;
|
|
6247
|
+
private _observeDateRangeWidth;
|
|
6248
|
+
private _subscribeCustomDateRange;
|
|
6249
|
+
private updateDateRangeApplyState;
|
|
6250
|
+
private formatDisplayDate;
|
|
6251
|
+
private truncateToDay;
|
|
6252
|
+
private endOfDay;
|
|
6253
|
+
/**
|
|
6254
|
+
* Applies a bottom-toolbar date-range preset (1D, 5D, ..., All).
|
|
6255
|
+
*
|
|
6256
|
+
* @param presetKey
|
|
6257
|
+
*/
|
|
6258
|
+
applyDateRangePreset(presetKey: string): void;
|
|
6259
|
+
private applyDateRange;
|
|
6260
|
+
private setActiveDateRangeButton;
|
|
6261
|
+
private closestSupportedTimeFrame;
|
|
6262
|
+
private parseSupportedTimeFrame;
|
|
6263
|
+
private addToDate;
|
|
6129
6264
|
setTimeFrame(timeFrame: TimeFrame): void;
|
|
6130
6265
|
/**
|
|
6131
6266
|
* Refresh toolbar components depend to size
|
|
@@ -6136,7 +6271,7 @@ declare module FintaChart {
|
|
|
6136
6271
|
/**
|
|
6137
6272
|
* Update trade panel units value
|
|
6138
6273
|
*
|
|
6139
|
-
* @param quantity
|
|
6274
|
+
* @param quantity default quantity expressed in units (backend contract)
|
|
6140
6275
|
*/
|
|
6141
6276
|
updateTradeHandlerUnits(quantity: number): void;
|
|
6142
6277
|
private activateStayInShapeModeBtn;
|
|
@@ -6155,6 +6290,8 @@ declare module FintaChart {
|
|
|
6155
6290
|
private onCrossHairChange;
|
|
6156
6291
|
private onDeleteClick;
|
|
6157
6292
|
private onHideOptionClick;
|
|
6293
|
+
/** Reflects the hide buttons' active class from real chart state. */
|
|
6294
|
+
private syncHideButtonsState;
|
|
6158
6295
|
onIndicatorsClick(): void;
|
|
6159
6296
|
applyIndicator(typeName: string): void;
|
|
6160
6297
|
private onInstrumentChange;
|
|
@@ -6297,6 +6434,13 @@ declare module FintaChart {
|
|
|
6297
6434
|
private hideDropDown;
|
|
6298
6435
|
private init;
|
|
6299
6436
|
private setValue;
|
|
6437
|
+
/**
|
|
6438
|
+
* Handles a tap/click on the button head, routing to toggle, fire or
|
|
6439
|
+
* drop-down open depending on the button configuration and platform.
|
|
6440
|
+
*
|
|
6441
|
+
* @param e The originating tap/click event.
|
|
6442
|
+
*/
|
|
6443
|
+
private handleHeadTap;
|
|
6300
6444
|
private showDropDown;
|
|
6301
6445
|
private toggleButton;
|
|
6302
6446
|
private toggleDropDown;
|
|
@@ -8997,6 +9141,14 @@ declare module FintaChart {
|
|
|
8997
9141
|
/**
|
|
8998
9142
|
* Represents indicator state
|
|
8999
9143
|
*/
|
|
9144
|
+
/**
|
|
9145
|
+
* A single indicator plot value for the OHLC card.
|
|
9146
|
+
*/
|
|
9147
|
+
interface IIndicatorHoverValue {
|
|
9148
|
+
name: string;
|
|
9149
|
+
color: string;
|
|
9150
|
+
value: string;
|
|
9151
|
+
}
|
|
9000
9152
|
interface IIndicatorState {
|
|
9001
9153
|
id?: string;
|
|
9002
9154
|
parentId?: string;
|
|
@@ -9093,6 +9245,11 @@ declare module FintaChart {
|
|
|
9093
9245
|
private _hovered;
|
|
9094
9246
|
private _id;
|
|
9095
9247
|
private _lineLevels;
|
|
9248
|
+
private _indicatorShapes;
|
|
9249
|
+
private _shapesById;
|
|
9250
|
+
private _shapesPanes;
|
|
9251
|
+
private _shapesForcePricePane;
|
|
9252
|
+
private _shapesFullyAttached;
|
|
9096
9253
|
private _requireDefaults;
|
|
9097
9254
|
private _optionsTitle;
|
|
9098
9255
|
private _parametersContextMenu;
|
|
@@ -9148,6 +9305,7 @@ declare module FintaChart {
|
|
|
9148
9305
|
get theme(): any;
|
|
9149
9306
|
set theme(value: any);
|
|
9150
9307
|
get lineLevels(): any[];
|
|
9308
|
+
get indicatorShapes(): Shape[];
|
|
9151
9309
|
/**
|
|
9152
9310
|
* Allow setting dialog state
|
|
9153
9311
|
*/
|
|
@@ -9322,6 +9480,15 @@ declare module FintaChart {
|
|
|
9322
9480
|
* @param pointY
|
|
9323
9481
|
*/
|
|
9324
9482
|
addLine(color: string, pointY: number): void;
|
|
9483
|
+
addShape(state: IShapeState): Shape | null;
|
|
9484
|
+
setIndicatorShapes(states: IShapeState[], opts?: {
|
|
9485
|
+
onPricePane?: boolean;
|
|
9486
|
+
}): void;
|
|
9487
|
+
upsertIndicatorShapes(states: IShapeState[]): void;
|
|
9488
|
+
removeIndicatorShapes(): void;
|
|
9489
|
+
private isPixelAnchoredShape;
|
|
9490
|
+
private routeAndAttach;
|
|
9491
|
+
private attachIndicatorShapes;
|
|
9325
9492
|
/**
|
|
9326
9493
|
* Add plot
|
|
9327
9494
|
*
|
|
@@ -9418,6 +9585,13 @@ declare module FintaChart {
|
|
|
9418
9585
|
*/
|
|
9419
9586
|
updateHoverRecord(record?: number): void;
|
|
9420
9587
|
getValues(): DataRowsCollection;
|
|
9588
|
+
/**
|
|
9589
|
+
* Per-plot values at a record for the OHLC card.
|
|
9590
|
+
*
|
|
9591
|
+
* @param record Record index; defaults to hovered record.
|
|
9592
|
+
* @return One { name, color, value } per plot.
|
|
9593
|
+
*/
|
|
9594
|
+
hoverValues(record?: number): IIndicatorHoverValue[];
|
|
9421
9595
|
/**
|
|
9422
9596
|
* Update visibility of title elements
|
|
9423
9597
|
*/
|
|
@@ -13540,6 +13714,19 @@ declare module FintaChart {
|
|
|
13540
13714
|
containsShape(shape: Shape): boolean;
|
|
13541
13715
|
dispose(): void;
|
|
13542
13716
|
paint(): void;
|
|
13717
|
+
/**
|
|
13718
|
+
* Returns true when a shape is fully outside the visible frame and
|
|
13719
|
+
* safe to skip. Extrapolated shapes (lines/rays) and selected shapes
|
|
13720
|
+
* are never culled since they can extend across the viewport.
|
|
13721
|
+
*/
|
|
13722
|
+
private isShapeOffscreen;
|
|
13723
|
+
/** Shape types that extend beyond their points and must not be culled. */
|
|
13724
|
+
private static NON_CULLABLE_SHAPES;
|
|
13725
|
+
static pGrid: number;
|
|
13726
|
+
static pObjects: number;
|
|
13727
|
+
static pIndicators: number;
|
|
13728
|
+
static pHover: number;
|
|
13729
|
+
static pWatermark: number;
|
|
13543
13730
|
/**
|
|
13544
13731
|
* Executes shapes
|
|
13545
13732
|
*
|
|
@@ -13698,7 +13885,15 @@ declare module FintaChart {
|
|
|
13698
13885
|
* @param record
|
|
13699
13886
|
* @return
|
|
13700
13887
|
*/
|
|
13888
|
+
private _lastHoverKey;
|
|
13701
13889
|
updateHoverRecord(record?: number): void;
|
|
13890
|
+
/**
|
|
13891
|
+
* Fills the OHLC card indicator rows for the hovered record.
|
|
13892
|
+
*
|
|
13893
|
+
* @param control The card's bar-info control.
|
|
13894
|
+
* @param record The hovered record index.
|
|
13895
|
+
*/
|
|
13896
|
+
private renderOhlcCardIndicators;
|
|
13702
13897
|
/**
|
|
13703
13898
|
* Renders the live graphics of an OHLC info card: the volume bar (as a
|
|
13704
13899
|
* fraction of the max visible volume) and the price sparkline (the last
|
|
@@ -15014,6 +15209,12 @@ declare module FintaChart {
|
|
|
15014
15209
|
private writeBlobToClipboard;
|
|
15015
15210
|
private fallbackDownload;
|
|
15016
15211
|
private showChartMessage;
|
|
15212
|
+
/**
|
|
15213
|
+
* Composites the chart's own canvas layers into one bitmap.
|
|
15214
|
+
* Far cheaper than serializing the whole DOM. Returns null when
|
|
15215
|
+
* no canvases are found so the caller can fall back.
|
|
15216
|
+
*/
|
|
15217
|
+
private compositeCanvasLayers;
|
|
15017
15218
|
private createSnapshot;
|
|
15018
15219
|
private saveImage;
|
|
15019
15220
|
/**
|
|
@@ -17399,7 +17600,6 @@ declare module FintaChart {
|
|
|
17399
17600
|
private updateCoordinateMapper;
|
|
17400
17601
|
private autoScroll;
|
|
17401
17602
|
private refresh;
|
|
17402
|
-
private animateZoom;
|
|
17403
17603
|
}
|
|
17404
17604
|
}
|
|
17405
17605
|
declare module FintaChart {
|
|
@@ -20654,7 +20854,7 @@ declare module FintaChart {
|
|
|
20654
20854
|
*/
|
|
20655
20855
|
class TextShape extends Shape {
|
|
20656
20856
|
static get type(): string;
|
|
20657
|
-
private
|
|
20857
|
+
private _parsed;
|
|
20658
20858
|
/**
|
|
20659
20859
|
* Creates an instance of TextShape.
|
|
20660
20860
|
*
|
|
@@ -20673,7 +20873,10 @@ declare module FintaChart {
|
|
|
20673
20873
|
restoreState(state: IShapeState): void;
|
|
20674
20874
|
pointsLocalizationKeys(): string[];
|
|
20675
20875
|
protected paintHovered(oldTheme: any): any;
|
|
20876
|
+
private get baseTextTheme();
|
|
20676
20877
|
private updateLines;
|
|
20878
|
+
private deriveRunTheme;
|
|
20879
|
+
private measureLineWidth;
|
|
20677
20880
|
}
|
|
20678
20881
|
}
|
|
20679
20882
|
declare module FintaChart {
|
|
@@ -22079,6 +22282,10 @@ declare module FintaChart {
|
|
|
22079
22282
|
private generateList;
|
|
22080
22283
|
deleteTemplate(key: string): void;
|
|
22081
22284
|
selectTemplate(key: string): void;
|
|
22285
|
+
/** Fixed-positions the dropdown so the pane cell does not clip it. */
|
|
22286
|
+
private positionDropList;
|
|
22287
|
+
/** Clears inline fixed-positioning so the closed dropdown returns to flow. */
|
|
22288
|
+
private resetDropListPosition;
|
|
22082
22289
|
private resetFibonacciLevels;
|
|
22083
22290
|
}
|
|
22084
22291
|
}
|
|
@@ -22880,6 +23087,14 @@ declare module FintaChart {
|
|
|
22880
23087
|
private _takeProfitLine;
|
|
22881
23088
|
private _stTpLine;
|
|
22882
23089
|
private _selected;
|
|
23090
|
+
/**
|
|
23091
|
+
* Instance text width for kind.
|
|
23092
|
+
*/
|
|
23093
|
+
private _kindTextWidth;
|
|
23094
|
+
/**
|
|
23095
|
+
* Instance text width for quantity.
|
|
23096
|
+
*/
|
|
23097
|
+
private _quantityTextWidth;
|
|
22883
23098
|
/**
|
|
22884
23099
|
* Gets/Set position.
|
|
22885
23100
|
*/
|
|
@@ -23864,6 +24079,14 @@ declare module FintaChart {
|
|
|
23864
24079
|
Fok = "fok",
|
|
23865
24080
|
Ioc = "ioc"
|
|
23866
24081
|
}
|
|
24082
|
+
/**
|
|
24083
|
+
* Rendering quality: trades sharpness for paint speed on weak devices.
|
|
24084
|
+
*/
|
|
24085
|
+
enum RenderQuality {
|
|
24086
|
+
LOW = "low",
|
|
24087
|
+
MEDIUM = "medium",
|
|
24088
|
+
HIGH = "high"
|
|
24089
|
+
}
|
|
23867
24090
|
/**
|
|
23868
24091
|
* Provides model of min and max
|
|
23869
24092
|
*/
|
|
@@ -23964,6 +24187,10 @@ declare module FintaChart {
|
|
|
23964
24187
|
const DEFAULT_BARS_COUNT = 500;
|
|
23965
24188
|
const DEFAULT_MORE_BARS_COUNT = 1000;
|
|
23966
24189
|
const DEFAULT_QUANTITY = 1;
|
|
24190
|
+
interface IDateRangeSelection {
|
|
24191
|
+
startDate: Date | null;
|
|
24192
|
+
endDate: Date | null;
|
|
24193
|
+
}
|
|
23967
24194
|
const version = "2.0.0";
|
|
23968
24195
|
enum AutoScalePanesKind {
|
|
23969
24196
|
AllPanes = 0,
|
|
@@ -24001,6 +24228,8 @@ declare module FintaChart {
|
|
|
24001
24228
|
private _lastObservedWidth;
|
|
24002
24229
|
private _lastObservedHeight;
|
|
24003
24230
|
private _resizeRafPending;
|
|
24231
|
+
private _windowResizeRafPending;
|
|
24232
|
+
private _renderQuality;
|
|
24004
24233
|
private readonly _indicatorAlertsHandler;
|
|
24005
24234
|
private readonly _addThemeCssClass;
|
|
24006
24235
|
private readonly _barCountdown;
|
|
@@ -24083,6 +24312,8 @@ declare module FintaChart {
|
|
|
24083
24312
|
private _lockShapes;
|
|
24084
24313
|
private _pendingTimeFrameRangeClamp;
|
|
24085
24314
|
private _pendingInstrumentChangeDateRange;
|
|
24315
|
+
private _pendingDateRangeSelection;
|
|
24316
|
+
private _dateRangeSelectionToken;
|
|
24086
24317
|
private _lastBid;
|
|
24087
24318
|
private _lastAsk;
|
|
24088
24319
|
private _conversionRate;
|
|
@@ -24133,6 +24364,13 @@ declare module FintaChart {
|
|
|
24133
24364
|
get timezone(): ITimezone | null;
|
|
24134
24365
|
set timezone(data: ITimezone | null);
|
|
24135
24366
|
constructor(config: IChartConfig);
|
|
24367
|
+
/**
|
|
24368
|
+
* Dev-only on-screen FPS / frame-time meter, shown only on localhost.
|
|
24369
|
+
* A small toggle button is placed at the right edge; clicking it starts
|
|
24370
|
+
* an independent rAF loop that measures the real display frame rate
|
|
24371
|
+
* (independent of the RefreshOptimizer throttle) during pan/zoom/hover.
|
|
24372
|
+
*/
|
|
24373
|
+
private setupFpsMeter;
|
|
24136
24374
|
get isInReplayMode(): boolean;
|
|
24137
24375
|
get dateTimezoneConverter(): DateTimezoneConverter;
|
|
24138
24376
|
get smoothLines(): boolean;
|
|
@@ -24437,6 +24675,15 @@ declare module FintaChart {
|
|
|
24437
24675
|
*/
|
|
24438
24676
|
get zoomEnabled(): boolean;
|
|
24439
24677
|
set zoomEnabled(value: boolean);
|
|
24678
|
+
/**
|
|
24679
|
+
* Rendering quality (sharpness vs paint speed).
|
|
24680
|
+
*/
|
|
24681
|
+
get renderQuality(): RenderQuality;
|
|
24682
|
+
set renderQuality(value: RenderQuality);
|
|
24683
|
+
/**
|
|
24684
|
+
* Maps render quality to the DPR cap and max visible bars.
|
|
24685
|
+
*/
|
|
24686
|
+
private applyRenderQualityCap;
|
|
24440
24687
|
/**
|
|
24441
24688
|
* Get trading session hours type
|
|
24442
24689
|
*/
|
|
@@ -24473,7 +24720,10 @@ declare module FintaChart {
|
|
|
24473
24720
|
* @param event
|
|
24474
24721
|
* @return Is event handled
|
|
24475
24722
|
*/
|
|
24723
|
+
static evtCount: number;
|
|
24724
|
+
static evtMs: number;
|
|
24476
24725
|
onMouseEvents(event: Event): boolean;
|
|
24726
|
+
private onMouseEventsImpl;
|
|
24477
24727
|
/**
|
|
24478
24728
|
* Scrolling chart to real time arrow
|
|
24479
24729
|
*/
|
|
@@ -24593,6 +24843,19 @@ declare module FintaChart {
|
|
|
24593
24843
|
* @return Data range
|
|
24594
24844
|
*/
|
|
24595
24845
|
dateRange(startDate?: Date, endDate?: Date): any;
|
|
24846
|
+
/**
|
|
24847
|
+
* Shows the specified date range, loading missing history first and
|
|
24848
|
+
* optionally switching the time frame (used by the bottom-toolbar
|
|
24849
|
+
* date-range presets: 1D, 5D, ..., All).
|
|
24850
|
+
*
|
|
24851
|
+
* @param startDate Range start; `null` shows all available history.
|
|
24852
|
+
* @param endDate Range end; defaults to the last loaded bar.
|
|
24853
|
+
* @param timeFrame Optional time frame to switch to before applying the range.
|
|
24854
|
+
*/
|
|
24855
|
+
setVisibleDateRange(startDate: Date | null, endDate?: Date | null, timeFrame?: ITimeFrame): void;
|
|
24856
|
+
private estimateDateRangeBarsCount;
|
|
24857
|
+
private applyDateRangeSelection;
|
|
24858
|
+
private waitForBarsRequestComplete;
|
|
24596
24859
|
/**
|
|
24597
24860
|
* Alias for `dispose()`. Both names are documented across the
|
|
24598
24861
|
* public guides; both are supported on the runtime.
|
|
@@ -24607,6 +24870,7 @@ declare module FintaChart {
|
|
|
24607
24870
|
/**
|
|
24608
24871
|
* Paints horizontal scale and panes container
|
|
24609
24872
|
*/
|
|
24873
|
+
static lastPaintMs: number;
|
|
24610
24874
|
paint(): void;
|
|
24611
24875
|
/**
|
|
24612
24876
|
* Executes indicator or indicators
|
|
@@ -24868,6 +25132,15 @@ declare module FintaChart {
|
|
|
24868
25132
|
* @param makeAutoScale
|
|
24869
25133
|
*/
|
|
24870
25134
|
refreshAsync(makeAutoScale?: boolean): void;
|
|
25135
|
+
private _tickRefreshInterval;
|
|
25136
|
+
private _lastTickRefresh;
|
|
25137
|
+
private _tickRefreshTimer;
|
|
25138
|
+
private _restoreIndicatorsTimer;
|
|
25139
|
+
/**
|
|
25140
|
+
* Throttled refresh for the live-tick path so a busy feed cannot force
|
|
25141
|
+
* a full repaint every frame. User gestures still use refreshAsync.
|
|
25142
|
+
*/
|
|
25143
|
+
refreshOnTickAsync(): void;
|
|
24871
25144
|
autoScalePanes(kind?: AutoScalePanesKind): void;
|
|
24872
25145
|
/**
|
|
24873
25146
|
* Sets chart window mode
|
|
@@ -24914,7 +25187,11 @@ declare module FintaChart {
|
|
|
24914
25187
|
*
|
|
24915
25188
|
* @param updateInstruments
|
|
24916
25189
|
*/
|
|
24917
|
-
|
|
25190
|
+
static lastRefreshMs: number;
|
|
25191
|
+
static lastLayoutMs: number;
|
|
25192
|
+
static lastChartTypeMs: number;
|
|
25193
|
+
static lastHScaleMs: number;
|
|
25194
|
+
static lastPanesMs: number;
|
|
24918
25195
|
refresh(updateInstruments?: boolean): void;
|
|
24919
25196
|
/**
|
|
24920
25197
|
* Triggers a repaint after direct property mutations (theme,
|
|
@@ -24995,6 +25272,10 @@ declare module FintaChart {
|
|
|
24995
25272
|
*/
|
|
24996
25273
|
private ohlcCardRootContainer;
|
|
24997
25274
|
private showOhlcCard;
|
|
25275
|
+
/**
|
|
25276
|
+
* Places the OHLC card at (left, top) but clamps it so the whole card
|
|
25277
|
+
*/
|
|
25278
|
+
private clampOhlcCardPosition;
|
|
24998
25279
|
private hideOhlcCard;
|
|
24999
25280
|
toggleOhlcCardButton(show: boolean): void;
|
|
25000
25281
|
setOhlcCardVariant(variant: string): void;
|
|
@@ -238,6 +238,18 @@
|
|
|
238
238
|
</div>
|
|
239
239
|
</div>
|
|
240
240
|
</div>
|
|
241
|
+
<div class="tcdDialog-content-items">
|
|
242
|
+
<div class="tcdDialog-content-item tcdColorWithBorder selector renderQuality width33">
|
|
243
|
+
<div class="selectWrapper w100">
|
|
244
|
+
<label class="settings-label" data-i18n="theme.dialog.renderQuality.title"></label>
|
|
245
|
+
<select class="select-text" id="tcdMainSettings_renderQuality" style="display:block!important;">
|
|
246
|
+
<option value="low" data-i18n="theme.dialog.renderQuality.low"></option>
|
|
247
|
+
<option value="medium" data-i18n="theme.dialog.renderQuality.medium"></option>
|
|
248
|
+
<option value="high" data-i18n="theme.dialog.renderQuality.high"></option>
|
|
249
|
+
</select>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
241
253
|
<!-- @@TODO: Hide-->
|
|
242
254
|
<!-- <div class="tcdDialog-content-items tcdDialog-content-caption">-->
|
|
243
255
|
<!-- <div class="tcdDialog-left-part">-->
|
package/htmldialogs/Toolbar.html
CHANGED
|
@@ -593,7 +593,7 @@
|
|
|
593
593
|
<li class="tcdShapeElement tcdToolbarButton-dropdownElement">
|
|
594
594
|
<div class="tradePanel_amount-box">
|
|
595
595
|
<input data-input class="tcdNumeric jqNumericField tradePanel_input"
|
|
596
|
-
id="tradePanel_amount-input" data-i18n="[title]trading.quantity">
|
|
596
|
+
id="tradePanel_amount-input" data-i18n="[title]trading.quantity" autocomplete="off">
|
|
597
597
|
<div class="calc-container" id="tradePanel_calc-container">
|
|
598
598
|
<div class="calculator-icon tcdSVGIcon" tcdSVGData="calculator"></div>
|
|
599
599
|
<ul class="calc-list">
|
|
@@ -1729,6 +1729,64 @@
|
|
|
1729
1729
|
<!--<div class="tcdToolbar-scroll tcdToolbar-left-bottom"></div>-->
|
|
1730
1730
|
|
|
1731
1731
|
<div class="tcdToolbar-bottom">
|
|
1732
|
+
<div class="tcdToolbar-bottom-left-side">
|
|
1733
|
+
<div class="tcdToolbarDateRange">
|
|
1734
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="1D" data-i18n="[title]dateRange.presets.1D">1D</span>
|
|
1735
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="5D" data-i18n="[title]dateRange.presets.5D">5D</span>
|
|
1736
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="1M" data-i18n="[title]dateRange.presets.1M">1M</span>
|
|
1737
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="3M" data-i18n="[title]dateRange.presets.3M">3M</span>
|
|
1738
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="6M" data-i18n="[title]dateRange.presets.6M">6M</span>
|
|
1739
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="YTD" data-i18n="[title]dateRange.presets.YTD">YTD</span>
|
|
1740
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="1Y" data-i18n="[title]dateRange.presets.1Y">1Y</span>
|
|
1741
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="5Y" data-i18n="[title]dateRange.presets.5Y">5Y</span>
|
|
1742
|
+
<span class="tcdToolbarDateRange-btn" data-tcdrange="All" data-i18n="[title]dateRange.presets.All">All</span>
|
|
1743
|
+
<span class="tcdToolbarDateRange-separator"></span>
|
|
1744
|
+
<span class="tcdToolbarDateRange-btn tcdToolbarDateRange-customBtn" data-i18n="[title]dateRange.custom">
|
|
1745
|
+
<span class="tcdSVGIcon tcdToolbarDateRange-customIcon" tcdSVGData="calendar"></span>
|
|
1746
|
+
</span>
|
|
1747
|
+
</div>
|
|
1748
|
+
<div class="tcdToolbarDateRange-collapsed" style="display: none;">
|
|
1749
|
+
<span class="tcdToolbarDateRange-collapsedBtn">
|
|
1750
|
+
<span class="tcdSVGIcon tcdToolbarDateRange-collapsedIcon" tcdSVGData="calendar"></span>
|
|
1751
|
+
<span class="tcdToolbarDateRange-collapsedLabel" data-i18n="dateRange.label">Date Range</span>
|
|
1752
|
+
<svg viewBox="0 0 10 6" width="10" height="6"><path d="M1 5l4-4 4 4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
1753
|
+
</span>
|
|
1754
|
+
<ul class="tcdToolbarDateRange-menu" style="display: none;">
|
|
1755
|
+
<li data-tcdrange="1D" data-i18n="dateRange.menu.1D">1 day in 5 minutes intervals</li>
|
|
1756
|
+
<li data-tcdrange="5D" data-i18n="dateRange.menu.5D">5 days in 15 minutes intervals</li>
|
|
1757
|
+
<li data-tcdrange="1M" data-i18n="dateRange.menu.1M">1 month in 1 hour intervals</li>
|
|
1758
|
+
<li data-tcdrange="3M" data-i18n="dateRange.menu.3M">3 months in 4 hours intervals</li>
|
|
1759
|
+
<li data-tcdrange="6M" data-i18n="dateRange.menu.6M">6 months in 4 hours intervals</li>
|
|
1760
|
+
<li data-tcdrange="YTD" data-i18n="dateRange.menu.YTD">Year to date in 1 day intervals</li>
|
|
1761
|
+
<li data-tcdrange="1Y" data-i18n="dateRange.menu.1Y">1 year in 1 day intervals</li>
|
|
1762
|
+
<li data-tcdrange="5Y" data-i18n="dateRange.menu.5Y">5 years in 1 week intervals</li>
|
|
1763
|
+
<li data-tcdrange="All" data-i18n="dateRange.menu.All">All data in 1 week intervals</li>
|
|
1764
|
+
<li class="tcdToolbarDateRange-menuSeparator"></li>
|
|
1765
|
+
<li class="tcdToolbarDateRange-menuGoto" data-i18n="dateRange.goto">Go to...</li>
|
|
1766
|
+
</ul>
|
|
1767
|
+
</div>
|
|
1768
|
+
<div class="tcdToolbarDateRange-popup" style="display: none;">
|
|
1769
|
+
<div class="tcdToolbarDateRange-popup-title" data-i18n="dateRange.title">Custom date range</div>
|
|
1770
|
+
<div class="tcdToolbarDateRange-popup-row">
|
|
1771
|
+
<label data-i18n="dateRange.from">From</label>
|
|
1772
|
+
<div class="tcdToolbarDateRange-popup-field" data-tcdrangefield="from">
|
|
1773
|
+
<input type="text" class="tcdToolbarDateRange-popup-from" readonly>
|
|
1774
|
+
<span class="tcdSVGIcon tcdToolbarDateRange-fieldIcon" tcdSVGData="calendar"></span>
|
|
1775
|
+
</div>
|
|
1776
|
+
</div>
|
|
1777
|
+
<div class="tcdToolbarDateRange-popup-row">
|
|
1778
|
+
<label data-i18n="dateRange.to">To</label>
|
|
1779
|
+
<div class="tcdToolbarDateRange-popup-field" data-tcdrangefield="to">
|
|
1780
|
+
<input type="text" class="tcdToolbarDateRange-popup-to" readonly>
|
|
1781
|
+
<span class="tcdSVGIcon tcdToolbarDateRange-fieldIcon" tcdSVGData="calendar"></span>
|
|
1782
|
+
</div>
|
|
1783
|
+
</div>
|
|
1784
|
+
<div class="tcdToolbarDateRange-popup-buttons">
|
|
1785
|
+
<button type="button" class="tcdToolbarDateRange-popup-cancel" data-i18n="dateRange.cancel">Cancel</button>
|
|
1786
|
+
<button type="button" class="tcdToolbarDateRange-popup-apply" data-i18n="dateRange.apply">Apply</button>
|
|
1787
|
+
</div>
|
|
1788
|
+
</div>
|
|
1789
|
+
</div>
|
|
1732
1790
|
<div class="tcdToolbar-bottom-right-side">
|
|
1733
1791
|
<div class="tcdToolbarSession drop-down">
|
|
1734
1792
|
<div class="tcdToolbarSession_selected">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26"><title>calendar</title><path d="M20,5H18V3.5a.5.5,0,0,0-1,0V5H9V3.5a.5.5,0,0,0-1,0V5H6A2,2,0,0,0,4,7V20a2,2,0,0,0,2,2H20a2,2,0,0,0,2-2V7A2,2,0,0,0,20,5ZM6,6H8V7.5a.5.5,0,0,0,1,0V6h8V7.5a.5.5,0,0,0,1,0V6h2a1,1,0,0,1,1,1V9.5H5V7A1,1,0,0,1,6,6ZM20,21H6a1,1,0,0,1-1-1V10.5H21V20A1,1,0,0,1,20,21ZM9,13.5a.5.5,0,0,1-.5.5h-1a.5.5,0,0,1,0-1h1A.5.5,0,0,1,9,13.5Zm4.75,0a.5.5,0,0,1-.5.5h-1a.5.5,0,0,1,0-1h1A.5.5,0,0,1,13.75,13.5Zm4.75,0a.5.5,0,0,1-.5.5H17a.5.5,0,0,1,0-1h1A.5.5,0,0,1,18.5,13.5ZM9,17a.5.5,0,0,1-.5.5h-1a.5.5,0,0,1,0-1h1A.5.5,0,0,1,9,17Zm4.75,0a.5.5,0,0,1-.5.5h-1a.5.5,0,0,1,0-1h1A.5.5,0,0,1,13.75,17Zm4.75,0a.5.5,0,0,1-.5.5H17a.5.5,0,0,1,0-1h1A.5.5,0,0,1,18.5,17Z" fill="#323232"/></svg>
|