@fintatech/fintachart 3.1.12 → 3.1.14

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.
@@ -938,7 +938,7 @@ declare module FintaChart {
938
938
  * @param chart
939
939
  * @return
940
940
  */
941
- toolbar(chart?: Chart): Toolbar;
941
+ toolbar(chart?: Chart | IToolbarConfig): Toolbar;
942
942
  /**
943
943
  * Returns toolbar drop down button
944
944
  *
@@ -2825,6 +2825,10 @@ declare module FintaChart {
2825
2825
  */
2826
2826
  constructor(config?: IContextMenuMotionEventConfig);
2827
2827
  handleEvent(event: IWindowEvent): boolean;
2828
+ /**
2829
+ * Creates lightweight event snapshot.
2830
+ */
2831
+ private snapshot;
2828
2832
  private finish;
2829
2833
  private startTimer;
2830
2834
  private stopTimer;
@@ -3812,6 +3816,12 @@ declare module FintaChart {
3812
3816
  set htmlDialogs(value: string);
3813
3817
  }
3814
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;
3815
3825
  }
3816
3826
  declare module FintaChart {
3817
3827
  /**
@@ -6148,6 +6158,170 @@ declare module FintaChart {
6148
6158
  private _shiftMonth;
6149
6159
  }
6150
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
+ }
6151
6325
  declare module FintaChart {
6152
6326
  /**
6153
6327
  * Represents Toolbar Config
@@ -6166,6 +6340,10 @@ declare module FintaChart {
6166
6340
  * Is show view mode
6167
6341
  */
6168
6342
  showViewMode?: boolean;
6343
+ /**
6344
+ * Toolbar items to hide — array or map
6345
+ */
6346
+ toolbarHiddenItems?: ToolbarHiddenItems;
6169
6347
  }
6170
6348
  /**
6171
6349
  * Provides model of Toolbar
@@ -6196,6 +6374,8 @@ declare module FintaChart {
6196
6374
  private _dateRangeResizeObserver;
6197
6375
  private _dateRangeInlineWidth;
6198
6376
  private _scalePercentageAdapter;
6377
+ private _toolbarHiddenItems;
6378
+ private _appliedHiddenSelectors;
6199
6379
  onAmountChanged: (quantity: number) => void;
6200
6380
  /**
6201
6381
  * Creates an instance of Toolbar.
@@ -6229,6 +6409,16 @@ declare module FintaChart {
6229
6409
  getSearchInstrumentInput(): HTMLElement;
6230
6410
  lock(): void;
6231
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;
6232
6422
  /**
6233
6423
  * Prepends Toolbar to
6234
6424
  *
@@ -7569,6 +7759,10 @@ declare module FintaChart {
7569
7759
  * Cross Hair State's cross hair type
7570
7760
  */
7571
7761
  type: string;
7762
+ /**
7763
+ * Cross Hair State's show bar offset
7764
+ */
7765
+ showBarOffset?: boolean;
7572
7766
  }
7573
7767
  /**
7574
7768
  * Represents Cross Hair Config
@@ -7578,6 +7772,10 @@ declare module FintaChart {
7578
7772
  * Cross Hair Config cross hair type
7579
7773
  */
7580
7774
  type?: string;
7775
+ /**
7776
+ * Cross Hair Config show bar offset
7777
+ */
7778
+ showBarOffset?: boolean;
7581
7779
  }
7582
7780
  enum CrossHairType {
7583
7781
  NONE = "none",
@@ -7612,6 +7810,14 @@ declare module FintaChart {
7612
7810
  * Set Cross Hair's type
7613
7811
  */
7614
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);
7615
7821
  /**
7616
7822
  * Creates an instance of CrossHair.
7617
7823
  *
@@ -9149,6 +9355,12 @@ declare module FintaChart {
9149
9355
  color: string;
9150
9356
  value: string;
9151
9357
  }
9358
+ interface IIndicatorTitleItem {
9359
+ text: string;
9360
+ tooltip?: string;
9361
+ color?: string;
9362
+ values?: number[];
9363
+ }
9152
9364
  interface IIndicatorState {
9153
9365
  id?: string;
9154
9366
  parentId?: string;
@@ -9260,6 +9472,8 @@ declare module FintaChart {
9260
9472
  private _alertTitle;
9261
9473
  private _selected;
9262
9474
  private _titleControls;
9475
+ private _titleItems;
9476
+ private _titleItemViews;
9263
9477
  private _toggleTitleVisibility;
9264
9478
  private _values;
9265
9479
  private _titleContextMenu;
@@ -9480,11 +9694,13 @@ declare module FintaChart {
9480
9694
  * @param pointY
9481
9695
  */
9482
9696
  addLine(color: string, pointY: number): void;
9697
+ setTitleItems(items: IIndicatorTitleItem[]): void;
9483
9698
  addShape(state: IShapeState): Shape | null;
9484
9699
  setIndicatorShapes(states: IShapeState[], opts?: {
9485
9700
  onPricePane?: boolean;
9486
9701
  }): void;
9487
9702
  upsertIndicatorShapes(states: IShapeState[]): void;
9703
+ private removeIndicatorShape;
9488
9704
  removeIndicatorShapes(): void;
9489
9705
  private isPixelAnchoredShape;
9490
9706
  private routeAndAttach;
@@ -9629,6 +9845,22 @@ declare module FintaChart {
9629
9845
  * Retrieve if needs custom scale
9630
9846
  */
9631
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;
9632
9864
  /**
9633
9865
  * Refresh item by number
9634
9866
  *
@@ -9641,6 +9873,17 @@ declare module FintaChart {
9641
9873
  private histogramTheme;
9642
9874
  private initIndicator;
9643
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;
9644
9887
  private setCustomScale;
9645
9888
  protected subscribe(): void;
9646
9889
  protected unsubscribe(): void;
@@ -13436,6 +13679,56 @@ declare module FintaChart {
13436
13679
  NORMAL = "normal",
13437
13680
  AUTOSCALED = "autoscaled"
13438
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
+ }
13439
13732
  const PaneEvent: {
13440
13733
  THEME_CHANGED: string;
13441
13734
  X_GRID_VISIBLE_CHANGED: string;
@@ -13448,6 +13741,7 @@ declare module FintaChart {
13448
13741
  OBJECT_REMOVED: string;
13449
13742
  DOUBLE_CLICKED: string;
13450
13743
  CONTEXT_MENU: string;
13744
+ CLICKED: string;
13451
13745
  };
13452
13746
  let formatConfig: any;
13453
13747
  /**
@@ -13942,6 +14236,13 @@ declare module FintaChart {
13942
14236
  private getHeight;
13943
14237
  private getWidth;
13944
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;
13945
14246
  onContextMenu(motionEvent: MotionEvent, event: IWindowEvent): void;
13946
14247
  private onDoubleClick;
13947
14248
  private onMouseHover;
@@ -15982,6 +16283,17 @@ declare module FintaChart {
15982
16283
  * Enable scale vertical labels
15983
16284
  */
15984
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;
15985
16297
  /**
15986
16298
  * Stretch pricing lines
15987
16299
  */
@@ -16014,6 +16326,33 @@ declare module FintaChart {
16014
16326
  * Show pricing lines
16015
16327
  */
16016
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;
16017
16356
  }
16018
16357
  /**
16019
16358
  * Represents plot config
@@ -16132,6 +16471,10 @@ declare module FintaChart {
16132
16471
  * Open
16133
16472
  */
16134
16473
  open: number[];
16474
+ /**
16475
+ * Conflation step — draw every Nth bar when sub-pixel.
16476
+ */
16477
+ step: number;
16135
16478
  }
16136
16479
  /**
16137
16480
  * Represents plot defaults
@@ -16262,6 +16605,11 @@ declare module FintaChart {
16262
16605
  */
16263
16606
  get isVolume(): boolean;
16264
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);
16265
16613
  /**
16266
16614
  * Creates an instance of Plot.
16267
16615
  *
@@ -16705,6 +17053,7 @@ declare module FintaChart {
16705
17053
  private paintSmoothedAreaLine;
16706
17054
  private paintSmoothShape;
16707
17055
  private paintSmoothedSimpleLine;
17056
+ private paintProjectionLine;
16708
17057
  }
16709
17058
  }
16710
17059
  declare module FintaChart {
@@ -19604,6 +19953,7 @@ declare module FintaChart {
19604
19953
  private onPress;
19605
19954
  private onMouseHoverInternal;
19606
19955
  private onMoveInternal;
19956
+ private processMoveStep;
19607
19957
  private initMotionEvents;
19608
19958
  private clickHitTest;
19609
19959
  private moveHitTest;
@@ -20879,6 +21229,188 @@ declare module FintaChart {
20879
21229
  private measureLineWidth;
20880
21230
  }
20881
21231
  }
21232
+ declare module FintaChart {
21233
+ export enum BarMarkerPosition {
21234
+ AUTO = "auto",
21235
+ ABOVE = "above",
21236
+ BELOW = "below"
21237
+ }
21238
+ export enum BarMarkerKind {
21239
+ DOT = "dot",
21240
+ ARROW_UP = "arrowUp",
21241
+ ARROW_DOWN = "arrowDown",
21242
+ ARROW_AUTO = "arrowAuto",
21243
+ SQUARE = "square",
21244
+ DIAMOND = "diamond",
21245
+ STAR = "star",
21246
+ CROSS = "cross",
21247
+ LINE = "line"
21248
+ }
21249
+ export interface BarMarkerNeighbor {
21250
+ x: number;
21251
+ yMarker: number;
21252
+ color: string;
21253
+ lineWidth: number;
21254
+ }
21255
+ export enum BarMarkerAnchor {
21256
+ HIGH = "high",
21257
+ LOW = "low",
21258
+ OPEN = "open",
21259
+ CLOSE = "close",
21260
+ POINT = "point"
21261
+ }
21262
+ export enum BarMarkerColor {
21263
+ AUTO = "auto",
21264
+ RED = "#ec5a58",
21265
+ GREEN = "#26a69a",
21266
+ ORANGE = "#f7931a",
21267
+ BLUE = "#2196f3",
21268
+ YELLOW = "#fdd835",
21269
+ PURPLE = "#ab47bc",
21270
+ WHITE = "#ffffff",
21271
+ CUSTOM = "custom"
21272
+ }
21273
+ interface IBarMarkerFields {
21274
+ position?: BarMarkerPosition;
21275
+ marker?: BarMarkerKind;
21276
+ markerColor?: BarMarkerColor;
21277
+ customMarkerColor?: string;
21278
+ gradientFrom?: string;
21279
+ gradientTo?: string;
21280
+ anchorSource?: BarMarkerAnchor;
21281
+ offsetY?: number;
21282
+ badgeBorderRadius?: number;
21283
+ badgeBorderColor?: string;
21284
+ badgeBorderWidth?: number;
21285
+ backgroundColor?: string;
21286
+ textColor?: string;
21287
+ connectLines?: boolean;
21288
+ neighborSearchRange?: number;
21289
+ }
21290
+ export interface IBarMarkerShapeConfig extends ITextShapeConfig, IBarMarkerFields {
21291
+ }
21292
+ export interface IBarMarkerShapeOptions extends ITextShapeOptions, IBarMarkerFields {
21293
+ }
21294
+ export interface IBarMarkerShapeDefaults extends IShapeDefaults, Required<IBarMarkerFields> {
21295
+ text: string;
21296
+ }
21297
+ /**
21298
+ * Represents a dot (or arrow) with text attached to a bar from above or below.
21299
+ * Uses the Shape Text behavior: click to place on a bar, then edit the text in the settings dialog.
21300
+ *
21301
+ * @category Shapes
21302
+ */
21303
+ export class BarMarkerShape extends TextShape {
21304
+ static get type(): string;
21305
+ static get subType(): string;
21306
+ static defaults: IBarMarkerShapeDefaults;
21307
+ constructor(config?: IBarMarkerShapeConfig);
21308
+ protected get defaults(): IBarMarkerShapeDefaults;
21309
+ private get chartTypeName();
21310
+ private get isLineOrAreaChart();
21311
+ private get isPointAndFigureChart();
21312
+ /**
21313
+ * Returns the bar data rows appropriate for the current chart type.
21314
+ * For P&F charts, returns the calculated P&F data rows so markers
21315
+ * align with the P&F grid instead of the raw OHLC data.
21316
+ */
21317
+ private getBarDataRows;
21318
+ private get opts();
21319
+ /** Reads an option falling back to defaults; `nullish` = use `??` instead of `||`. */
21320
+ private opt;
21321
+ /** Writes an option and triggers a repaint. */
21322
+ private setOpt;
21323
+ private _positionExplicitlySet;
21324
+ get position(): BarMarkerPosition;
21325
+ set position(value: BarMarkerPosition);
21326
+ get marker(): BarMarkerKind;
21327
+ set marker(value: BarMarkerKind);
21328
+ private _anchorExplicitlySet;
21329
+ get anchorSource(): BarMarkerAnchor;
21330
+ set anchorSource(value: BarMarkerAnchor);
21331
+ get offsetY(): number;
21332
+ set offsetY(value: number);
21333
+ get badgeBorderRadius(): number;
21334
+ set badgeBorderRadius(value: number);
21335
+ get badgeBorderColor(): string;
21336
+ set badgeBorderColor(value: string);
21337
+ get badgeBorderWidth(): number;
21338
+ set badgeBorderWidth(value: number);
21339
+ get backgroundColor(): string;
21340
+ set backgroundColor(value: string);
21341
+ get textColor(): string;
21342
+ set textColor(value: string);
21343
+ get connectLines(): boolean;
21344
+ set connectLines(value: boolean);
21345
+ get neighborSearchRange(): number;
21346
+ set neighborSearchRange(value: number);
21347
+ private _colorExplicitlySet;
21348
+ get markerColor(): BarMarkerColor;
21349
+ set markerColor(value: BarMarkerColor);
21350
+ get customMarkerColor(): string;
21351
+ set customMarkerColor(value: string);
21352
+ get gradientFrom(): string;
21353
+ set gradientFrom(value: string);
21354
+ get gradientTo(): string;
21355
+ set gradientTo(value: string);
21356
+ get resizable(): boolean;
21357
+ set resizable(_value: boolean);
21358
+ get magnetMode(): string;
21359
+ set magnetMode(_value: string);
21360
+ get magnetPoint(): string;
21361
+ set magnetPoint(_value: string);
21362
+ get text(): string;
21363
+ set text(value: string);
21364
+ /**
21365
+ * Returns the text with dynamic macros resolved: {price} {open} {high} {low}
21366
+ * {close} {volume} {time} (HH:mm) {date} (YYYY-MM-DD).
21367
+ */
21368
+ get resolvedText(): string;
21369
+ finishNewShape(): void;
21370
+ bounds(): IBounds;
21371
+ paint(): void;
21372
+ hitTest(point: IPoint): boolean;
21373
+ /** Draws the badge background/border and the label text. */
21374
+ private paintBadge;
21375
+ /** Paints connecting lines to neighboring LINE BarMarkerShapes. */
21376
+ private paintConnections;
21377
+ private resolvedMarkerKind;
21378
+ private getMarkerLayoutForConnection;
21379
+ /** Resolves ARROW_AUTO to the actual arrow kind based on bar position. */
21380
+ private resolveMarkerKind;
21381
+ /**
21382
+ * Resolves the final marker color: explicit user choice (preset/custom) wins,
21383
+ * otherwise falls back to auto-detection from the candle direction.
21384
+ */
21385
+ private resolveMarkerColor;
21386
+ /**
21387
+ * Resolves anchor value when only a subset of OHLC data is available
21388
+ * (e.g. Line/Area charts or P&F columns that lack full OHLC).
21389
+ */
21390
+ private resolveAnchorValue;
21391
+ private resolveGradient;
21392
+ /**
21393
+ * Resolves position, color and anchor value for a bar.
21394
+ * User-set position/anchorSource win over auto-detection from candle direction.
21395
+ */
21396
+ private getBarDetails;
21397
+ /**
21398
+ * Line / Area charts expose a single closing price per record.
21399
+ * The marker is always placed at the close value, above the line.
21400
+ */
21401
+ private getLineOrAreaBarDetails;
21402
+ /**
21403
+ * Snaps the shape point to the nearest bar on creation:
21404
+ * X is aligned to the bar center, Y is placed above high (or below low)
21405
+ * depending on the bar direction.
21406
+ */
21407
+ private snapToBar;
21408
+ /** Computes pixel layout of the marker relative to its bar for the current frame. */
21409
+ private markerLayout;
21410
+ protected magnetizePoint(point: IPoint): IPoint;
21411
+ }
21412
+ export {};
21413
+ }
20882
21414
  declare module FintaChart {
20883
21415
  /**
20884
21416
  * @category Shapes
@@ -23804,6 +24336,10 @@ declare module FintaChart {
23804
24336
  * Cross hair type
23805
24337
  */
23806
24338
  crossHair?: string;
24339
+ /**
24340
+ * Cross hair show bar offset
24341
+ */
24342
+ showCrossHairBarOffset?: boolean;
23807
24343
  /**
23808
24344
  * Chart DataFeed
23809
24345
  */
@@ -23918,6 +24454,10 @@ declare module FintaChart {
23918
24454
  showLogoWatermark?: boolean;
23919
24455
  useNewBrandedWatermark?: boolean;
23920
24456
  isChartWidget?: boolean;
24457
+ /**
24458
+ * Toolbar items to hide — array or map
24459
+ */
24460
+ toolbarHiddenItems?: ToolbarHiddenItems;
23921
24461
  }
23922
24462
  /**
23923
24463
  * Represents chart options
@@ -23959,6 +24499,10 @@ declare module FintaChart {
23959
24499
  * Is show chart bar info in title
23960
24500
  */
23961
24501
  showBarInfoInTitle: boolean;
24502
+ /**
24503
+ * Is show indicator legend/titles
24504
+ */
24505
+ showIndicatorLegend?: boolean;
23962
24506
  /**
23963
24507
  * Is show chart instrument watermark
23964
24508
  */
@@ -24183,6 +24727,7 @@ declare module FintaChart {
24183
24727
  CHANGE_VISIBILITY_EXECUTION: string;
24184
24728
  ORDER_FEATURES_CHANGED: string;
24185
24729
  LOGO_WATERMARK_CLICKED: string;
24730
+ CLICKED: string;
24186
24731
  };
24187
24732
  const DEFAULT_BARS_COUNT = 500;
24188
24733
  const DEFAULT_MORE_BARS_COUNT = 1000;
@@ -24246,11 +24791,21 @@ declare module FintaChart {
24246
24791
  readonly toolbar: Toolbar;
24247
24792
  readonly tradeHandler: ITradeHandlerCallback;
24248
24793
  readonly datafeed: IDatafeedBase;
24794
+ toolbarHiddenItems?: ToolbarHiddenItems;
24795
+ /** Get hidden toolbar items as array */
24796
+ getToolbarHiddenItems(): ToolbarItem[];
24797
+ /** Set hidden toolbar items and update toolbar */
24798
+ setToolbarHiddenItems(items: ToolbarHiddenItems): void;
24249
24799
  undoRedo: UndoRedoController;
24250
24800
  shapeSettings: ShapeSettingsDragPane;
24251
24801
  canLoadMoreBars: boolean;
24252
24802
  hoveredObject: IChartObject;
24253
- isMoving: boolean;
24803
+ private _isMoving;
24804
+ /**
24805
+ * True while a gesture (shape drag / chart scroll) is in progress.
24806
+ */
24807
+ get isMoving(): boolean;
24808
+ set isMoving(value: boolean);
24254
24809
  _suppressMeasureTool: boolean;
24255
24810
  multiChartRootContainer: HTMLElement;
24256
24811
  preventMouseEvents: boolean;
@@ -24319,7 +24874,13 @@ declare module FintaChart {
24319
24874
  private _conversionRate;
24320
24875
  private _touchPanActive;
24321
24876
  private _touchPanLastX;
24877
+ private _gestureTimer;
24322
24878
  get isTouchPanActive(): boolean;
24879
+ /**
24880
+ * Caps repaint frequency during gestures (~30fps on mobile).
24881
+ */
24882
+ private updateGestureRefresh;
24883
+ markGestureActive(): void;
24323
24884
  get conversionRate(): {
24324
24885
  ask: number;
24325
24886
  bid: number;
@@ -24453,6 +25014,14 @@ declare module FintaChart {
24453
25014
  */
24454
25015
  get crossHairType(): string;
24455
25016
  set crossHairType(value: string);
25017
+ /**
25018
+ * Get cross hair bar offset visibility
25019
+ */
25020
+ get showCrossHairBarOffset(): boolean;
25021
+ /**
25022
+ * Set cross hair bar offset visibility
25023
+ */
25024
+ set showCrossHairBarOffset(value: boolean);
24456
25025
  /**
24457
25026
  * Get chart css size
24458
25027
  */
@@ -24579,6 +25148,10 @@ declare module FintaChart {
24579
25148
  * Get chart root div element (native)
24580
25149
  */
24581
25150
  get rootDivEl(): HTMLElement;
25151
+ /**
25152
+ * Get chart background div element (native)
25153
+ */
25154
+ get backgroundEl(): HTMLElement;
24582
25155
  /**
24583
25156
  * Get chart root div
24584
25157
  */
@@ -24617,6 +25190,14 @@ declare module FintaChart {
24617
25190
  */
24618
25191
  get showBarInfoInTitle(): boolean;
24619
25192
  set showBarInfoInTitle(value: boolean);
25193
+ /**
25194
+ * Get show indicator legend/titles
25195
+ */
25196
+ get showIndicatorLegend(): boolean;
25197
+ /**
25198
+ * Set show indicator legend/titles across all panes
25199
+ */
25200
+ set showIndicatorLegend(value: boolean);
24620
25201
  /**
24621
25202
  * Get is chart show instrument watermark
24622
25203
  */
@@ -25280,6 +25861,16 @@ declare module FintaChart {
25280
25861
  toggleOhlcCardButton(show: boolean): void;
25281
25862
  setOhlcCardVariant(variant: string): void;
25282
25863
  private translateClonedShape;
25864
+ /**
25865
+ * Mobile uses touch only; mouse events emulate after taps.
25866
+ */
25867
+ private getInputEvents;
25868
+ /**
25869
+ * Switches input mode at runtime.
25870
+ *
25871
+ * @param mobile True to enable mobile (touch) input mode.
25872
+ */
25873
+ setMobileInputMode(mobile: boolean): void;
25283
25874
  private subscribe;
25284
25875
  private unsubscribe;
25285
25876
  private pointHitShapes;