@fintatech/fintachart 3.1.12 → 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.
- package/CHANGELOG.md +29 -0
- package/css/FintaChart.min.css +1 -1
- package/d.ts/FintaChart.d.ts +525 -2
- package/htmldialogs/IndicatorSettingsDialog.html +13 -0
- package/htmldialogs/ShapeSettingsDialog.html +1 -1
- package/htmldialogs/Toolbar.html +11 -2
- package/img/svg-icons/bar-marker.svg +1 -0
- package/localization/en.json +5 -0
- package/localization/uk.json +5 -0
- package/package.json +1 -1
- package/scripts/FintaChart.min.js +2 -2
package/d.ts/FintaChart.d.ts
CHANGED
|
@@ -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,120 @@ declare module FintaChart {
|
|
|
20879
21229
|
private measureLineWidth;
|
|
20880
21230
|
}
|
|
20881
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;
|
|
21344
|
+
}
|
|
21345
|
+
}
|
|
20882
21346
|
declare module FintaChart {
|
|
20883
21347
|
/**
|
|
20884
21348
|
* @category Shapes
|
|
@@ -23804,6 +24268,10 @@ declare module FintaChart {
|
|
|
23804
24268
|
* Cross hair type
|
|
23805
24269
|
*/
|
|
23806
24270
|
crossHair?: string;
|
|
24271
|
+
/**
|
|
24272
|
+
* Cross hair show bar offset
|
|
24273
|
+
*/
|
|
24274
|
+
showCrossHairBarOffset?: boolean;
|
|
23807
24275
|
/**
|
|
23808
24276
|
* Chart DataFeed
|
|
23809
24277
|
*/
|
|
@@ -23918,6 +24386,10 @@ declare module FintaChart {
|
|
|
23918
24386
|
showLogoWatermark?: boolean;
|
|
23919
24387
|
useNewBrandedWatermark?: boolean;
|
|
23920
24388
|
isChartWidget?: boolean;
|
|
24389
|
+
/**
|
|
24390
|
+
* Toolbar items to hide — array or map
|
|
24391
|
+
*/
|
|
24392
|
+
toolbarHiddenItems?: ToolbarHiddenItems;
|
|
23921
24393
|
}
|
|
23922
24394
|
/**
|
|
23923
24395
|
* Represents chart options
|
|
@@ -23959,6 +24431,10 @@ declare module FintaChart {
|
|
|
23959
24431
|
* Is show chart bar info in title
|
|
23960
24432
|
*/
|
|
23961
24433
|
showBarInfoInTitle: boolean;
|
|
24434
|
+
/**
|
|
24435
|
+
* Is show indicator legend/titles
|
|
24436
|
+
*/
|
|
24437
|
+
showIndicatorLegend?: boolean;
|
|
23962
24438
|
/**
|
|
23963
24439
|
* Is show chart instrument watermark
|
|
23964
24440
|
*/
|
|
@@ -24183,6 +24659,7 @@ declare module FintaChart {
|
|
|
24183
24659
|
CHANGE_VISIBILITY_EXECUTION: string;
|
|
24184
24660
|
ORDER_FEATURES_CHANGED: string;
|
|
24185
24661
|
LOGO_WATERMARK_CLICKED: string;
|
|
24662
|
+
CLICKED: string;
|
|
24186
24663
|
};
|
|
24187
24664
|
const DEFAULT_BARS_COUNT = 500;
|
|
24188
24665
|
const DEFAULT_MORE_BARS_COUNT = 1000;
|
|
@@ -24246,11 +24723,21 @@ declare module FintaChart {
|
|
|
24246
24723
|
readonly toolbar: Toolbar;
|
|
24247
24724
|
readonly tradeHandler: ITradeHandlerCallback;
|
|
24248
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;
|
|
24249
24731
|
undoRedo: UndoRedoController;
|
|
24250
24732
|
shapeSettings: ShapeSettingsDragPane;
|
|
24251
24733
|
canLoadMoreBars: boolean;
|
|
24252
24734
|
hoveredObject: IChartObject;
|
|
24253
|
-
|
|
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);
|
|
24254
24741
|
_suppressMeasureTool: boolean;
|
|
24255
24742
|
multiChartRootContainer: HTMLElement;
|
|
24256
24743
|
preventMouseEvents: boolean;
|
|
@@ -24319,7 +24806,13 @@ declare module FintaChart {
|
|
|
24319
24806
|
private _conversionRate;
|
|
24320
24807
|
private _touchPanActive;
|
|
24321
24808
|
private _touchPanLastX;
|
|
24809
|
+
private _gestureTimer;
|
|
24322
24810
|
get isTouchPanActive(): boolean;
|
|
24811
|
+
/**
|
|
24812
|
+
* Caps repaint frequency during gestures (~30fps on mobile).
|
|
24813
|
+
*/
|
|
24814
|
+
private updateGestureRefresh;
|
|
24815
|
+
markGestureActive(): void;
|
|
24323
24816
|
get conversionRate(): {
|
|
24324
24817
|
ask: number;
|
|
24325
24818
|
bid: number;
|
|
@@ -24453,6 +24946,14 @@ declare module FintaChart {
|
|
|
24453
24946
|
*/
|
|
24454
24947
|
get crossHairType(): string;
|
|
24455
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);
|
|
24456
24957
|
/**
|
|
24457
24958
|
* Get chart css size
|
|
24458
24959
|
*/
|
|
@@ -24579,6 +25080,10 @@ declare module FintaChart {
|
|
|
24579
25080
|
* Get chart root div element (native)
|
|
24580
25081
|
*/
|
|
24581
25082
|
get rootDivEl(): HTMLElement;
|
|
25083
|
+
/**
|
|
25084
|
+
* Get chart background div element (native)
|
|
25085
|
+
*/
|
|
25086
|
+
get backgroundEl(): HTMLElement;
|
|
24582
25087
|
/**
|
|
24583
25088
|
* Get chart root div
|
|
24584
25089
|
*/
|
|
@@ -24617,6 +25122,14 @@ declare module FintaChart {
|
|
|
24617
25122
|
*/
|
|
24618
25123
|
get showBarInfoInTitle(): boolean;
|
|
24619
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);
|
|
24620
25133
|
/**
|
|
24621
25134
|
* Get is chart show instrument watermark
|
|
24622
25135
|
*/
|
|
@@ -25280,6 +25793,16 @@ declare module FintaChart {
|
|
|
25280
25793
|
toggleOhlcCardButton(show: boolean): void;
|
|
25281
25794
|
setOhlcCardVariant(variant: string): void;
|
|
25282
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;
|
|
25283
25806
|
private subscribe;
|
|
25284
25807
|
private unsubscribe;
|
|
25285
25808
|
private pointHitShapes;
|