@fintatech/fintachart 3.1.11 → 3.1.13

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.
@@ -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.
@@ -900,7 +938,7 @@ declare module FintaChart {
900
938
  * @param chart
901
939
  * @return
902
940
  */
903
- toolbar(chart?: Chart): Toolbar;
941
+ toolbar(chart?: Chart | IToolbarConfig): Toolbar;
904
942
  /**
905
943
  * Returns toolbar drop down button
906
944
  *
@@ -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,6 +2825,9 @@ declare module FintaChart {
2783
2825
  */
2784
2826
  constructor(config?: IContextMenuMotionEventConfig);
2785
2827
  handleEvent(event: IWindowEvent): boolean;
2828
+ /**
2829
+ * Creates lightweight event snapshot.
2830
+ */
2786
2831
  private snapshot;
2787
2832
  private finish;
2788
2833
  private startTimer;
@@ -2895,6 +2940,7 @@ declare module FintaChart {
2895
2940
  private _lastScale;
2896
2941
  private _prevScale;
2897
2942
  private _scaleThreshold;
2943
+ private _wheelDeltaAccum;
2898
2944
  /**
2899
2945
  * Delta
2900
2946
  */
@@ -3770,6 +3816,12 @@ declare module FintaChart {
3770
3816
  set htmlDialogs(value: string);
3771
3817
  }
3772
3818
  const UserAgent: IUserAgent;
3819
+ /**
3820
+ * Updates device mode at runtime.
3821
+ *
3822
+ * @param isMobile Whether the chart should behave as a mobile device.
3823
+ */
3824
+ function setMobile(isMobile: boolean): void;
3773
3825
  }
3774
3826
  declare module FintaChart {
3775
3827
  /**
@@ -3882,6 +3934,7 @@ declare module FintaChart {
3882
3934
  private _lineDashFunc;
3883
3935
  private _canvas;
3884
3936
  private _context;
3937
+ private _linearGradientCache;
3885
3938
  /**
3886
3939
  * Get canvas
3887
3940
  */
@@ -4751,6 +4804,8 @@ declare module FintaChart {
4751
4804
  private _canvasEl;
4752
4805
  private _parentEl;
4753
4806
  private _renderer;
4807
+ private _sizeCache;
4808
+ private _sizeCacheStamp;
4754
4809
  /**
4755
4810
  * The canvas element.
4756
4811
  */
@@ -5348,14 +5403,29 @@ declare module FintaChart {
5348
5403
  * Control Drag Pane's root container
5349
5404
  */
5350
5405
  protected rootContainer: HTMLElement;
5351
- /**
5352
- * Draggable controller instance
5353
- */
5354
- private _draggableController;
5355
5406
  /**
5356
5407
  * Bound resize handler reference for cleanup
5357
5408
  */
5358
5409
  private _resizeHandler;
5410
+ /**
5411
+ * Whether the pane has been placed at its initial position
5412
+ */
5413
+ private _positioned;
5414
+ /**
5415
+ * Pointer offset from the pane top-left at drag start
5416
+ */
5417
+ private _dragOffsetX;
5418
+ private _dragOffsetY;
5419
+ /**
5420
+ * Bound drag handlers for cleanup
5421
+ */
5422
+ private _onDragStart;
5423
+ private _onDragMove;
5424
+ private _onDragEnd;
5425
+ /**
5426
+ * Drag handle element
5427
+ */
5428
+ private _handleEl;
5359
5429
  get visible(): boolean;
5360
5430
  /**
5361
5431
  * Creates an instance of DragPane.
@@ -5376,7 +5446,18 @@ declare module FintaChart {
5376
5446
  * Shows Control Drag Pane
5377
5447
  */
5378
5448
  protected show(): void;
5379
- private adjustPosition;
5449
+ /** Returns the offsetParent rect the pane is positioned against. */
5450
+ private parentRect;
5451
+ /** Places the pane near the top-center of the chart. */
5452
+ private placeInitial;
5453
+ private onDragStart;
5454
+ private onDragMove;
5455
+ private onDragEnd;
5456
+ /** Sets absolute position within the offsetParent, clamped inside it. */
5457
+ private applyPosition;
5458
+ private clampIntoViewport;
5459
+ private eventPoint;
5460
+ private teardownDrag;
5380
5461
  private onResize;
5381
5462
  }
5382
5463
  }
@@ -6041,6 +6122,206 @@ declare module FintaChart {
6041
6122
  private unsubscribe;
6042
6123
  }
6043
6124
  }
6125
+ declare module FintaChart {
6126
+ class ToolbarCalendar {
6127
+ private _chart;
6128
+ private _element;
6129
+ private _onSelect;
6130
+ private _selected;
6131
+ private _viewYear;
6132
+ private _viewMonth;
6133
+ private _months;
6134
+ private _weekdaysShort;
6135
+ private _clearText;
6136
+ private _todayText;
6137
+ constructor(chart: Chart, host: HTMLElement);
6138
+ get isVisible(): boolean;
6139
+ /**
6140
+ * Shows the calendar for the given selection.
6141
+ *
6142
+ * @param selected Currently selected date, highlighted in the grid.
6143
+ * @param onSelect Invoked with the picked date, or `null` when cleared.
6144
+ */
6145
+ show(selected: Date | null, onSelect: (date: Date | null) => void): void;
6146
+ hide(): void;
6147
+ private _loadLocalization;
6148
+ private _localize;
6149
+ private _splitLocalized;
6150
+ private _render;
6151
+ private _renderHeader;
6152
+ private _renderNavButton;
6153
+ private _renderGrid;
6154
+ private _renderDay;
6155
+ private _renderFooter;
6156
+ private _pick;
6157
+ private _isSameDay;
6158
+ private _shiftMonth;
6159
+ }
6160
+ }
6161
+ declare module FintaChart {
6162
+ /**
6163
+ * Identifier for a single toolbar button or group.
6164
+ * Names match tooltip hints for discoverability.
6165
+ */
6166
+ enum ToolbarItem {
6167
+ /** Options — hint */
6168
+ Theme = "theme",
6169
+ /** Options alias */
6170
+ Options = "options",
6171
+ /** Instrument — hint */
6172
+ InstrumentSearch = "instrumentSearch",
6173
+ /** Instrument alias */
6174
+ Instrument = "instrument",
6175
+ /** Timeframes — hint */
6176
+ TimeFramePicker = "timeFramePicker",
6177
+ /** Timeframes alias */
6178
+ Timeframes = "timeframes",
6179
+ /** Indicators */
6180
+ Indicators = "indicators",
6181
+ /** Candles — hint for ChartType */
6182
+ ChartType = "chartType",
6183
+ /** Candles alias */
6184
+ Candles = "candles",
6185
+ /** Compare — hint */
6186
+ CompareInstrument = "compareInstrument",
6187
+ /** Compare alias */
6188
+ Compare = "compare",
6189
+ /** Cursor options — hint */
6190
+ CrossHair = "crossHair",
6191
+ /** Cursor alias */
6192
+ Cursor = "cursor",
6193
+ /** CursorOptions alias */
6194
+ CursorOptions = "cursorOptions",
6195
+ /** Templates */
6196
+ Templates = "templates",
6197
+ /** Adjustment — hint */
6198
+ Adjust = "adjust",
6199
+ /** Adjustment alias */
6200
+ Adjustment = "adjustment",
6201
+ /** OHLC Pane — hint */
6202
+ Ohlc = "ohlc",
6203
+ /** OHLC Pane alias */
6204
+ OhlcPane = "ohlcPane",
6205
+ /** OHLC Cards — hint */
6206
+ OhlcCard = "ohlcCard",
6207
+ /** OHLC Cards alias */
6208
+ OhlcCards = "ohlcCards",
6209
+ /** Bar replay — hint */
6210
+ ReplayMode = "replayMode",
6211
+ /** BarReplay alias */
6212
+ BarReplay = "barReplay",
6213
+ /** Trading — hint */
6214
+ TradePanel = "tradePanel",
6215
+ /** Trading alias */
6216
+ Trading = "trading",
6217
+ /** Undo */
6218
+ Undo = "undo",
6219
+ /** Redo */
6220
+ Redo = "redo",
6221
+ /** Save as Image — hint */
6222
+ Snapshot = "snapshot",
6223
+ /** SaveImage alias */
6224
+ SaveImage = "saveImage",
6225
+ /** Export */
6226
+ Export = "export",
6227
+ /** View Mode */
6228
+ ViewMode = "viewMode",
6229
+ /** Trendlines — hint */
6230
+ Geometrical = "geometrical",
6231
+ /** Trendlines alias */
6232
+ Trendlines = "trendlines",
6233
+ /** Shapes — hint */
6234
+ Patterns = "patterns",
6235
+ /** Shapes alias */
6236
+ Shapes = "shapes",
6237
+ /** Scribble — hint name */
6238
+ Scribble = "scribble",
6239
+ /** FreeHand — code name, alias for Scribble */
6240
+ FreeHand = "freeHand",
6241
+ /** Fibonacci tools — hint */
6242
+ Fibonacci = "fibonacci",
6243
+ /** FibonacciTools alias */
6244
+ FibonacciTools = "fibonacciTools",
6245
+ /** Trend Channel Shapes — hint */
6246
+ TrendLines = "trendLines",
6247
+ /** TrendChannelShapes alias */
6248
+ TrendChannelShapes = "trendChannelShapes",
6249
+ /** Etc. Shapes — hint */
6250
+ LabelShapes = "labelShapes",
6251
+ /** EtcShapes alias */
6252
+ EtcShapes = "etcShapes",
6253
+ /** Visible Profile — hint */
6254
+ ProfileDrawing = "profileDrawing",
6255
+ /** ProfileTool alias */
6256
+ ProfileTool = "profileTool",
6257
+ /** Text */
6258
+ Text = "text",
6259
+ /** Bar Marker */
6260
+ BarMarker = "barMarker",
6261
+ /** Balloon */
6262
+ Balloon = "balloon",
6263
+ /** Measure */
6264
+ Measure = "measure",
6265
+ /** Positions */
6266
+ Positions = "positions",
6267
+ /** Zoom — hint */
6268
+ ZoomIn = "zoomIn",
6269
+ /** Zoom alias */
6270
+ Zoom = "zoom",
6271
+ /** In Shape Mode — hint */
6272
+ StayInShapeMode = "stayInShapeMode",
6273
+ /** InShapeMode alias */
6274
+ InShapeMode = "inShapeMode",
6275
+ /** Magnet — hint */
6276
+ MagnetMode = "magnetMode",
6277
+ /** Magnet alias */
6278
+ Magnet = "magnet",
6279
+ /** Lock — hint */
6280
+ LockMode = "lockMode",
6281
+ /** Lock alias */
6282
+ Lock = "lock",
6283
+ /** Hide drawings — hint */
6284
+ HideOptions = "hideOptions",
6285
+ /** HideDrawings alias */
6286
+ HideDrawings = "hideDrawings",
6287
+ /** Remove Selected Shape — hint */
6288
+ Delete = "delete",
6289
+ /** RemoveShape alias */
6290
+ RemoveShape = "removeShape",
6291
+ /** General Shapes — hint */
6292
+ Miscellaneous = "miscellaneous",
6293
+ /** GeneralShapes alias */
6294
+ GeneralShapes = "generalShapes",
6295
+ /** Date Range */
6296
+ DateRange = "dateRange",
6297
+ /** Sessions — hint */
6298
+ TradingSession = "tradingSession",
6299
+ /** Sessions alias */
6300
+ Sessions = "sessions",
6301
+ /** Log scale — hint */
6302
+ ScaleLog = "scaleLog",
6303
+ /** Log alias */
6304
+ Log = "log",
6305
+ /** Percent scale — hint */
6306
+ ScalePercent = "scalePercent",
6307
+ /** Percent alias */
6308
+ Percent = "percent",
6309
+ /** Auto scale — hint */
6310
+ ScaleAuto = "scaleAuto",
6311
+ /** Auto alias */
6312
+ Auto = "auto",
6313
+ /** Scroll to last bar */
6314
+ ScrollToLastBar = "scrollToLastBar"
6315
+ }
6316
+ /** Config can be array or map */
6317
+ type ToolbarHiddenItems = ToolbarItem[] | Partial<Record<ToolbarItem, boolean>>;
6318
+ /** Normalize array or map to array */
6319
+ function toolbarHiddenItemsToArray(input?: ToolbarHiddenItems | null): ToolbarItem[];
6320
+ /**
6321
+ * CSS selector for each ToolbarItem inside Toolbar container.
6322
+ */
6323
+ const ToolbarItemSelectors: Record<ToolbarItem, string>;
6324
+ }
6044
6325
  declare module FintaChart {
6045
6326
  /**
6046
6327
  * Represents Toolbar Config
@@ -6059,6 +6340,10 @@ declare module FintaChart {
6059
6340
  * Is show view mode
6060
6341
  */
6061
6342
  showViewMode?: boolean;
6343
+ /**
6344
+ * Toolbar items to hide — array or map
6345
+ */
6346
+ toolbarHiddenItems?: ToolbarHiddenItems;
6062
6347
  }
6063
6348
  /**
6064
6349
  * Provides model of Toolbar
@@ -6080,7 +6365,17 @@ declare module FintaChart {
6080
6365
  private _logScaleBtn;
6081
6366
  private _percentScaleBtn;
6082
6367
  private _lockShapesBtn;
6368
+ private _dateRangeButtons;
6369
+ private _dateRangeMenuItems;
6370
+ private _applyingDateRangePreset;
6371
+ private _dateRangeFrom;
6372
+ private _dateRangeTo;
6373
+ private _openDateRangePopup;
6374
+ private _dateRangeResizeObserver;
6375
+ private _dateRangeInlineWidth;
6083
6376
  private _scalePercentageAdapter;
6377
+ private _toolbarHiddenItems;
6378
+ private _appliedHiddenSelectors;
6084
6379
  onAmountChanged: (quantity: number) => void;
6085
6380
  /**
6086
6381
  * Creates an instance of Toolbar.
@@ -6114,6 +6409,16 @@ declare module FintaChart {
6114
6409
  getSearchInstrumentInput(): HTMLElement;
6115
6410
  lock(): void;
6116
6411
  dispose(): void;
6412
+ /** Get hidden toolbar items */
6413
+ getToolbarHiddenItems(): ToolbarItem[];
6414
+ /** Set hidden toolbar items and reapply */
6415
+ setToolbarHiddenItems(items: ToolbarHiddenItems): void;
6416
+ /** Hide/show toolbar elements via config */
6417
+ private applyToolbarVisibility;
6418
+ private setElementsVisibility;
6419
+ private cleanupToolbarDividers;
6420
+ private findPrevVisibleSibling;
6421
+ private findNextVisibleSibling;
6117
6422
  /**
6118
6423
  * Prepends Toolbar to
6119
6424
  *
@@ -6126,6 +6431,26 @@ declare module FintaChart {
6126
6431
  supportedTimeFramesShow(): void;
6127
6432
  private _createPeriodicityForm;
6128
6433
  private _subscribeToCreateCustomTimeFrame;
6434
+ private _subscribeDateRangeControls;
6435
+ private onDocumentTap;
6436
+ private _subscribeCollapsedDateRange;
6437
+ private _observeDateRangeWidth;
6438
+ private _subscribeCustomDateRange;
6439
+ private updateDateRangeApplyState;
6440
+ private formatDisplayDate;
6441
+ private truncateToDay;
6442
+ private endOfDay;
6443
+ /**
6444
+ * Applies a bottom-toolbar date-range preset (1D, 5D, ..., All).
6445
+ *
6446
+ * @param presetKey
6447
+ */
6448
+ applyDateRangePreset(presetKey: string): void;
6449
+ private applyDateRange;
6450
+ private setActiveDateRangeButton;
6451
+ private closestSupportedTimeFrame;
6452
+ private parseSupportedTimeFrame;
6453
+ private addToDate;
6129
6454
  setTimeFrame(timeFrame: TimeFrame): void;
6130
6455
  /**
6131
6456
  * Refresh toolbar components depend to size
@@ -6136,7 +6461,7 @@ declare module FintaChart {
6136
6461
  /**
6137
6462
  * Update trade panel units value
6138
6463
  *
6139
- * @param quantity
6464
+ * @param quantity default quantity expressed in units (backend contract)
6140
6465
  */
6141
6466
  updateTradeHandlerUnits(quantity: number): void;
6142
6467
  private activateStayInShapeModeBtn;
@@ -6155,6 +6480,8 @@ declare module FintaChart {
6155
6480
  private onCrossHairChange;
6156
6481
  private onDeleteClick;
6157
6482
  private onHideOptionClick;
6483
+ /** Reflects the hide buttons' active class from real chart state. */
6484
+ private syncHideButtonsState;
6158
6485
  onIndicatorsClick(): void;
6159
6486
  applyIndicator(typeName: string): void;
6160
6487
  private onInstrumentChange;
@@ -6297,6 +6624,13 @@ declare module FintaChart {
6297
6624
  private hideDropDown;
6298
6625
  private init;
6299
6626
  private setValue;
6627
+ /**
6628
+ * Handles a tap/click on the button head, routing to toggle, fire or
6629
+ * drop-down open depending on the button configuration and platform.
6630
+ *
6631
+ * @param e The originating tap/click event.
6632
+ */
6633
+ private handleHeadTap;
6300
6634
  private showDropDown;
6301
6635
  private toggleButton;
6302
6636
  private toggleDropDown;
@@ -7425,6 +7759,10 @@ declare module FintaChart {
7425
7759
  * Cross Hair State's cross hair type
7426
7760
  */
7427
7761
  type: string;
7762
+ /**
7763
+ * Cross Hair State's show bar offset
7764
+ */
7765
+ showBarOffset?: boolean;
7428
7766
  }
7429
7767
  /**
7430
7768
  * Represents Cross Hair Config
@@ -7434,6 +7772,10 @@ declare module FintaChart {
7434
7772
  * Cross Hair Config cross hair type
7435
7773
  */
7436
7774
  type?: string;
7775
+ /**
7776
+ * Cross Hair Config show bar offset
7777
+ */
7778
+ showBarOffset?: boolean;
7437
7779
  }
7438
7780
  enum CrossHairType {
7439
7781
  NONE = "none",
@@ -7468,6 +7810,14 @@ declare module FintaChart {
7468
7810
  * Set Cross Hair's type
7469
7811
  */
7470
7812
  set type(type: string);
7813
+ /**
7814
+ * Get Cross Hair's show bar offset
7815
+ */
7816
+ get showBarOffset(): boolean;
7817
+ /**
7818
+ * Set Cross Hair's show bar offset
7819
+ */
7820
+ set showBarOffset(value: boolean);
7471
7821
  /**
7472
7822
  * Creates an instance of CrossHair.
7473
7823
  *
@@ -8997,6 +9347,20 @@ declare module FintaChart {
8997
9347
  /**
8998
9348
  * Represents indicator state
8999
9349
  */
9350
+ /**
9351
+ * A single indicator plot value for the OHLC card.
9352
+ */
9353
+ interface IIndicatorHoverValue {
9354
+ name: string;
9355
+ color: string;
9356
+ value: string;
9357
+ }
9358
+ interface IIndicatorTitleItem {
9359
+ text: string;
9360
+ tooltip?: string;
9361
+ color?: string;
9362
+ values?: number[];
9363
+ }
9000
9364
  interface IIndicatorState {
9001
9365
  id?: string;
9002
9366
  parentId?: string;
@@ -9093,6 +9457,11 @@ declare module FintaChart {
9093
9457
  private _hovered;
9094
9458
  private _id;
9095
9459
  private _lineLevels;
9460
+ private _indicatorShapes;
9461
+ private _shapesById;
9462
+ private _shapesPanes;
9463
+ private _shapesForcePricePane;
9464
+ private _shapesFullyAttached;
9096
9465
  private _requireDefaults;
9097
9466
  private _optionsTitle;
9098
9467
  private _parametersContextMenu;
@@ -9103,6 +9472,8 @@ declare module FintaChart {
9103
9472
  private _alertTitle;
9104
9473
  private _selected;
9105
9474
  private _titleControls;
9475
+ private _titleItems;
9476
+ private _titleItemViews;
9106
9477
  private _toggleTitleVisibility;
9107
9478
  private _values;
9108
9479
  private _titleContextMenu;
@@ -9148,6 +9519,7 @@ declare module FintaChart {
9148
9519
  get theme(): any;
9149
9520
  set theme(value: any);
9150
9521
  get lineLevels(): any[];
9522
+ get indicatorShapes(): Shape[];
9151
9523
  /**
9152
9524
  * Allow setting dialog state
9153
9525
  */
@@ -9322,6 +9694,17 @@ declare module FintaChart {
9322
9694
  * @param pointY
9323
9695
  */
9324
9696
  addLine(color: string, pointY: number): void;
9697
+ setTitleItems(items: IIndicatorTitleItem[]): void;
9698
+ addShape(state: IShapeState): Shape | null;
9699
+ setIndicatorShapes(states: IShapeState[], opts?: {
9700
+ onPricePane?: boolean;
9701
+ }): void;
9702
+ upsertIndicatorShapes(states: IShapeState[]): void;
9703
+ private removeIndicatorShape;
9704
+ removeIndicatorShapes(): void;
9705
+ private isPixelAnchoredShape;
9706
+ private routeAndAttach;
9707
+ private attachIndicatorShapes;
9325
9708
  /**
9326
9709
  * Add plot
9327
9710
  *
@@ -9418,6 +9801,13 @@ declare module FintaChart {
9418
9801
  */
9419
9802
  updateHoverRecord(record?: number): void;
9420
9803
  getValues(): DataRowsCollection;
9804
+ /**
9805
+ * Per-plot values at a record for the OHLC card.
9806
+ *
9807
+ * @param record Record index; defaults to hovered record.
9808
+ * @return One { name, color, value } per plot.
9809
+ */
9810
+ hoverValues(record?: number): IIndicatorHoverValue[];
9421
9811
  /**
9422
9812
  * Update visibility of title elements
9423
9813
  */
@@ -9455,6 +9845,22 @@ declare module FintaChart {
9455
9845
  * Retrieve if needs custom scale
9456
9846
  */
9457
9847
  protected needsCustomScale(): boolean;
9848
+ /**
9849
+ * Retrieve if the plots must stay out of the vertical auto scale.
9850
+ *
9851
+ * Script-driven indicators report whatever the script emits, which is not
9852
+ * necessarily comparable with the price (a script that keeps `IsOverlay`
9853
+ * on while plotting zeros drags the price scale minimum down to zero).
9854
+ * The scale range also gates zoom and scroll, so such values do not only
9855
+ * squash the candles - they lock the vertical axis as well.
9856
+ *
9857
+ * Only applies while the indicator actually shares the price pane scale:
9858
+ * on its own pane, or bound to its own scale, its plots are the only
9859
+ * input that scale has and excluding them would leave nothing to scale by.
9860
+ *
9861
+ * Override in a subclass to opt a custom indicator back in.
9862
+ */
9863
+ protected excludeFromPriceAutoScale(): boolean;
9458
9864
  /**
9459
9865
  * Refresh item by number
9460
9866
  *
@@ -9467,6 +9873,17 @@ declare module FintaChart {
9467
9873
  private histogramTheme;
9468
9874
  private initIndicator;
9469
9875
  private initPaneTitle;
9876
+ private rebuildTitleItems;
9877
+ /**
9878
+ * Renders BBCode markup (as produced by the script engine's SetTitle) into the legend span.
9879
+ * Falls back to plain text if the markup carries no formatting.
9880
+ */
9881
+ private renderTitleItemText;
9882
+ /**
9883
+ * Tooltips live in a title attribute, which cannot carry markup - keep the text, drop the tags.
9884
+ */
9885
+ private static stripBBCode;
9886
+ private updateTitleItemValues;
9470
9887
  private setCustomScale;
9471
9888
  protected subscribe(): void;
9472
9889
  protected unsubscribe(): void;
@@ -13262,6 +13679,56 @@ declare module FintaChart {
13262
13679
  NORMAL = "normal",
13263
13680
  AUTOSCALED = "autoscaled"
13264
13681
  }
13682
+ /**
13683
+ * Describes the payload of the click events fired by a pane and by the chart.
13684
+ *
13685
+ * Delivered as the `value` field of the event object:
13686
+ * `chart.on(ChartEvent.CLICKED, e => console.log(e.value.price, e.value.date))`
13687
+ */
13688
+ interface IChartClickInfo {
13689
+ /**
13690
+ * The pane the click happened in.
13691
+ */
13692
+ pane: Pane;
13693
+ /**
13694
+ * Whether the clicked pane is the main (price) pane.
13695
+ */
13696
+ isPrimaryPane: boolean;
13697
+ /**
13698
+ * The date under the click position.
13699
+ */
13700
+ date: Date;
13701
+ /**
13702
+ * The formatted date, as shown on the horizontal axis.
13703
+ */
13704
+ dateText: string;
13705
+ /**
13706
+ * The index of the bar (record) under the click position.
13707
+ * May be out of the data range when clicking the empty space right of the last bar.
13708
+ */
13709
+ bar: number;
13710
+ /**
13711
+ * The value of the pane's main vertical scale under the click position.
13712
+ * On the primary pane this is the price, on an indicator pane it is the indicator value.
13713
+ */
13714
+ price: number;
13715
+ /**
13716
+ * The formatted price, as shown on the vertical axis.
13717
+ */
13718
+ priceText: string;
13719
+ /**
13720
+ * The click x coordinate, in chart coordinates.
13721
+ */
13722
+ x: number;
13723
+ /**
13724
+ * The click y coordinate, relative to the clicked pane.
13725
+ */
13726
+ y: number;
13727
+ /**
13728
+ * The original DOM event.
13729
+ */
13730
+ nativeEvent: Event;
13731
+ }
13265
13732
  const PaneEvent: {
13266
13733
  THEME_CHANGED: string;
13267
13734
  X_GRID_VISIBLE_CHANGED: string;
@@ -13274,6 +13741,7 @@ declare module FintaChart {
13274
13741
  OBJECT_REMOVED: string;
13275
13742
  DOUBLE_CLICKED: string;
13276
13743
  CONTEXT_MENU: string;
13744
+ CLICKED: string;
13277
13745
  };
13278
13746
  let formatConfig: any;
13279
13747
  /**
@@ -13540,6 +14008,19 @@ declare module FintaChart {
13540
14008
  containsShape(shape: Shape): boolean;
13541
14009
  dispose(): void;
13542
14010
  paint(): void;
14011
+ /**
14012
+ * Returns true when a shape is fully outside the visible frame and
14013
+ * safe to skip. Extrapolated shapes (lines/rays) and selected shapes
14014
+ * are never culled since they can extend across the viewport.
14015
+ */
14016
+ private isShapeOffscreen;
14017
+ /** Shape types that extend beyond their points and must not be culled. */
14018
+ private static NON_CULLABLE_SHAPES;
14019
+ static pGrid: number;
14020
+ static pObjects: number;
14021
+ static pIndicators: number;
14022
+ static pHover: number;
14023
+ static pWatermark: number;
13543
14024
  /**
13544
14025
  * Executes shapes
13545
14026
  *
@@ -13698,7 +14179,15 @@ declare module FintaChart {
13698
14179
  * @param record
13699
14180
  * @return
13700
14181
  */
14182
+ private _lastHoverKey;
13701
14183
  updateHoverRecord(record?: number): void;
14184
+ /**
14185
+ * Fills the OHLC card indicator rows for the hovered record.
14186
+ *
14187
+ * @param control The card's bar-info control.
14188
+ * @param record The hovered record index.
14189
+ */
14190
+ private renderOhlcCardIndicators;
13702
14191
  /**
13703
14192
  * Renders the live graphics of an OHLC info card: the volume bar (as a
13704
14193
  * fraction of the max visible volume) and the price sparkline (the last
@@ -13747,6 +14236,13 @@ declare module FintaChart {
13747
14236
  private getHeight;
13748
14237
  private getWidth;
13749
14238
  private onClick;
14239
+ /**
14240
+ * Fires PaneEvent.CLICKED and ChartEvent.CLICKED with the date and the value
14241
+ * under the click position.
14242
+ *
14243
+ * @param event
14244
+ */
14245
+ private invokeClickEvent;
13750
14246
  onContextMenu(motionEvent: MotionEvent, event: IWindowEvent): void;
13751
14247
  private onDoubleClick;
13752
14248
  private onMouseHover;
@@ -15014,6 +15510,12 @@ declare module FintaChart {
15014
15510
  private writeBlobToClipboard;
15015
15511
  private fallbackDownload;
15016
15512
  private showChartMessage;
15513
+ /**
15514
+ * Composites the chart's own canvas layers into one bitmap.
15515
+ * Far cheaper than serializing the whole DOM. Returns null when
15516
+ * no canvases are found so the caller can fall back.
15517
+ */
15518
+ private compositeCanvasLayers;
15017
15519
  private createSnapshot;
15018
15520
  private saveImage;
15019
15521
  /**
@@ -15781,6 +16283,17 @@ declare module FintaChart {
15781
16283
  * Enable scale vertical labels
15782
16284
  */
15783
16285
  enableVerticalAxisLabels: boolean;
16286
+ /**
16287
+ * Keeps the plot out of the vertical auto scale calculation.
16288
+ *
16289
+ * The plot is still painted, but its values never widen the value range
16290
+ * of the scale it is bound to. Intended for plots whose values are not
16291
+ * comparable with the rest of the scale (e.g. a custom script overlay
16292
+ * that reports zeros on the price pane), where letting them participate
16293
+ * would squash the primary data and, because the same range gates
16294
+ * zoom/scroll, lock the axis.
16295
+ */
16296
+ excludeFromAutoScale: boolean;
15784
16297
  /**
15785
16298
  * Stretch pricing lines
15786
16299
  */
@@ -15813,6 +16326,33 @@ declare module FintaChart {
15813
16326
  * Show pricing lines
15814
16327
  */
15815
16328
  showPricingLines: boolean;
16329
+ /**
16330
+ * Number of bars to project into the future beyond the last real bar.
16331
+ * Lines are drawn with a dashed style.
16332
+ */
16333
+ projectionBarsCount?: number;
16334
+ /**
16335
+ * Projection formula type:
16336
+ * - 'trend' (default): linear extrapolation by last two points: Y = Y_last + deltaY * N
16337
+ * - 'flat': horizontal extension Y = Y_last
16338
+ * - 'damped': Y_i = Y_{i-1} + deltaY * gamma^i, gamma in (0.8..0.95)
16339
+ * - 'regression': linear regression Y = a + b*X over last N bars
16340
+ * - 'sma': iterative SMA Y_future = avg(k) over real_or_future values
16341
+ * - 'polynomial': quadratic Y = a*i^2 + b*i + c over last N bars
16342
+ */
16343
+ projectionType?: string;
16344
+ /**
16345
+ * Damping coefficient gamma for 'damped' projection (0.8..0.95, default 0.9)
16346
+ */
16347
+ projectionDamping?: number;
16348
+ /**
16349
+ * Period for regression / polynomial fits (default 20)
16350
+ */
16351
+ projectionRegressionPeriod?: number;
16352
+ /**
16353
+ * Period for SMA projection (default 14)
16354
+ */
16355
+ projectionSmaPeriod?: number;
15816
16356
  }
15817
16357
  /**
15818
16358
  * Represents plot config
@@ -15931,6 +16471,10 @@ declare module FintaChart {
15931
16471
  * Open
15932
16472
  */
15933
16473
  open: number[];
16474
+ /**
16475
+ * Conflation step — draw every Nth bar when sub-pixel.
16476
+ */
16477
+ step: number;
15934
16478
  }
15935
16479
  /**
15936
16480
  * Represents plot defaults
@@ -16061,6 +16605,11 @@ declare module FintaChart {
16061
16605
  */
16062
16606
  get isVolume(): boolean;
16063
16607
  set isVolume(value: boolean);
16608
+ /**
16609
+ * Get is excluded from the vertical auto scale calculation
16610
+ */
16611
+ get excludeFromAutoScale(): boolean;
16612
+ set excludeFromAutoScale(value: boolean);
16064
16613
  /**
16065
16614
  * Creates an instance of Plot.
16066
16615
  *
@@ -16504,6 +17053,7 @@ declare module FintaChart {
16504
17053
  private paintSmoothedAreaLine;
16505
17054
  private paintSmoothShape;
16506
17055
  private paintSmoothedSimpleLine;
17056
+ private paintProjectionLine;
16507
17057
  }
16508
17058
  }
16509
17059
  declare module FintaChart {
@@ -17399,7 +17949,6 @@ declare module FintaChart {
17399
17949
  private updateCoordinateMapper;
17400
17950
  private autoScroll;
17401
17951
  private refresh;
17402
- private animateZoom;
17403
17952
  }
17404
17953
  }
17405
17954
  declare module FintaChart {
@@ -19404,6 +19953,7 @@ declare module FintaChart {
19404
19953
  private onPress;
19405
19954
  private onMouseHoverInternal;
19406
19955
  private onMoveInternal;
19956
+ private processMoveStep;
19407
19957
  private initMotionEvents;
19408
19958
  private clickHitTest;
19409
19959
  private moveHitTest;
@@ -20654,7 +21204,7 @@ declare module FintaChart {
20654
21204
  */
20655
21205
  class TextShape extends Shape {
20656
21206
  static get type(): string;
20657
- private _lines;
21207
+ private _parsed;
20658
21208
  /**
20659
21209
  * Creates an instance of TextShape.
20660
21210
  *
@@ -20673,7 +21223,124 @@ declare module FintaChart {
20673
21223
  restoreState(state: IShapeState): void;
20674
21224
  pointsLocalizationKeys(): string[];
20675
21225
  protected paintHovered(oldTheme: any): any;
21226
+ private get baseTextTheme();
20676
21227
  private updateLines;
21228
+ private deriveRunTheme;
21229
+ private measureLineWidth;
21230
+ }
21231
+ }
21232
+ declare module FintaChart {
21233
+ /**
21234
+ * Describes bar marker shape config.
21235
+ */
21236
+ interface IBarMarkerShapeConfig extends ITextShapeConfig {
21237
+ /**
21238
+ * Marker position relative to the bar: 'above' or 'below'
21239
+ */
21240
+ position?: string;
21241
+ /**
21242
+ * Marker shape: 'dot', 'arrowUp' or 'arrowDown'
21243
+ */
21244
+ marker?: string;
21245
+ }
21246
+ /**
21247
+ * Describes bar marker shape options.
21248
+ */
21249
+ interface IBarMarkerShapeOptions extends ITextShapeOptions {
21250
+ /**
21251
+ * Marker position relative to the bar
21252
+ */
21253
+ position?: string;
21254
+ /**
21255
+ * Marker shape
21256
+ */
21257
+ marker?: string;
21258
+ }
21259
+ /**
21260
+ * Describes bar marker shape defaults.
21261
+ */
21262
+ interface IBarMarkerShapeDefaults extends IShapeDefaults {
21263
+ /**
21264
+ * Default text label
21265
+ */
21266
+ text: string;
21267
+ /**
21268
+ * Default marker position
21269
+ */
21270
+ position: string;
21271
+ /**
21272
+ * Default marker shape
21273
+ */
21274
+ marker: string;
21275
+ }
21276
+ const BarMarkerPosition: {
21277
+ ABOVE: string;
21278
+ BELOW: string;
21279
+ };
21280
+ const BarMarkerKind: {
21281
+ DOT: string;
21282
+ ARROW_UP: string;
21283
+ ARROW_DOWN: string;
21284
+ };
21285
+ /**
21286
+ * Represents a dot (or arrow) with text attached to a bar from above or below.
21287
+ * Uses the Shape Text behavior: click to place on a bar, then edit the text in the settings dialog.
21288
+ *
21289
+ * @category Shapes
21290
+ */
21291
+ class BarMarkerShape extends TextShape {
21292
+ static get type(): string;
21293
+ static get subType(): string;
21294
+ static defaults: IBarMarkerShapeDefaults;
21295
+ /**
21296
+ * Creates an instance of BarMarkerShape.
21297
+ *
21298
+ * @param config
21299
+ */
21300
+ constructor(config?: IBarMarkerShapeConfig);
21301
+ protected get defaults(): IBarMarkerShapeDefaults;
21302
+ /**
21303
+ * Marker position relative to the bar
21304
+ */
21305
+ get position(): string;
21306
+ set position(value: string);
21307
+ /**
21308
+ * Marker shape kind
21309
+ */
21310
+ get marker(): string;
21311
+ set marker(value: string);
21312
+ get resizable(): boolean;
21313
+ set resizable(_value: boolean);
21314
+ get magnetMode(): string;
21315
+ set magnetMode(_value: string);
21316
+ get magnetPoint(): string;
21317
+ set magnetPoint(_value: string);
21318
+ /**
21319
+ * The label text ('E' by default when empty)
21320
+ */
21321
+ get text(): string;
21322
+ set text(value: string);
21323
+ finishNewShape(): void;
21324
+ bounds(): IBounds;
21325
+ paint(): void;
21326
+ hitTest(point: IPoint): boolean;
21327
+ /**
21328
+ * Auto-detects position and color from the bar type:
21329
+ * bullish (close >= open) — green marker above high,
21330
+ * bearish (close < open) — red marker below low.
21331
+ */
21332
+ private getBarDetails;
21333
+ /**
21334
+ * Snaps the shape point to the nearest bar on creation:
21335
+ * X is aligned to the bar center, Y is placed above high (or below low)
21336
+ * depending on the bar direction.
21337
+ */
21338
+ private snapToBar;
21339
+ /**
21340
+ * Computes pixel layout of the marker relative to its bar for the current frame
21341
+ */
21342
+ private markerLayout;
21343
+ protected magnetizePoint(point: IPoint): IPoint;
20677
21344
  }
20678
21345
  }
20679
21346
  declare module FintaChart {
@@ -22079,6 +22746,10 @@ declare module FintaChart {
22079
22746
  private generateList;
22080
22747
  deleteTemplate(key: string): void;
22081
22748
  selectTemplate(key: string): void;
22749
+ /** Fixed-positions the dropdown so the pane cell does not clip it. */
22750
+ private positionDropList;
22751
+ /** Clears inline fixed-positioning so the closed dropdown returns to flow. */
22752
+ private resetDropListPosition;
22082
22753
  private resetFibonacciLevels;
22083
22754
  }
22084
22755
  }
@@ -22880,6 +23551,14 @@ declare module FintaChart {
22880
23551
  private _takeProfitLine;
22881
23552
  private _stTpLine;
22882
23553
  private _selected;
23554
+ /**
23555
+ * Instance text width for kind.
23556
+ */
23557
+ private _kindTextWidth;
23558
+ /**
23559
+ * Instance text width for quantity.
23560
+ */
23561
+ private _quantityTextWidth;
22883
23562
  /**
22884
23563
  * Gets/Set position.
22885
23564
  */
@@ -23589,6 +24268,10 @@ declare module FintaChart {
23589
24268
  * Cross hair type
23590
24269
  */
23591
24270
  crossHair?: string;
24271
+ /**
24272
+ * Cross hair show bar offset
24273
+ */
24274
+ showCrossHairBarOffset?: boolean;
23592
24275
  /**
23593
24276
  * Chart DataFeed
23594
24277
  */
@@ -23703,6 +24386,10 @@ declare module FintaChart {
23703
24386
  showLogoWatermark?: boolean;
23704
24387
  useNewBrandedWatermark?: boolean;
23705
24388
  isChartWidget?: boolean;
24389
+ /**
24390
+ * Toolbar items to hide — array or map
24391
+ */
24392
+ toolbarHiddenItems?: ToolbarHiddenItems;
23706
24393
  }
23707
24394
  /**
23708
24395
  * Represents chart options
@@ -23744,6 +24431,10 @@ declare module FintaChart {
23744
24431
  * Is show chart bar info in title
23745
24432
  */
23746
24433
  showBarInfoInTitle: boolean;
24434
+ /**
24435
+ * Is show indicator legend/titles
24436
+ */
24437
+ showIndicatorLegend?: boolean;
23747
24438
  /**
23748
24439
  * Is show chart instrument watermark
23749
24440
  */
@@ -23864,6 +24555,14 @@ declare module FintaChart {
23864
24555
  Fok = "fok",
23865
24556
  Ioc = "ioc"
23866
24557
  }
24558
+ /**
24559
+ * Rendering quality: trades sharpness for paint speed on weak devices.
24560
+ */
24561
+ enum RenderQuality {
24562
+ LOW = "low",
24563
+ MEDIUM = "medium",
24564
+ HIGH = "high"
24565
+ }
23867
24566
  /**
23868
24567
  * Provides model of min and max
23869
24568
  */
@@ -23960,10 +24659,15 @@ declare module FintaChart {
23960
24659
  CHANGE_VISIBILITY_EXECUTION: string;
23961
24660
  ORDER_FEATURES_CHANGED: string;
23962
24661
  LOGO_WATERMARK_CLICKED: string;
24662
+ CLICKED: string;
23963
24663
  };
23964
24664
  const DEFAULT_BARS_COUNT = 500;
23965
24665
  const DEFAULT_MORE_BARS_COUNT = 1000;
23966
24666
  const DEFAULT_QUANTITY = 1;
24667
+ interface IDateRangeSelection {
24668
+ startDate: Date | null;
24669
+ endDate: Date | null;
24670
+ }
23967
24671
  const version = "2.0.0";
23968
24672
  enum AutoScalePanesKind {
23969
24673
  AllPanes = 0,
@@ -24001,6 +24705,8 @@ declare module FintaChart {
24001
24705
  private _lastObservedWidth;
24002
24706
  private _lastObservedHeight;
24003
24707
  private _resizeRafPending;
24708
+ private _windowResizeRafPending;
24709
+ private _renderQuality;
24004
24710
  private readonly _indicatorAlertsHandler;
24005
24711
  private readonly _addThemeCssClass;
24006
24712
  private readonly _barCountdown;
@@ -24017,11 +24723,21 @@ declare module FintaChart {
24017
24723
  readonly toolbar: Toolbar;
24018
24724
  readonly tradeHandler: ITradeHandlerCallback;
24019
24725
  readonly datafeed: IDatafeedBase;
24726
+ toolbarHiddenItems?: ToolbarHiddenItems;
24727
+ /** Get hidden toolbar items as array */
24728
+ getToolbarHiddenItems(): ToolbarItem[];
24729
+ /** Set hidden toolbar items and update toolbar */
24730
+ setToolbarHiddenItems(items: ToolbarHiddenItems): void;
24020
24731
  undoRedo: UndoRedoController;
24021
24732
  shapeSettings: ShapeSettingsDragPane;
24022
24733
  canLoadMoreBars: boolean;
24023
24734
  hoveredObject: IChartObject;
24024
- isMoving: boolean;
24735
+ private _isMoving;
24736
+ /**
24737
+ * True while a gesture (shape drag / chart scroll) is in progress.
24738
+ */
24739
+ get isMoving(): boolean;
24740
+ set isMoving(value: boolean);
24025
24741
  _suppressMeasureTool: boolean;
24026
24742
  multiChartRootContainer: HTMLElement;
24027
24743
  preventMouseEvents: boolean;
@@ -24083,12 +24799,20 @@ declare module FintaChart {
24083
24799
  private _lockShapes;
24084
24800
  private _pendingTimeFrameRangeClamp;
24085
24801
  private _pendingInstrumentChangeDateRange;
24802
+ private _pendingDateRangeSelection;
24803
+ private _dateRangeSelectionToken;
24086
24804
  private _lastBid;
24087
24805
  private _lastAsk;
24088
24806
  private _conversionRate;
24089
24807
  private _touchPanActive;
24090
24808
  private _touchPanLastX;
24809
+ private _gestureTimer;
24091
24810
  get isTouchPanActive(): boolean;
24811
+ /**
24812
+ * Caps repaint frequency during gestures (~30fps on mobile).
24813
+ */
24814
+ private updateGestureRefresh;
24815
+ markGestureActive(): void;
24092
24816
  get conversionRate(): {
24093
24817
  ask: number;
24094
24818
  bid: number;
@@ -24133,6 +24857,13 @@ declare module FintaChart {
24133
24857
  get timezone(): ITimezone | null;
24134
24858
  set timezone(data: ITimezone | null);
24135
24859
  constructor(config: IChartConfig);
24860
+ /**
24861
+ * Dev-only on-screen FPS / frame-time meter, shown only on localhost.
24862
+ * A small toggle button is placed at the right edge; clicking it starts
24863
+ * an independent rAF loop that measures the real display frame rate
24864
+ * (independent of the RefreshOptimizer throttle) during pan/zoom/hover.
24865
+ */
24866
+ private setupFpsMeter;
24136
24867
  get isInReplayMode(): boolean;
24137
24868
  get dateTimezoneConverter(): DateTimezoneConverter;
24138
24869
  get smoothLines(): boolean;
@@ -24215,6 +24946,14 @@ declare module FintaChart {
24215
24946
  */
24216
24947
  get crossHairType(): string;
24217
24948
  set crossHairType(value: string);
24949
+ /**
24950
+ * Get cross hair bar offset visibility
24951
+ */
24952
+ get showCrossHairBarOffset(): boolean;
24953
+ /**
24954
+ * Set cross hair bar offset visibility
24955
+ */
24956
+ set showCrossHairBarOffset(value: boolean);
24218
24957
  /**
24219
24958
  * Get chart css size
24220
24959
  */
@@ -24341,6 +25080,10 @@ declare module FintaChart {
24341
25080
  * Get chart root div element (native)
24342
25081
  */
24343
25082
  get rootDivEl(): HTMLElement;
25083
+ /**
25084
+ * Get chart background div element (native)
25085
+ */
25086
+ get backgroundEl(): HTMLElement;
24344
25087
  /**
24345
25088
  * Get chart root div
24346
25089
  */
@@ -24379,6 +25122,14 @@ declare module FintaChart {
24379
25122
  */
24380
25123
  get showBarInfoInTitle(): boolean;
24381
25124
  set showBarInfoInTitle(value: boolean);
25125
+ /**
25126
+ * Get show indicator legend/titles
25127
+ */
25128
+ get showIndicatorLegend(): boolean;
25129
+ /**
25130
+ * Set show indicator legend/titles across all panes
25131
+ */
25132
+ set showIndicatorLegend(value: boolean);
24382
25133
  /**
24383
25134
  * Get is chart show instrument watermark
24384
25135
  */
@@ -24437,6 +25188,15 @@ declare module FintaChart {
24437
25188
  */
24438
25189
  get zoomEnabled(): boolean;
24439
25190
  set zoomEnabled(value: boolean);
25191
+ /**
25192
+ * Rendering quality (sharpness vs paint speed).
25193
+ */
25194
+ get renderQuality(): RenderQuality;
25195
+ set renderQuality(value: RenderQuality);
25196
+ /**
25197
+ * Maps render quality to the DPR cap and max visible bars.
25198
+ */
25199
+ private applyRenderQualityCap;
24440
25200
  /**
24441
25201
  * Get trading session hours type
24442
25202
  */
@@ -24473,7 +25233,10 @@ declare module FintaChart {
24473
25233
  * @param event
24474
25234
  * @return Is event handled
24475
25235
  */
25236
+ static evtCount: number;
25237
+ static evtMs: number;
24476
25238
  onMouseEvents(event: Event): boolean;
25239
+ private onMouseEventsImpl;
24477
25240
  /**
24478
25241
  * Scrolling chart to real time arrow
24479
25242
  */
@@ -24593,6 +25356,19 @@ declare module FintaChart {
24593
25356
  * @return Data range
24594
25357
  */
24595
25358
  dateRange(startDate?: Date, endDate?: Date): any;
25359
+ /**
25360
+ * Shows the specified date range, loading missing history first and
25361
+ * optionally switching the time frame (used by the bottom-toolbar
25362
+ * date-range presets: 1D, 5D, ..., All).
25363
+ *
25364
+ * @param startDate Range start; `null` shows all available history.
25365
+ * @param endDate Range end; defaults to the last loaded bar.
25366
+ * @param timeFrame Optional time frame to switch to before applying the range.
25367
+ */
25368
+ setVisibleDateRange(startDate: Date | null, endDate?: Date | null, timeFrame?: ITimeFrame): void;
25369
+ private estimateDateRangeBarsCount;
25370
+ private applyDateRangeSelection;
25371
+ private waitForBarsRequestComplete;
24596
25372
  /**
24597
25373
  * Alias for `dispose()`. Both names are documented across the
24598
25374
  * public guides; both are supported on the runtime.
@@ -24607,6 +25383,7 @@ declare module FintaChart {
24607
25383
  /**
24608
25384
  * Paints horizontal scale and panes container
24609
25385
  */
25386
+ static lastPaintMs: number;
24610
25387
  paint(): void;
24611
25388
  /**
24612
25389
  * Executes indicator or indicators
@@ -24868,6 +25645,15 @@ declare module FintaChart {
24868
25645
  * @param makeAutoScale
24869
25646
  */
24870
25647
  refreshAsync(makeAutoScale?: boolean): void;
25648
+ private _tickRefreshInterval;
25649
+ private _lastTickRefresh;
25650
+ private _tickRefreshTimer;
25651
+ private _restoreIndicatorsTimer;
25652
+ /**
25653
+ * Throttled refresh for the live-tick path so a busy feed cannot force
25654
+ * a full repaint every frame. User gestures still use refreshAsync.
25655
+ */
25656
+ refreshOnTickAsync(): void;
24871
25657
  autoScalePanes(kind?: AutoScalePanesKind): void;
24872
25658
  /**
24873
25659
  * Sets chart window mode
@@ -24914,7 +25700,11 @@ declare module FintaChart {
24914
25700
  *
24915
25701
  * @param updateInstruments
24916
25702
  */
24917
- private hasRenderSize;
25703
+ static lastRefreshMs: number;
25704
+ static lastLayoutMs: number;
25705
+ static lastChartTypeMs: number;
25706
+ static lastHScaleMs: number;
25707
+ static lastPanesMs: number;
24918
25708
  refresh(updateInstruments?: boolean): void;
24919
25709
  /**
24920
25710
  * Triggers a repaint after direct property mutations (theme,
@@ -24995,10 +25785,24 @@ declare module FintaChart {
24995
25785
  */
24996
25786
  private ohlcCardRootContainer;
24997
25787
  private showOhlcCard;
25788
+ /**
25789
+ * Places the OHLC card at (left, top) but clamps it so the whole card
25790
+ */
25791
+ private clampOhlcCardPosition;
24998
25792
  private hideOhlcCard;
24999
25793
  toggleOhlcCardButton(show: boolean): void;
25000
25794
  setOhlcCardVariant(variant: string): void;
25001
25795
  private translateClonedShape;
25796
+ /**
25797
+ * Mobile uses touch only; mouse events emulate after taps.
25798
+ */
25799
+ private getInputEvents;
25800
+ /**
25801
+ * Switches input mode at runtime.
25802
+ *
25803
+ * @param mobile True to enable mobile (touch) input mode.
25804
+ */
25805
+ setMobileInputMode(mobile: boolean): void;
25002
25806
  private subscribe;
25003
25807
  private unsubscribe;
25004
25808
  private pointHitShapes;