@trdrs/quickcharts 4.1.0 → 5.0.1
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 +94 -0
- package/README.md +276 -59
- package/dist/adapters/rest.d.ts +4 -4
- package/dist/adapters/rest.js +1 -1
- package/dist/adapters/rest.js.map +1 -1
- package/dist/ar-TG26ZCCE.js +1322 -0
- package/dist/ar-TG26ZCCE.js.map +1 -0
- package/dist/{assets-BF-NDyHl.d.ts → assets-DF3nozNV.d.ts} +161 -17
- package/dist/ca_ES-WJWH5BXU.js +1322 -0
- package/dist/ca_ES-WJWH5BXU.js.map +1 -0
- package/dist/{chunk-D3S26ARP.js → chunk-EXJAJZTN.js} +1 -1
- package/dist/chunk-EXJAJZTN.js.map +1 -0
- package/dist/{chunk-TBOVLJAK.js → chunk-Q3DCXQDW.js} +85 -19
- package/dist/chunk-Q3DCXQDW.js.map +1 -0
- package/dist/de-SUDTTPQ3.js +1322 -0
- package/dist/de-SUDTTPQ3.js.map +1 -0
- package/dist/drawings.d.ts +3 -3
- package/dist/drawings.js +1 -1
- package/dist/es-FOBXUK2X.js +1322 -0
- package/dist/es-FOBXUK2X.js.map +1 -0
- package/dist/feature-manifest.json +105 -9
- package/dist/fr-7KQC4IJH.js +1322 -0
- package/dist/fr-7KQC4IJH.js.map +1 -0
- package/dist/he_IL-2T6XBA6D.js +1322 -0
- package/dist/he_IL-2T6XBA6D.js.map +1 -0
- package/dist/id_ID-SI25N57C.js +1322 -0
- package/dist/id_ID-SI25N57C.js.map +1 -0
- package/dist/index.d.ts +862 -103
- package/dist/index.js +12251 -7910
- package/dist/index.js.map +1 -1
- package/dist/it-PMSTWZDL.js +1322 -0
- package/dist/it-PMSTWZDL.js.map +1 -0
- package/dist/ja-PABDRAXV.js +1322 -0
- package/dist/ja-PABDRAXV.js.map +1 -0
- package/dist/ko-JHRYYFCV.js +1322 -0
- package/dist/ko-JHRYYFCV.js.map +1 -0
- package/dist/ms_MY-U4EE5Q4V.js +1322 -0
- package/dist/ms_MY-U4EE5Q4V.js.map +1 -0
- package/dist/pl-4HCG3T3J.js +1322 -0
- package/dist/pl-4HCG3T3J.js.map +1 -0
- package/dist/pt-6LTNN653.js +1322 -0
- package/dist/pt-6LTNN653.js.map +1 -0
- package/dist/quickcharts.css +586 -198
- package/dist/{resources-C0cYryO9.d.ts → resources-XglhzzW0.d.ts} +4 -2
- package/dist/rest-openapi.json +16 -11
- package/dist/ru-LFHCSDBV.js +1322 -0
- package/dist/ru-LFHCSDBV.js.map +1 -0
- package/dist/sv-4XVUXYK6.js +1322 -0
- package/dist/sv-4XVUXYK6.js.map +1 -0
- package/dist/{symbols-6V22WaRX.d.ts → symbols-DdHLHQFC.d.ts} +77 -8
- package/dist/symbols.d.ts +1 -1
- package/dist/th-WM2PVA24.js +1322 -0
- package/dist/th-WM2PVA24.js.map +1 -0
- package/dist/theme-manifest.json +105 -21
- package/dist/tr-HMAZXSJM.js +1322 -0
- package/dist/tr-HMAZXSJM.js.map +1 -0
- package/dist/vi-ITFBV5B7.js +1322 -0
- package/dist/vi-ITFBV5B7.js.map +1 -0
- package/dist/zh-ZGU2RI7K.js +1322 -0
- package/dist/zh-ZGU2RI7K.js.map +1 -0
- package/dist/zh_TW-PNINSQ6F.js +1322 -0
- package/dist/zh_TW-PNINSQ6F.js.map +1 -0
- package/package.json +1 -1
- package/dist/ar-VILLYPAA.js +0 -1181
- package/dist/ar-VILLYPAA.js.map +0 -1
- package/dist/ca_ES-EJXLAXOA.js +0 -1181
- package/dist/ca_ES-EJXLAXOA.js.map +0 -1
- package/dist/chunk-D3S26ARP.js.map +0 -1
- package/dist/chunk-TBOVLJAK.js.map +0 -1
- package/dist/de-PHID4SVN.js +0 -1181
- package/dist/de-PHID4SVN.js.map +0 -1
- package/dist/es-KD4FBLOP.js +0 -1181
- package/dist/es-KD4FBLOP.js.map +0 -1
- package/dist/fr-KTTX3FF3.js +0 -1181
- package/dist/fr-KTTX3FF3.js.map +0 -1
- package/dist/he_IL-Z3DXMAKZ.js +0 -1181
- package/dist/he_IL-Z3DXMAKZ.js.map +0 -1
- package/dist/id_ID-FFX6X4C5.js +0 -1181
- package/dist/id_ID-FFX6X4C5.js.map +0 -1
- package/dist/it-X2GFCLGU.js +0 -1181
- package/dist/it-X2GFCLGU.js.map +0 -1
- package/dist/ja-TG3WO2KH.js +0 -1181
- package/dist/ja-TG3WO2KH.js.map +0 -1
- package/dist/ko-4HHHO7KV.js +0 -1181
- package/dist/ko-4HHHO7KV.js.map +0 -1
- package/dist/ms_MY-HPVQKVPY.js +0 -1181
- package/dist/ms_MY-HPVQKVPY.js.map +0 -1
- package/dist/pl-2W2HP34O.js +0 -1181
- package/dist/pl-2W2HP34O.js.map +0 -1
- package/dist/pt-XQUBSXO7.js +0 -1181
- package/dist/pt-XQUBSXO7.js.map +0 -1
- package/dist/ru-XKFQPFDM.js +0 -1181
- package/dist/ru-XKFQPFDM.js.map +0 -1
- package/dist/sv-ZMEGAPCR.js +0 -1181
- package/dist/sv-ZMEGAPCR.js.map +0 -1
- package/dist/th-4735BUT4.js +0 -1181
- package/dist/th-4735BUT4.js.map +0 -1
- package/dist/tr-PG3CW2L3.js +0 -1181
- package/dist/tr-PG3CW2L3.js.map +0 -1
- package/dist/vi-YPRIAJ33.js +0 -1181
- package/dist/vi-YPRIAJ33.js.map +0 -1
- package/dist/zh-RVHEWNSW.js +0 -1181
- package/dist/zh-RVHEWNSW.js.map +0 -1
- package/dist/zh_TW-ZFJMDA64.js +0 -1181
- package/dist/zh_TW-ZFJMDA64.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ChartDatafeed, F as FeedBar, S as SymbolRow, D as DatafeedSearchOptions, a as SearchPage, b as SearchClassNode } from './symbols-
|
|
2
|
-
export { B as BarMark, c as BarsEvent, d as DatafeedConfig, e as FeedUnavailableError, H as HistoryPage,
|
|
3
|
-
import { ao as en, C as ChartMessageKey, G as GlyphSourcePort, M as MagnetMode, d as CursorMode, Q as TextEditFrame, N as TextDraft, L as LineStyle, I as IDrawing, m as DrawingCounts, D as DrawingStyle, $ as VisibilityPreset, X as ToolPreset, Y as ToolTemplate, S as SerializedDrawing, o as DrawingPreferences, l as DrawingAssetPort } from './assets-
|
|
4
|
-
import { b as ResourceRef, C as ChartSaveLoadAdapter, q as ChartMeta, t as ChartBody, h as DrawingResourceContext, R as ResourceStore, u as DrawingsMeta, j as DrawingsBody, T as TemplateMeta, a as TemplateBody, v as LayoutMeta, w as LayoutBody, e as DrawingContextKind } from './resources-
|
|
5
|
-
export { c as ChartLocalDrawingContext, D as DRAWING_CONTEXT_VERSION, d as DRAWING_DOCUMENT_VERSION, f as DrawingEntry, g as DrawingGroup, i as DrawingTombstone, L as LayoutSharedDrawingContext, M as MemoryResourcesOptions, x as ResourceAbortError, S as SymbolGlobalDrawingContext, y as TemplateKind, W as WriteOutcome, k as drawingContextKey, l as emptyDrawingDocument, m as liveDrawingEntries, n as liveDrawingGroups, z as memorySaveLoadAdapter, o as mergeDrawingDocuments, p as parseDrawingDocument, r as reviseDrawingDocument, s as sameDrawingContext } from './resources-
|
|
1
|
+
import { C as ChartDatafeed, M as MarkIconId, F as FeedBar, S as SymbolRow, D as DatafeedSearchOptions, a as SearchPage, b as SearchClassNode } from './symbols-DdHLHQFC.js';
|
|
2
|
+
export { B as BarMark, c as BarsEvent, d as DatafeedConfig, e as FeedUnavailableError, H as HistoryPage, f as MarkColor, g as MarkColorPair, h as MarkColorRole, i as MarkLine, j as MarkLineStyle, k as MarkPlacement, l as MarkShape, O as OlderPageVerdict, P as PricesHandlers, m as SubscribeHandlers, n as SymbolNames, o as SymbolPrices, T as TimescaleMark, p as olderPageVerdict, s as symbolNames } from './symbols-DdHLHQFC.js';
|
|
3
|
+
import { ao as en, C as ChartMessageKey, G as GlyphSourcePort, M as MagnetMode, d as CursorMode, Q as TextEditFrame, N as TextDraft, L as LineStyle, I as IDrawing, m as DrawingCounts, D as DrawingStyle, $ as VisibilityPreset, X as ToolPreset, Y as ToolTemplate, S as SerializedDrawing, o as DrawingPreferences, l as DrawingAssetPort } from './assets-DF3nozNV.js';
|
|
4
|
+
import { b as ResourceRef, C as ChartSaveLoadAdapter, q as ChartMeta, t as ChartBody, h as DrawingResourceContext, R as ResourceStore, u as DrawingsMeta, j as DrawingsBody, T as TemplateMeta, a as TemplateBody, v as LayoutMeta, w as LayoutBody, e as DrawingContextKind } from './resources-XglhzzW0.js';
|
|
5
|
+
export { c as ChartLocalDrawingContext, D as DRAWING_CONTEXT_VERSION, d as DRAWING_DOCUMENT_VERSION, f as DrawingEntry, g as DrawingGroup, i as DrawingTombstone, L as LayoutSharedDrawingContext, M as MemoryResourcesOptions, x as ResourceAbortError, S as SymbolGlobalDrawingContext, y as TemplateKind, W as WriteOutcome, k as drawingContextKey, l as emptyDrawingDocument, m as liveDrawingEntries, n as liveDrawingGroups, z as memorySaveLoadAdapter, o as mergeDrawingDocuments, p as parseDrawingDocument, r as reviseDrawingDocument, s as sameDrawingContext } from './resources-XglhzzW0.js';
|
|
6
6
|
import { LineData, UTCTimestamp, HistogramData, WhitespaceData, IChartApi, ISeriesApi, CreatePriceLineOptions, PriceLineOptions, ISeriesPrimitive, Time, PriceScaleMode, SeriesType, SeriesAttachedParameter, TickMarkType } from 'lightweight-charts';
|
|
7
7
|
import { D as DataStatus, S as SymbolInfo, P as PriceFormat } from './symbology-D3SLclrU.js';
|
|
8
8
|
export { a as Subsession, b as SubsessionId, T as TickBand, p as parseTickBands, t as tickBandFor } from './symbology-D3SLclrU.js';
|
|
@@ -55,6 +55,11 @@ declare const THEME_ROLES: readonly [{
|
|
|
55
55
|
readonly family: "canvas";
|
|
56
56
|
readonly kind: "color";
|
|
57
57
|
readonly description: "The divider between stacked panes and around the plot area.";
|
|
58
|
+
}, {
|
|
59
|
+
readonly id: "canvas.watermark";
|
|
60
|
+
readonly family: "canvas";
|
|
61
|
+
readonly kind: "color";
|
|
62
|
+
readonly description: "The text a watermark writes large behind the bars.";
|
|
58
63
|
}, {
|
|
59
64
|
readonly id: "series.up";
|
|
60
65
|
readonly family: "series";
|
|
@@ -183,6 +188,15 @@ declare const THEME_ROLES: readonly [{
|
|
|
183
188
|
readonly over: "control.neutral";
|
|
184
189
|
readonly min: 4.5;
|
|
185
190
|
}];
|
|
191
|
+
}, {
|
|
192
|
+
readonly id: "text.caption";
|
|
193
|
+
readonly family: "text";
|
|
194
|
+
readonly kind: "color";
|
|
195
|
+
readonly description: "Ink of a dialog's section heading and of the hint line under a setting, which stand on the dialog's own surface and never under the pointer.";
|
|
196
|
+
readonly contrast: readonly [{
|
|
197
|
+
readonly over: "overlay.surface";
|
|
198
|
+
readonly min: 4.5;
|
|
199
|
+
}];
|
|
186
200
|
}, {
|
|
187
201
|
readonly id: "text.disabled";
|
|
188
202
|
readonly family: "text";
|
|
@@ -242,7 +256,7 @@ declare const THEME_ROLES: readonly [{
|
|
|
242
256
|
readonly id: "text.fontSizeAxis";
|
|
243
257
|
readonly family: "text";
|
|
244
258
|
readonly kind: "length";
|
|
245
|
-
readonly description: "Size of
|
|
259
|
+
readonly description: "Size of the legend's reading of the bar. The price and time scales take their text size from the chart settings.";
|
|
246
260
|
}, {
|
|
247
261
|
readonly id: "text.fontSizeTitle";
|
|
248
262
|
readonly family: "text";
|
|
@@ -341,6 +355,20 @@ declare const THEME_ROLES: readonly [{
|
|
|
341
355
|
readonly family: "overlay";
|
|
342
356
|
readonly kind: "color";
|
|
343
357
|
readonly description: "The backdrop that dims the chart behind a modal dialog.";
|
|
358
|
+
}, {
|
|
359
|
+
readonly id: "overlay.tooltip";
|
|
360
|
+
readonly family: "overlay";
|
|
361
|
+
readonly kind: "color";
|
|
362
|
+
readonly description: "The fill of a short tooltip line.";
|
|
363
|
+
}, {
|
|
364
|
+
readonly id: "overlay.tooltipInk";
|
|
365
|
+
readonly family: "overlay";
|
|
366
|
+
readonly kind: "color";
|
|
367
|
+
readonly description: "The ink of a tooltip line.";
|
|
368
|
+
readonly contrast: readonly [{
|
|
369
|
+
readonly over: "overlay.tooltip";
|
|
370
|
+
readonly min: 4.5;
|
|
371
|
+
}];
|
|
344
372
|
}, {
|
|
345
373
|
readonly id: "state.accent";
|
|
346
374
|
readonly family: "state";
|
|
@@ -542,6 +570,20 @@ declare const THEME_ROLES: readonly [{
|
|
|
542
570
|
readonly family: "control";
|
|
543
571
|
readonly kind: "color";
|
|
544
572
|
readonly description: "The fill of a field that is read-only or disabled.";
|
|
573
|
+
}, {
|
|
574
|
+
readonly id: "control.tipMark";
|
|
575
|
+
readonly family: "control";
|
|
576
|
+
readonly kind: "color";
|
|
577
|
+
readonly description: "The mark of a tip beside a setting's label, such as a question mark, at rest.";
|
|
578
|
+
}, {
|
|
579
|
+
readonly id: "control.tipMarkHover";
|
|
580
|
+
readonly family: "control";
|
|
581
|
+
readonly kind: "color";
|
|
582
|
+
readonly description: "The mark of a tip under the pointer.";
|
|
583
|
+
readonly contrast: readonly [{
|
|
584
|
+
readonly over: "overlay.surface";
|
|
585
|
+
readonly min: 3;
|
|
586
|
+
}];
|
|
545
587
|
}, {
|
|
546
588
|
readonly id: "status.positive";
|
|
547
589
|
readonly family: "status";
|
|
@@ -871,7 +913,7 @@ interface DictionaryLoader<Source extends Catalog, Code extends string = ChartLo
|
|
|
871
913
|
has(code: Code): boolean;
|
|
872
914
|
}
|
|
873
915
|
|
|
874
|
-
declare const KEYS_ADDED_IN_MAJOR: readonly ["
|
|
916
|
+
declare const KEYS_ADDED_IN_MAJOR: readonly ["chrome.autoScale", "chrome.autoScaleMark", "chrome.currencyAndUnit", "chrome.deletePane", "chrome.logScale", "chrome.logScaleMark", "chrome.paneButtons", "chrome.priceLevelMenu", "chrome.scaleAsk", "chrome.scaleBid", "chrome.scaleHigh", "chrome.scaleLow", "chrome.scaleModes", "command.drawingPlaceHorizontalLine", "command.marksRefresh", "history.changeMovePane", "legend.movePaneDown", "legend.movePaneUp", "menu.drawHorizontalLine"];
|
|
875
917
|
type KeyAddedInMajor = (typeof KEYS_ADDED_IN_MAJOR)[number];
|
|
876
918
|
|
|
877
919
|
type ChartTranslate = Translate<typeof en>;
|
|
@@ -925,19 +967,143 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
925
967
|
readonly other: "{count} indicators in this saved chart are not available here and were left out.";
|
|
926
968
|
};
|
|
927
969
|
readonly 'settings.menu': "Chart settings";
|
|
928
|
-
readonly 'settings.
|
|
970
|
+
readonly 'settings.pageSymbol': "Symbol";
|
|
971
|
+
readonly 'settings.pageStatusLine': "Status line";
|
|
972
|
+
readonly 'settings.pageScales': "Scales and lines";
|
|
973
|
+
readonly 'settings.pageCanvas': "Canvas";
|
|
974
|
+
readonly 'settings.pageEvents': "Events";
|
|
975
|
+
readonly 'settings.headingCandles': "Candles";
|
|
976
|
+
readonly 'settings.headingHollowCandles': "Hollow candles";
|
|
977
|
+
readonly 'settings.headingBars': "Bars";
|
|
978
|
+
readonly 'settings.headingLine': "Line";
|
|
979
|
+
readonly 'settings.headingStepLine': "Step line";
|
|
980
|
+
readonly 'settings.headingArea': "Area";
|
|
981
|
+
readonly 'settings.headingBaseline': "Baseline";
|
|
982
|
+
readonly 'settings.colorOnPreviousClose': "Color bars based on previous close";
|
|
983
|
+
readonly 'settings.body': "Body";
|
|
984
|
+
readonly 'settings.borders': "Borders";
|
|
985
|
+
readonly 'settings.wick': "Wick";
|
|
986
|
+
readonly 'settings.hlcBars': "HLC bars";
|
|
987
|
+
readonly 'settings.upColor': "Up color";
|
|
988
|
+
readonly 'settings.downColor': "Down color";
|
|
989
|
+
readonly 'settings.thinBars': "Thin bars";
|
|
990
|
+
readonly 'settings.priceSource': "Price source";
|
|
991
|
+
readonly 'settings.sourceOpen': "Open";
|
|
992
|
+
readonly 'settings.sourceHigh': "High";
|
|
993
|
+
readonly 'settings.sourceLow': "Low";
|
|
994
|
+
readonly 'settings.sourceClose': "Close";
|
|
995
|
+
readonly 'settings.sourceHl2': "(H + L)/2";
|
|
996
|
+
readonly 'settings.sourceHlc3': "(H + L + C)/3";
|
|
997
|
+
readonly 'settings.sourceOhlc4': "(O + H + L + C)/4";
|
|
998
|
+
readonly 'settings.sourceHlcc4': "(H + L + C + C)/4";
|
|
999
|
+
readonly 'settings.lineRow': "Line";
|
|
1000
|
+
readonly 'settings.colorSolid': "Solid";
|
|
1001
|
+
readonly 'settings.colorGradient': "Gradient";
|
|
1002
|
+
readonly 'settings.fill': "Fill";
|
|
1003
|
+
readonly 'settings.topLine': "Top line";
|
|
1004
|
+
readonly 'settings.bottomLine': "Bottom line";
|
|
1005
|
+
readonly 'settings.fillTopArea': "Fill top area";
|
|
1006
|
+
readonly 'settings.fillBottomArea': "Fill bottom area";
|
|
1007
|
+
readonly 'settings.baseLevel': "Base level";
|
|
1008
|
+
readonly 'settings.headingDataModification': "Data modification";
|
|
1009
|
+
readonly 'settings.session': "Session";
|
|
1010
|
+
readonly 'settings.sessionRegular': "Regular";
|
|
1011
|
+
readonly 'settings.sessionExtended': "Extended";
|
|
1012
|
+
readonly 'settings.sessionAllHours': "24 hours";
|
|
1013
|
+
readonly 'settings.extendedHoursBackground': "Pre/post market hours background";
|
|
1014
|
+
readonly 'settings.allHoursBackground': "Pre/post/night market hours background";
|
|
1015
|
+
readonly 'settings.preMarket': "Pre-market";
|
|
1016
|
+
readonly 'settings.postMarket': "Post-market";
|
|
1017
|
+
readonly 'settings.night': "Night";
|
|
1018
|
+
readonly 'settings.precision': "Precision";
|
|
1019
|
+
readonly 'settings.precisionDefault': "Default";
|
|
1020
|
+
readonly 'settings.precisionInteger': "Integer";
|
|
1021
|
+
readonly 'settings.precisionDecimals': {
|
|
1022
|
+
readonly one: "{count} decimal";
|
|
1023
|
+
readonly other: "{count} decimals";
|
|
1024
|
+
};
|
|
1025
|
+
readonly 'settings.headingInstrument': "Instrument";
|
|
1026
|
+
readonly 'settings.logo': "Logo";
|
|
1027
|
+
readonly 'settings.title': "Title";
|
|
1028
|
+
readonly 'settings.titleName': "Name";
|
|
1029
|
+
readonly 'settings.titleSymbol': "Symbol";
|
|
1030
|
+
readonly 'settings.titleSymbolAndName': "Symbol and name";
|
|
1031
|
+
readonly 'settings.chartValues': "Chart values";
|
|
1032
|
+
readonly 'settings.barChangeValues': "Bar change values";
|
|
1033
|
+
readonly 'settings.volume': "Volume";
|
|
1034
|
+
readonly 'settings.lastDayChangeValues': "Last day change values";
|
|
1035
|
+
readonly 'settings.headingIndicators': "Indicators";
|
|
1036
|
+
readonly 'settings.indicatorTitles': "Titles";
|
|
1037
|
+
readonly 'settings.indicatorInputs': "Inputs";
|
|
1038
|
+
readonly 'settings.indicatorValues': "Values";
|
|
929
1039
|
readonly 'settings.background': "Background";
|
|
930
|
-
readonly 'settings.upCandles': "Up candles";
|
|
931
|
-
readonly 'settings.downCandles': "Down candles";
|
|
932
|
-
readonly 'settings.upBorders': "Up borders";
|
|
933
|
-
readonly 'settings.downBorders': "Down borders";
|
|
934
|
-
readonly 'settings.upWicks': "Up wicks";
|
|
935
|
-
readonly 'settings.downWicks': "Down wicks";
|
|
936
|
-
readonly 'settings.sectionDisplay': "Display";
|
|
937
|
-
readonly 'settings.gridLines': "Grid lines";
|
|
938
|
-
readonly 'settings.sessionShading': "Session shading";
|
|
939
1040
|
readonly 'settings.sectionScale': "Price scale";
|
|
940
|
-
readonly 'settings.
|
|
1041
|
+
readonly 'settings.currencyAndUnit': "Currency and Unit";
|
|
1042
|
+
readonly 'settings.scaleModes': "Scale modes (A and L)";
|
|
1043
|
+
readonly 'settings.visibleOnMouseOver': "Visible on mouse over";
|
|
1044
|
+
readonly 'settings.alwaysVisible': "Always visible";
|
|
1045
|
+
readonly 'settings.alwaysInvisible': "Always invisible";
|
|
1046
|
+
readonly 'settings.lockPriceToBarRatio': "Lock price to bar ratio";
|
|
1047
|
+
readonly 'settings.scalesPlacement': "Scales placement";
|
|
1048
|
+
readonly 'settings.placementLeft': "Stack on the left";
|
|
1049
|
+
readonly 'settings.placementRight': "Stack on the right";
|
|
1050
|
+
readonly 'settings.placementAuto': "Auto";
|
|
1051
|
+
readonly 'settings.headingPriceLabels': "Price labels & lines";
|
|
1052
|
+
readonly 'settings.noOverlappingLabels': "No overlapping labels";
|
|
1053
|
+
readonly 'settings.plusButton': "Plus button";
|
|
1054
|
+
readonly 'settings.plusButtonTip': "Shows a plus beside the price under the crosshair, which opens the menu for that price";
|
|
1055
|
+
readonly 'settings.countdown': "Countdown to bar close";
|
|
1056
|
+
readonly 'settings.symbolLabel': "Symbol";
|
|
1057
|
+
readonly 'settings.labelName': "Name";
|
|
1058
|
+
readonly 'settings.labelValue': "Value";
|
|
1059
|
+
readonly 'settings.labelLine': "Line";
|
|
1060
|
+
readonly 'settings.hidden': "Hidden";
|
|
1061
|
+
readonly 'settings.lastValueMode': "Last value label";
|
|
1062
|
+
readonly 'settings.valueByScale': "Value according to scale";
|
|
1063
|
+
readonly 'settings.priceAndPercent': "Price and percentage value";
|
|
1064
|
+
readonly 'settings.indicatorsAndFinancials': "Indicators and financials";
|
|
1065
|
+
readonly 'settings.extendedHoursLabels': "Pre/post/night market";
|
|
1066
|
+
readonly 'settings.previousDayClose': "Previous day close";
|
|
1067
|
+
readonly 'settings.highAndLow': "High and low";
|
|
1068
|
+
readonly 'settings.bidAndAsk': "Bid and ask";
|
|
1069
|
+
readonly 'settings.bid': "Bid";
|
|
1070
|
+
readonly 'settings.ask': "Ask";
|
|
1071
|
+
readonly 'settings.headingTimeScale': "Time scale";
|
|
1072
|
+
readonly 'settings.dayOfWeek': "Day of week on labels";
|
|
1073
|
+
readonly 'settings.dateFormat': "Date format";
|
|
1074
|
+
readonly 'settings.timeHoursFormat': "Time hours format";
|
|
1075
|
+
readonly 'settings.hours24': "24-hours";
|
|
1076
|
+
readonly 'settings.hours12': "12-hours";
|
|
1077
|
+
readonly 'settings.keepLeftEdge': "Save chart left edge position when changing interval";
|
|
1078
|
+
readonly 'settings.headingChartStyles': "Chart basic styles";
|
|
1079
|
+
readonly 'settings.verticalGrid': "Vertical grid lines";
|
|
1080
|
+
readonly 'settings.horizontalGrid': "Horizontal grid lines";
|
|
1081
|
+
readonly 'settings.crosshair': "Crosshair";
|
|
1082
|
+
readonly 'settings.watermark': "Watermark";
|
|
1083
|
+
readonly 'settings.watermarkTicker': "Ticker";
|
|
1084
|
+
readonly 'settings.watermarkInterval': "Interval";
|
|
1085
|
+
readonly 'settings.watermarkDescription': "Description";
|
|
1086
|
+
readonly 'settings.watermarkReplay': "Replay mode";
|
|
1087
|
+
readonly 'settings.headingScales': "Scales";
|
|
1088
|
+
readonly 'settings.scaleText': "Text";
|
|
1089
|
+
readonly 'settings.scaleLines': "Lines";
|
|
1090
|
+
readonly 'settings.headingButtons': "Buttons";
|
|
1091
|
+
readonly 'settings.navigationButtons': "Navigation";
|
|
1092
|
+
readonly 'settings.paneButtons': "Pane";
|
|
1093
|
+
readonly 'settings.headingMargins': "Margins";
|
|
1094
|
+
readonly 'settings.marginTop': "Top";
|
|
1095
|
+
readonly 'settings.marginBottom': "Bottom";
|
|
1096
|
+
readonly 'settings.marginRight': "Right";
|
|
1097
|
+
readonly 'settings.unitPercent': "%";
|
|
1098
|
+
readonly 'settings.unitBars': "bars";
|
|
1099
|
+
readonly 'settings.sessionBreaks': "Session breaks";
|
|
1100
|
+
readonly 'settings.upColorOf': "{name} up color";
|
|
1101
|
+
readonly 'settings.downColorOf': "{name} down color";
|
|
1102
|
+
readonly 'settings.topColorOf': "{name} top color";
|
|
1103
|
+
readonly 'settings.bottomColorOf': "{name} bottom color";
|
|
1104
|
+
readonly 'settings.learnMore': "Learn more";
|
|
1105
|
+
readonly 'settings.saveTemplate': "Save chart template";
|
|
1106
|
+
readonly 'settings.deleteTemplateBody': "Doing this will permanently delete your \"{name}\" chart template.";
|
|
941
1107
|
readonly 'settings.indicatorTitle': "{name} settings";
|
|
942
1108
|
readonly 'settings.tabInputs': "Inputs";
|
|
943
1109
|
readonly 'settings.tabStyle': "Style";
|
|
@@ -952,8 +1118,6 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
952
1118
|
readonly 'settings.lineStyleSolid': "Solid";
|
|
953
1119
|
readonly 'settings.lineStyleDashed': "Dashed";
|
|
954
1120
|
readonly 'settings.lineStyleDotted': "Dotted";
|
|
955
|
-
readonly 'settings.precision': "Precision";
|
|
956
|
-
readonly 'settings.precisionDefault': "Default";
|
|
957
1121
|
readonly 'settings.labelsOnPriceScale': "Labels on price scale";
|
|
958
1122
|
readonly 'settings.showIndicator': "Show this indicator";
|
|
959
1123
|
readonly 'picker.title': "Indicators";
|
|
@@ -979,13 +1143,14 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
979
1143
|
readonly 'history.changeTimeframe': "timeframe change";
|
|
980
1144
|
readonly 'history.changeChartStyle': "chart style change";
|
|
981
1145
|
readonly 'history.changePriceScale': "price scale change";
|
|
982
|
-
readonly 'history.
|
|
1146
|
+
readonly 'history.changeSettings': "settings change";
|
|
983
1147
|
readonly 'history.changeAddCompare': "add comparison";
|
|
984
1148
|
readonly 'history.changeRemoveCompare': "remove comparison";
|
|
985
1149
|
readonly 'history.changeCompare': "comparison change";
|
|
986
1150
|
readonly 'history.changeAddIndicator': "add indicator";
|
|
987
1151
|
readonly 'history.changeRemoveIndicator': "remove indicator";
|
|
988
1152
|
readonly 'history.changeIndicator': "indicator change";
|
|
1153
|
+
readonly 'history.changeMovePane': "move pane";
|
|
989
1154
|
readonly 'history.changeAddDrawing': "add drawing";
|
|
990
1155
|
readonly 'history.changeRemoveDrawing': "remove drawing";
|
|
991
1156
|
readonly 'history.changeDrawing': "drawing change";
|
|
@@ -1002,6 +1167,19 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
1002
1167
|
readonly 'chrome.sessionsHeading': "Sessions";
|
|
1003
1168
|
readonly 'chrome.navigation': "Chart navigation";
|
|
1004
1169
|
readonly 'chrome.activeChart': "{symbol}, {timeframe}";
|
|
1170
|
+
readonly 'chrome.scaleHigh': "High";
|
|
1171
|
+
readonly 'chrome.scaleLow': "Low";
|
|
1172
|
+
readonly 'chrome.scaleBid': "Bid";
|
|
1173
|
+
readonly 'chrome.scaleAsk': "Ask";
|
|
1174
|
+
readonly 'chrome.scaleModes': "Scale modes";
|
|
1175
|
+
readonly 'chrome.autoScale': "Auto scale";
|
|
1176
|
+
readonly 'chrome.autoScaleMark': "A";
|
|
1177
|
+
readonly 'chrome.logScale': "Logarithmic scale";
|
|
1178
|
+
readonly 'chrome.logScaleMark': "L";
|
|
1179
|
+
readonly 'chrome.currencyAndUnit': "{currency} · {unit}";
|
|
1180
|
+
readonly 'chrome.priceLevelMenu': "Price actions";
|
|
1181
|
+
readonly 'chrome.paneButtons': "Pane";
|
|
1182
|
+
readonly 'chrome.deletePane': "Delete pane";
|
|
1005
1183
|
readonly 'command.extension': "Host command";
|
|
1006
1184
|
readonly 'command.viewReset': "Reset view";
|
|
1007
1185
|
readonly 'command.viewGoLive': "Go to the live edge";
|
|
@@ -1010,6 +1188,7 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
1010
1188
|
readonly 'command.viewScrollLeft': "Scroll back";
|
|
1011
1189
|
readonly 'command.viewScrollRight': "Scroll forward";
|
|
1012
1190
|
readonly 'command.priceCopy': "Copy price";
|
|
1191
|
+
readonly 'command.marksRefresh': "Refresh marks";
|
|
1013
1192
|
readonly 'command.symbolSet': "Change symbol";
|
|
1014
1193
|
readonly 'command.styleCandles': "Candles";
|
|
1015
1194
|
readonly 'command.styleHollow': "Hollow candles";
|
|
@@ -1018,8 +1197,8 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
1018
1197
|
readonly 'command.styleArea': "Area";
|
|
1019
1198
|
readonly 'command.styleBaseline': "Baseline";
|
|
1020
1199
|
readonly 'command.styleStepline': "Step line";
|
|
1021
|
-
readonly 'command.
|
|
1022
|
-
readonly 'command.
|
|
1200
|
+
readonly 'command.settingsApply': "Apply chart settings";
|
|
1201
|
+
readonly 'command.settingsReset': "Apply defaults";
|
|
1023
1202
|
readonly 'command.scaleNormal': "Regular price scale";
|
|
1024
1203
|
readonly 'command.scaleLog': "Logarithmic price scale";
|
|
1025
1204
|
readonly 'command.scalePercent': "Percentage price scale";
|
|
@@ -1059,6 +1238,7 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
1059
1238
|
readonly 'command.drawingSettings': "Drawing settings";
|
|
1060
1239
|
readonly 'command.drawingCommitEdit': "Apply drawing settings";
|
|
1061
1240
|
readonly 'command.drawingPlaceImage': "Place image";
|
|
1241
|
+
readonly 'command.drawingPlaceHorizontalLine': "Place horizontal line";
|
|
1062
1242
|
readonly 'command.drawingTemplateApply': "Apply drawing template";
|
|
1063
1243
|
readonly 'command.drawingTemplateSave': "Save drawing template";
|
|
1064
1244
|
readonly 'command.drawingTemplateRemove': "Remove drawing template";
|
|
@@ -1091,6 +1271,7 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
1091
1271
|
readonly 'command.themeDark': "Dark theme";
|
|
1092
1272
|
readonly 'command.themeToggle': "Switch theme";
|
|
1093
1273
|
readonly 'command.themeSet': "Set theme";
|
|
1274
|
+
readonly 'command.settingsOpen': "Chart settings";
|
|
1094
1275
|
readonly 'command.localeSet': "Language";
|
|
1095
1276
|
readonly 'command.fullscreenEnter': "Fullscreen";
|
|
1096
1277
|
readonly 'command.fullscreenExit': "Exit fullscreen";
|
|
@@ -1652,6 +1833,7 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
1652
1833
|
readonly 'range.restoreChart': "Restore chart";
|
|
1653
1834
|
readonly 'timezone.title': "Chart timezone";
|
|
1654
1835
|
readonly 'timezone.exchange': "Exchange";
|
|
1836
|
+
readonly 'timezone.quarter': "Q{quarter}";
|
|
1655
1837
|
readonly 'timeframe.title': "Timeframe";
|
|
1656
1838
|
readonly 'timeframe.all': "All timeframes";
|
|
1657
1839
|
readonly 'timeframe.unitTicks': "Ticks";
|
|
@@ -1947,6 +2129,7 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
1947
2129
|
readonly other: "Remove {count} drawings";
|
|
1948
2130
|
};
|
|
1949
2131
|
readonly 'menu.settings': "Settings…";
|
|
2132
|
+
readonly 'menu.drawHorizontalLine': "Draw horizontal line at {price}";
|
|
1950
2133
|
readonly 'tool.trend_line': "Trend line";
|
|
1951
2134
|
readonly 'tool.ray': "Ray";
|
|
1952
2135
|
readonly 'tool.info_line': "Info line";
|
|
@@ -2041,12 +2224,15 @@ declare const chartDictionaries: DictionaryLoader<{
|
|
|
2041
2224
|
readonly 'legend.low': "L";
|
|
2042
2225
|
readonly 'legend.close': "C";
|
|
2043
2226
|
readonly 'legend.change': "{change} ({percent}%)";
|
|
2227
|
+
readonly 'legend.volume': "Vol";
|
|
2044
2228
|
readonly 'legend.indicatorSettings': "Indicator settings";
|
|
2045
2229
|
readonly 'legend.showRows': "Show indicator rows";
|
|
2046
2230
|
readonly 'legend.hideRows': "Hide indicator rows";
|
|
2047
2231
|
readonly 'legend.restorePane': "Restore pane";
|
|
2048
2232
|
readonly 'legend.collapsePane': "Collapse pane";
|
|
2049
2233
|
readonly 'legend.maximizePane': "Maximize pane";
|
|
2234
|
+
readonly 'legend.movePaneUp': "Move pane up";
|
|
2235
|
+
readonly 'legend.movePaneDown': "Move pane down";
|
|
2050
2236
|
readonly 'legend.showIndicator': "Show indicator";
|
|
2051
2237
|
readonly 'legend.hideIndicator': "Hide indicator";
|
|
2052
2238
|
readonly 'legend.scaleNormal': "Reg";
|
|
@@ -2255,42 +2441,246 @@ interface Glyph {
|
|
|
2255
2441
|
size?: number;
|
|
2256
2442
|
}
|
|
2257
2443
|
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2444
|
+
/** When an on-chart control shows: while the pointer is over its area, always, or never. */
|
|
2445
|
+
type ChartControlVisibility = 'hover' | 'always' | 'never';
|
|
2446
|
+
/** How a line is stroked. */
|
|
2447
|
+
type ChartStrokeStyle = 'solid' | 'dashed' | 'dotted';
|
|
2448
|
+
/** Which bar value a single-value style draws. */
|
|
2449
|
+
type ChartPriceSource = 'open' | 'high' | 'low' | 'close' | 'hl2' | 'hlc3' | 'ohlc4' | 'hlcc4';
|
|
2450
|
+
/** How prices are written: the symbol's own precision, a fixed count of decimals (0 to 15), or a
|
|
2451
|
+
* fraction of a whole (halves through 320ths). */
|
|
2452
|
+
type ChartPricePrecision = 'default' | `${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15}` | `1/${2 | 4 | 8 | 16 | 32 | 64 | 128 | 320}`;
|
|
2453
|
+
/** The text a legend titles the symbol with. */
|
|
2454
|
+
type ChartTitleSource = 'name' | 'symbol' | 'symbolAndName';
|
|
2455
|
+
/** What the symbol's last-value label on the price scale holds: the value as the scale states it,
|
|
2456
|
+
* or the price with its percentage change beneath it. */
|
|
2457
|
+
type ChartLastValueMode = 'scale' | 'priceAndPercent';
|
|
2458
|
+
/** Where the price scales stand: stacked on the left, stacked on the right, or wherever each
|
|
2459
|
+
* series' scale belongs. */
|
|
2460
|
+
type ChartScalePlacement = 'left' | 'right' | 'auto';
|
|
2461
|
+
/** How the crosshair's time label writes a date, in the date's own order and separators. `qq` is the
|
|
2462
|
+
* quarter (Q3), `MMM` the month's short name, `MM` and `dd` two-digit numbers, `d` the day without a
|
|
2463
|
+
* leading zero, `yyyy` the whole year and `'yy` an apostrophe before its last two digits. The
|
|
2464
|
+
* weekday is not a part of any pattern: `timeScale.dayOfWeek` writes it before the date. */
|
|
2465
|
+
type ChartDateFormat = "qq 'yy" | 'qq yyyy' | "dd MMM 'yy" | "MMM 'yy" | 'MMM dd, yyyy' | 'MMM d, yyyy' | 'MMM yyyy' | 'MMM dd' | 'dd MMM' | 'yyyy-MM-dd' | 'yy-MM-dd' | 'yy/MM/dd' | 'yyyy/MM/dd' | 'dd-MM-yyyy' | 'dd-MM-yy' | 'dd/MM/yy' | 'dd/MM/yyyy' | 'MM/dd/yy' | 'MM/dd/yyyy';
|
|
2466
|
+
/** The date formats the time label writes, in the order a picker offers them. */
|
|
2467
|
+
declare const CHART_DATE_FORMATS: readonly ChartDateFormat[];
|
|
2468
|
+
/** A clock of 24 hours or of 12 with a day half. */
|
|
2469
|
+
type ChartHoursFormat = '24' | '12';
|
|
2470
|
+
/** The chart's background: one color, or a vertical gradient from the top color to the bottom. */
|
|
2471
|
+
type ChartBackgroundType = 'solid' | 'gradient';
|
|
2472
|
+
/** How a single-value line is colored: one color, or a vertical gradient from the top color at the
|
|
2473
|
+
* highest price on screen to the bottom color at the lowest. */
|
|
2474
|
+
type ChartLineColorType = 'solid' | 'gradient';
|
|
2475
|
+
/** Which trading hours an intraday chart shows: regular hours alone, regular hours with the pre-
|
|
2476
|
+
* and post-market stretches, or every stretch the symbol trades including the overnight one. */
|
|
2477
|
+
type ChartSessionHours = 'regular' | 'extended' | 'allHours';
|
|
2478
|
+
/** A single-value line style: the line and the step line share it. */
|
|
2479
|
+
interface LineStyleSettings {
|
|
2480
|
+
priceSource: ChartPriceSource;
|
|
2481
|
+
colorType: ChartLineColorType;
|
|
2482
|
+
/** The solid color. */
|
|
2483
|
+
color: string;
|
|
2484
|
+
/** The gradient's color at the highest price on screen. */
|
|
2485
|
+
gradientTopColor: string;
|
|
2486
|
+
/** The gradient's color at the lowest price on screen. */
|
|
2487
|
+
gradientBottomColor: string;
|
|
2488
|
+
lineStyle: ChartStrokeStyle;
|
|
2489
|
+
lineWidth: number;
|
|
2490
|
+
}
|
|
2491
|
+
/** The candle family: candles and hollow candles share it. */
|
|
2492
|
+
interface CandleStyleSettings {
|
|
2493
|
+
/** Color each bar by its close against the previous bar's close, rather than against its own open. */
|
|
2494
|
+
colorOnPreviousClose: boolean;
|
|
2495
|
+
/** Fill the body. Off leaves the body hollow, so only its border and wick stand. */
|
|
2496
|
+
body: boolean;
|
|
2497
|
+
upColor: string;
|
|
2498
|
+
downColor: string;
|
|
2499
|
+
borders: boolean;
|
|
2500
|
+
borderUpColor: string;
|
|
2501
|
+
borderDownColor: string;
|
|
2502
|
+
wick: boolean;
|
|
2503
|
+
wickUpColor: string;
|
|
2504
|
+
wickDownColor: string;
|
|
2505
|
+
}
|
|
2506
|
+
/** Every setting of a chart. */
|
|
2507
|
+
interface ChartSettings {
|
|
2508
|
+
candles: CandleStyleSettings;
|
|
2509
|
+
hollowCandles: Omit<CandleStyleSettings, 'colorOnPreviousClose'>;
|
|
2510
|
+
bars: {
|
|
2511
|
+
colorOnPreviousClose: boolean;
|
|
2512
|
+
/** Draw high, low and close only: the open tick is left off. */
|
|
2513
|
+
hlcBars: boolean;
|
|
2261
2514
|
upColor: string;
|
|
2262
2515
|
downColor: string;
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
/**
|
|
2516
|
+
thinBars: boolean;
|
|
2517
|
+
};
|
|
2518
|
+
line: LineStyleSettings;
|
|
2519
|
+
stepLine: LineStyleSettings;
|
|
2520
|
+
area: {
|
|
2521
|
+
priceSource: ChartPriceSource;
|
|
2522
|
+
lineColor: string;
|
|
2523
|
+
lineStyle: ChartStrokeStyle;
|
|
2524
|
+
lineWidth: number;
|
|
2525
|
+
/** The fill's color at the line, fading to `bottomColor` at the pane's foot. */
|
|
2526
|
+
topColor: string;
|
|
2527
|
+
bottomColor: string;
|
|
2528
|
+
};
|
|
2529
|
+
baseline: {
|
|
2530
|
+
priceSource: ChartPriceSource;
|
|
2531
|
+
topLineColor: string;
|
|
2532
|
+
topLineWidth: number;
|
|
2533
|
+
/** The fill above the base level: its color at the line, fading to the second at the base. */
|
|
2534
|
+
topFillColor1: string;
|
|
2535
|
+
topFillColor2: string;
|
|
2536
|
+
bottomLineColor: string;
|
|
2537
|
+
bottomLineWidth: number;
|
|
2538
|
+
/** The fill below the base level: its color at the base, deepening to the second at the line. */
|
|
2539
|
+
bottomFillColor1: string;
|
|
2540
|
+
bottomFillColor2: string;
|
|
2541
|
+
/** Where the base level stands, as a percentage of the pane's height from its foot. */
|
|
2542
|
+
baseLevelPercentage: number;
|
|
2543
|
+
};
|
|
2544
|
+
/** Settings of the charted symbol that hold whatever its style. */
|
|
2545
|
+
symbol: {
|
|
2546
|
+
/** Which trading hours an intraday chart shows. A stretch outside regular hours is shaded in its
|
|
2547
|
+
* own color below. */
|
|
2548
|
+
session: ChartSessionHours;
|
|
2549
|
+
/** The shading over the pre-market stretch. */
|
|
2550
|
+
preMarketColor: string;
|
|
2551
|
+
/** The shading over the post-market stretch. */
|
|
2552
|
+
postMarketColor: string;
|
|
2553
|
+
/** The shading over the overnight stretch, under `allHours`. */
|
|
2554
|
+
nightColor: string;
|
|
2555
|
+
precision: ChartPricePrecision;
|
|
2556
|
+
};
|
|
2557
|
+
/** The legend over the pane that names the symbol and states its values. */
|
|
2558
|
+
statusLine: {
|
|
2559
|
+
logo: boolean;
|
|
2560
|
+
title: boolean;
|
|
2561
|
+
titleSource: ChartTitleSource;
|
|
2562
|
+
/** The bar's open, high, low and close. */
|
|
2563
|
+
chartValues: boolean;
|
|
2564
|
+
/** The bar's change and percentage change. */
|
|
2565
|
+
barChange: boolean;
|
|
2566
|
+
volume: boolean;
|
|
2567
|
+
/** The change since the previous session's close, from the datafeed's quotes. */
|
|
2568
|
+
lastDayChange: boolean;
|
|
2569
|
+
/** An indicator row's title. */
|
|
2570
|
+
indicatorTitles: boolean;
|
|
2571
|
+
/** An indicator row's inputs, after its title. */
|
|
2572
|
+
indicatorInputs: boolean;
|
|
2573
|
+
/** An indicator row's values. */
|
|
2574
|
+
indicatorValues: boolean;
|
|
2575
|
+
background: boolean;
|
|
2576
|
+
/** The background's opacity, 0 to 100. */
|
|
2577
|
+
backgroundOpacity: number;
|
|
2578
|
+
};
|
|
2579
|
+
priceScale: {
|
|
2580
|
+
/** The currency and unit box at the top of the price scale. */
|
|
2581
|
+
currencyAndUnit: ChartControlVisibility;
|
|
2582
|
+
/** The auto-scale and logarithmic buttons at the foot of the price scale. */
|
|
2583
|
+
scaleModeButtons: ChartControlVisibility;
|
|
2584
|
+
/** Hold the price-to-bar ratio while the time scale zooms. */
|
|
2585
|
+
lockPriceToBarRatio: boolean;
|
|
2586
|
+
/** The held ratio, or null to take the ratio the chart shows when the lock engages. */
|
|
2587
|
+
priceToBarRatio: number | null;
|
|
2588
|
+
placement: ChartScalePlacement;
|
|
2589
|
+
};
|
|
2590
|
+
priceLabels: {
|
|
2591
|
+
/** Move price-scale labels apart so none overlaps another. */
|
|
2592
|
+
noOverlappingLabels: boolean;
|
|
2593
|
+
/** The add button beside the crosshair's price label, opening the price-level menu. */
|
|
2594
|
+
plusButton: boolean;
|
|
2595
|
+
/** The time left until the bar closes, under the last-value label. */
|
|
2273
2596
|
countdown: boolean;
|
|
2597
|
+
symbolName: boolean;
|
|
2598
|
+
symbolValue: boolean;
|
|
2599
|
+
symbolLine: boolean;
|
|
2600
|
+
/** Null follows the last bar's color. */
|
|
2601
|
+
symbolLineColor: string | null;
|
|
2602
|
+
symbolLineWidth: number;
|
|
2603
|
+
symbolValueMode: ChartLastValueMode;
|
|
2604
|
+
/** An indicator's name label on the price scale. */
|
|
2605
|
+
indicatorLabelName: boolean;
|
|
2606
|
+
/** An indicator's value label on the price scale. */
|
|
2607
|
+
indicatorLabelValue: boolean;
|
|
2608
|
+
/** The last value of the pre-market, post-market or overnight stretch on the price scale. */
|
|
2609
|
+
extendedHoursValue: boolean;
|
|
2610
|
+
extendedHoursLine: boolean;
|
|
2611
|
+
preMarketLabelColor: string;
|
|
2612
|
+
postMarketLabelColor: string;
|
|
2613
|
+
nightLabelColor: string;
|
|
2614
|
+
previousCloseValue: boolean;
|
|
2615
|
+
previousCloseLine: boolean;
|
|
2616
|
+
previousCloseColor: string;
|
|
2617
|
+
previousCloseLineWidth: number;
|
|
2618
|
+
highLowValue: boolean;
|
|
2619
|
+
highLowLine: boolean;
|
|
2620
|
+
/** One color for the high and low lines and labels, or null for the factory pair: grey lines
|
|
2621
|
+
* and navy labels. */
|
|
2622
|
+
highLowColor: string | null;
|
|
2623
|
+
highLowLineWidth: number;
|
|
2624
|
+
/** Bid and ask come from the datafeed's quotes. */
|
|
2625
|
+
bidAskValue: boolean;
|
|
2626
|
+
bidAskLine: boolean;
|
|
2627
|
+
bidColor: string;
|
|
2628
|
+
askColor: string;
|
|
2629
|
+
};
|
|
2630
|
+
timeScale: {
|
|
2631
|
+
dayOfWeek: boolean;
|
|
2632
|
+
dateFormat: ChartDateFormat;
|
|
2633
|
+
hoursFormat: ChartHoursFormat;
|
|
2634
|
+
/** Keep the chart's left edge at the same time when the timeframe changes. */
|
|
2635
|
+
keepLeftEdge: boolean;
|
|
2636
|
+
};
|
|
2637
|
+
canvas: {
|
|
2638
|
+
backgroundType: ChartBackgroundType;
|
|
2639
|
+
/** The solid color, or the gradient's top. */
|
|
2640
|
+
background: string;
|
|
2641
|
+
/** The gradient's bottom. */
|
|
2642
|
+
backgroundBottom: string;
|
|
2643
|
+
verticalGrid: boolean;
|
|
2644
|
+
verticalGridColor: string;
|
|
2645
|
+
verticalGridStyle: ChartStrokeStyle;
|
|
2646
|
+
horizontalGrid: boolean;
|
|
2647
|
+
horizontalGridColor: string;
|
|
2648
|
+
horizontalGridStyle: ChartStrokeStyle;
|
|
2649
|
+
crosshairColor: string;
|
|
2650
|
+
crosshairStyle: ChartStrokeStyle;
|
|
2651
|
+
crosshairWidth: number;
|
|
2652
|
+
/** The watermark's parts, written large behind the bars. */
|
|
2653
|
+
watermarkTicker: boolean;
|
|
2654
|
+
watermarkInterval: boolean;
|
|
2655
|
+
watermarkDescription: boolean;
|
|
2656
|
+
/** Name bar replay in the watermark while it runs. */
|
|
2657
|
+
watermarkReplay: boolean;
|
|
2658
|
+
watermarkColor: string;
|
|
2659
|
+
scaleTextColor: string;
|
|
2660
|
+
scaleTextSize: number;
|
|
2661
|
+
scaleLineColor: string;
|
|
2662
|
+
navigationButtons: ChartControlVisibility;
|
|
2663
|
+
paneButtons: ChartControlVisibility;
|
|
2664
|
+
/** Space above the highest bar, as a percentage of the pane's height. */
|
|
2665
|
+
marginTop: number;
|
|
2666
|
+
/** Space below the lowest bar, as a percentage of the pane's height. */
|
|
2667
|
+
marginBottom: number;
|
|
2668
|
+
/** Empty bar slots after the last bar. */
|
|
2669
|
+
marginRight: number;
|
|
2670
|
+
};
|
|
2671
|
+
events: {
|
|
2672
|
+
sessionBreaks: boolean;
|
|
2673
|
+
sessionBreaksColor: string;
|
|
2674
|
+
sessionBreaksStyle: ChartStrokeStyle;
|
|
2675
|
+
sessionBreaksWidth: number;
|
|
2274
2676
|
};
|
|
2275
2677
|
}
|
|
2276
|
-
/**
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
declare const DEFAULT_OVERRIDES: ChartOverrides;
|
|
2282
|
-
/** A recursive partial of the tree — what a host supplies. */
|
|
2283
|
-
type PartialOverrides = {
|
|
2284
|
-
[S in keyof ChartOverrides]?: Partial<ChartOverrides[S]>;
|
|
2678
|
+
/** A section's name. */
|
|
2679
|
+
type ChartSettingsSection = keyof ChartSettings;
|
|
2680
|
+
/** What a host or a viewer supplies: any leaves of any sections. */
|
|
2681
|
+
type PartialChartSettings = {
|
|
2682
|
+
[S in ChartSettingsSection]?: Partial<ChartSettings[S]>;
|
|
2285
2683
|
};
|
|
2286
|
-
/** Deep-fill a partial over the defaults. One level of nesting by design — the tree is two levels
|
|
2287
|
-
* (section → leaf) and stays that way; new leaves are additive. */
|
|
2288
|
-
declare function mergeOverrides(partial?: PartialOverrides | null): ChartOverrides;
|
|
2289
|
-
/** The precedence composer: deep-fill any number of partials over an explicit BASE, later layers
|
|
2290
|
-
* winning leaf by leaf. The widget's look resolves through this — its theme-derived floor, then
|
|
2291
|
-
* the host's constructor partial, then runtime applyAppearance calls: one ladder where runtime
|
|
2292
|
-
* beats constructor beats theme, expressed as one pure function. */
|
|
2293
|
-
declare function layerOverrides(base: ChartOverrides, ...partials: (PartialOverrides | null | undefined)[]): ChartOverrides;
|
|
2294
2684
|
|
|
2295
2685
|
/** One resolved role as it is written to the DOM. */
|
|
2296
2686
|
interface ThemeDeclaration {
|
|
@@ -2310,12 +2700,14 @@ interface ThemeRootStyle {
|
|
|
2310
2700
|
/** One entry per role, ordered by role id. */
|
|
2311
2701
|
declarations: readonly ThemeDeclaration[];
|
|
2312
2702
|
}
|
|
2313
|
-
/** The theme values the canvas renderer draws with. The chart
|
|
2314
|
-
*
|
|
2315
|
-
* for anything the
|
|
2703
|
+
/** The theme values the canvas renderer draws with. The chart settings sit above these: a host or a
|
|
2704
|
+
* viewer setting of a series color wins over `up` and `down` here, which are the mode's defaults
|
|
2705
|
+
* for anything the settings do not name. */
|
|
2316
2706
|
interface CanvasTheme {
|
|
2317
2707
|
background: string;
|
|
2318
2708
|
paneBorder: string;
|
|
2709
|
+
/** The ink a watermark writes behind the bars. */
|
|
2710
|
+
watermark: string;
|
|
2319
2711
|
grid: string;
|
|
2320
2712
|
axisText: string;
|
|
2321
2713
|
axisBackground: string;
|
|
@@ -2541,13 +2933,14 @@ interface ChartIconDiagnostic {
|
|
|
2541
2933
|
}
|
|
2542
2934
|
|
|
2543
2935
|
/** The glyphs of the chart's own controls, by meaning, each with every drawing that carries it. */
|
|
2544
|
-
declare const CONTROL_ICONS: Readonly<Record<"info" | "search" | "bold" | "
|
|
2936
|
+
declare const CONTROL_ICONS: Readonly<Record<"info" | "search" | "bold" | "open" | "close" | "volume" | "indicators" | "copy" | "textColor" | "visible" | "lineColor" | "template" | "fillColor" | "italic" | "locked" | "sync" | "caret" | "tip" | "measure" | "image" | "eraser" | "delete" | "remove" | "hidden" | "pause" | "play" | "reset" | "scroll" | "magnet" | "collapse" | "paneCollapse" | "paneRestore" | "paneMaximize" | "marketStatus" | "replayStatus" | "replayMark" | "replayCut" | "replay" | "undo" | "redo" | "settings" | "fullscreen" | "tileMaximize" | "tileRestore" | "download" | "chevronDown" | "chevronUp" | "chevronLeft" | "chevronRight" | "check" | "clear" | "goLive" | "stepForward" | "stepBack" | "calendar" | "selectBar" | "firstAvailable" | "randomBar" | "clock" | "cursorCross" | "cursorDot" | "cursorArrow" | "magnetStrong" | "drawingsShown" | "drawingsHidden" | "indicatorsShown" | "indicatorsHidden" | "allShown" | "allHidden" | "zoomIn" | "grip" | "tableAddColumn" | "tableAddRow" | "favoritesBar" | "lineSolid" | "lineDashed" | "lineDotted" | "lineThickness1" | "lineThickness2" | "lineThickness3" | "lineThickness4" | "lineEndNormal" | "lineEndArrow" | "settingsSymbol" | "settingsStatusLine" | "settingsScales" | "settingsCanvas" | "settingsEvents" | "compare" | "fullscreenExit" | "paneMoveUp" | "paneMoveDown" | "zoomOut" | "add" | "rename" | "duplicate" | "favorite" | "favorited" | "sortAscending" | "sortDescending" | "flyout" | "submenu" | "more" | "emptySearch" | "emptyCompare" | "operatorsShow" | "operatorsHide" | "operatorAdd" | "operatorSubtract" | "operatorMultiply" | "operatorDivide" | "operatorPower" | "operatorReciprocal" | "selectDate" | "zoomTool" | "stayInMode" | "stayInModeOn" | "unlocked" | "hide" | "glyphTools" | "visualOrder" | "volumeMuted", readonly Glyph[]>>;
|
|
2545
2937
|
/** An icon of one of the chart's own controls. */
|
|
2546
2938
|
type ControlIconId = keyof typeof CONTROL_ICONS;
|
|
2547
2939
|
/** Every icon a host may draw: a control's glyph by its meaning, a chart style by its id, a drawing
|
|
2548
|
-
* tool by its registry type,
|
|
2549
|
-
* `CHART_ICON_IDS`, so an id the chart does not draw is a type error
|
|
2550
|
-
|
|
2940
|
+
* tool by its registry type, a layout arrangement by its code, and a time-scale mark's glyph by its
|
|
2941
|
+
* shape. Exactly the ids in `CHART_ICON_IDS`, so an id the chart does not draw is a type error
|
|
2942
|
+
* before it is a refusal. */
|
|
2943
|
+
type ChartIconId = ControlIconId | `style.${ChartStyleId}` | `tool.${MiniatureTool}` | `layout.${ArrangementGlyphCode}` | MarkIconId;
|
|
2551
2944
|
/** A host's drawings for the chart's icons, by id. An icon left out keeps the chart's own. */
|
|
2552
2945
|
type ChartIcons = {
|
|
2553
2946
|
readonly [K in ChartIconId]?: ChartIconFactory;
|
|
@@ -2556,7 +2949,7 @@ type ChartIcons = {
|
|
|
2556
2949
|
* draws the left-to-right form of these. */
|
|
2557
2950
|
declare const MIRRORED_ICONS: ReadonlySet<ChartIconId>;
|
|
2558
2951
|
/** Every published icon id, in catalog order: the controls, then the styles, the tools and the
|
|
2559
|
-
* layouts in their registries' orders. */
|
|
2952
|
+
* layouts in their registries' orders, then the mark glyphs. */
|
|
2560
2953
|
declare const CHART_ICON_IDS: readonly ChartIconId[];
|
|
2561
2954
|
/** The chart's own drawing of an icon, as markup a host draws without the chart: a toolbar of its
|
|
2562
2955
|
* own, a native view. */
|
|
@@ -2700,6 +3093,8 @@ interface IndicatorPlots {
|
|
|
2700
3093
|
valuesInStatusLine?: boolean;
|
|
2701
3094
|
inputsInStatusLine?: boolean;
|
|
2702
3095
|
};
|
|
3096
|
+
/** The name written beside each plot's value label on the price scale. Absent writes none. */
|
|
3097
|
+
scaleTitle?: string;
|
|
2703
3098
|
/** Set when the indicator can't be computed from the current feed (e.g. no volume) — no plots
|
|
2704
3099
|
* are drawn and the host may surface the note. */
|
|
2705
3100
|
unavailable?: string;
|
|
@@ -2805,8 +3200,187 @@ declare function attachIndicators(chart: IChartApi, options?: {
|
|
|
2805
3200
|
* live, so a theme switch repaints the levels with everything else; the built-in dark palette's
|
|
2806
3201
|
* neutral stands in for a host that supplies none. */
|
|
2807
3202
|
neutral?: () => string;
|
|
3203
|
+
/** The index of the pane the main series stands in, where overlays are drawn and which is never
|
|
3204
|
+
* swept. A viewer may move it below another pane; the first pane when absent. */
|
|
3205
|
+
mainPane?: () => number;
|
|
2808
3206
|
}): IndicatorsRenderer;
|
|
2809
3207
|
|
|
3208
|
+
/** The chart's own pages, in rail order. */
|
|
3209
|
+
type ChartSettingsPageId = 'symbol' | 'statusLine' | 'scales' | 'canvas' | 'events';
|
|
3210
|
+
/** Paints an icon into a box and answers the disposer that empties it. */
|
|
3211
|
+
type ChartSettingsIconPainter = (box: HTMLElement) => () => void;
|
|
3212
|
+
/** One choice of a select. */
|
|
3213
|
+
interface ChartSettingsOption<V extends string> {
|
|
3214
|
+
value: V;
|
|
3215
|
+
label: string;
|
|
3216
|
+
}
|
|
3217
|
+
/** A tip beside a label: a short line on hover, or a card with a title and a body. */
|
|
3218
|
+
type ChartSettingsTip = {
|
|
3219
|
+
kind: 'hint';
|
|
3220
|
+
text: string;
|
|
3221
|
+
href?: string;
|
|
3222
|
+
} | {
|
|
3223
|
+
kind: 'card';
|
|
3224
|
+
title: string;
|
|
3225
|
+
body: string;
|
|
3226
|
+
href?: string;
|
|
3227
|
+
};
|
|
3228
|
+
/** A row's handle, for a row whose state another row decides. */
|
|
3229
|
+
interface ChartSettingsRowHandle {
|
|
3230
|
+
setDisabled(disabled: boolean): void;
|
|
3231
|
+
}
|
|
3232
|
+
/** The form a page is built with. Every builder appends a row to the page in call order, and the
|
|
3233
|
+
* row's `id` names it for a contribution placed before it. The chart's own rows are named by the
|
|
3234
|
+
* leaf they edit (`background` on the Status line page, for one), and a section the chart shows
|
|
3235
|
+
* only in some contexts by its own name (`indicators` on the Status line page).
|
|
3236
|
+
*
|
|
3237
|
+
* A checkbox row that is unchecked disables its own controls and every row indented under it, and
|
|
3238
|
+
* a disabled row stands its checkbox and its label back. */
|
|
3239
|
+
interface ChartSettingsForm {
|
|
3240
|
+
/** A section heading, written in capitals. Every heading after a page's first stands clear of the
|
|
3241
|
+
* section before it. */
|
|
3242
|
+
heading(text: string): void;
|
|
3243
|
+
/** A checkbox row. `indent` makes it a sub-row of the row above, and `hint` is the grey line
|
|
3244
|
+
* under it. `controls` builds the row's controls after its label. */
|
|
3245
|
+
check(row: {
|
|
3246
|
+
id: string;
|
|
3247
|
+
label: string;
|
|
3248
|
+
checked: boolean;
|
|
3249
|
+
onChange(checked: boolean): void;
|
|
3250
|
+
hint?: string;
|
|
3251
|
+
tip?: ChartSettingsTip;
|
|
3252
|
+
indent?: boolean;
|
|
3253
|
+
disabled?: boolean;
|
|
3254
|
+
controls?(controls: ChartSettingsControls): void;
|
|
3255
|
+
}): ChartSettingsRowHandle;
|
|
3256
|
+
/** A labelled row whose label is plain text and whose controls follow it. */
|
|
3257
|
+
field(row: {
|
|
3258
|
+
id: string;
|
|
3259
|
+
label: string;
|
|
3260
|
+
tip?: ChartSettingsTip;
|
|
3261
|
+
indent?: boolean;
|
|
3262
|
+
disabled?: boolean;
|
|
3263
|
+
controls(controls: ChartSettingsControls): void;
|
|
3264
|
+
}): ChartSettingsRowHandle;
|
|
3265
|
+
}
|
|
3266
|
+
/** The controls a row holds, laid out after its label in call order. A control is named for a
|
|
3267
|
+
* reader by its row's label unless `label` names it, as each of two colors on one row needs. */
|
|
3268
|
+
interface ChartSettingsControls {
|
|
3269
|
+
/** A color swatch. `opacity` adds the picker's opacity slider; `lineStyle` and `lineWidth` make
|
|
3270
|
+
* it a color and line swatch whose picker also sets them. A null color follows the bars. */
|
|
3271
|
+
color(control: {
|
|
3272
|
+
color: string | null;
|
|
3273
|
+
onColor(color: string): void;
|
|
3274
|
+
opacity?: boolean;
|
|
3275
|
+
lineStyle?: {
|
|
3276
|
+
value: 'solid' | 'dashed' | 'dotted';
|
|
3277
|
+
onChange(style: 'solid' | 'dashed' | 'dotted'): void;
|
|
3278
|
+
};
|
|
3279
|
+
lineWidth?: {
|
|
3280
|
+
value: number;
|
|
3281
|
+
options: readonly number[];
|
|
3282
|
+
onChange(width: number): void;
|
|
3283
|
+
};
|
|
3284
|
+
label?: string;
|
|
3285
|
+
disabled?: boolean;
|
|
3286
|
+
}): void;
|
|
3287
|
+
select<V extends string>(control: {
|
|
3288
|
+
value: V;
|
|
3289
|
+
options: readonly ChartSettingsOption<V>[];
|
|
3290
|
+
width: number;
|
|
3291
|
+
onChange(value: V): void;
|
|
3292
|
+
label?: string;
|
|
3293
|
+
disabled?: boolean;
|
|
3294
|
+
}): void;
|
|
3295
|
+
/** A select whose list checks any number of its options, and whose button joins the checked
|
|
3296
|
+
* labels or reads `none` when none is checked. The labels after the first are joined in lower
|
|
3297
|
+
* case unless `asWritten`. */
|
|
3298
|
+
multiSelect<V extends string>(control: {
|
|
3299
|
+
values: readonly V[];
|
|
3300
|
+
options: readonly ChartSettingsOption<V>[];
|
|
3301
|
+
width: number;
|
|
3302
|
+
none: string;
|
|
3303
|
+
onChange(values: readonly V[]): void;
|
|
3304
|
+
asWritten?: boolean;
|
|
3305
|
+
label?: string;
|
|
3306
|
+
disabled?: boolean;
|
|
3307
|
+
}): void;
|
|
3308
|
+
/** A number field, 100 pixels wide unless `width` says otherwise, and the unit after it. The value
|
|
3309
|
+
* is reported when the field is left or a stepper is pressed. NaN leaves the field empty. */
|
|
3310
|
+
number(control: {
|
|
3311
|
+
value: number;
|
|
3312
|
+
min: number;
|
|
3313
|
+
max: number;
|
|
3314
|
+
step: number;
|
|
3315
|
+
suffix?: string;
|
|
3316
|
+
width?: number;
|
|
3317
|
+
onChange(value: number): void;
|
|
3318
|
+
label?: string;
|
|
3319
|
+
disabled?: boolean;
|
|
3320
|
+
}): void;
|
|
3321
|
+
/** A line's thickness on its own, as a field wearing the thickness, whose list offers `options`. */
|
|
3322
|
+
lineWidth(control: {
|
|
3323
|
+
value: number;
|
|
3324
|
+
options: readonly number[];
|
|
3325
|
+
onChange(width: number): void;
|
|
3326
|
+
label?: string;
|
|
3327
|
+
disabled?: boolean;
|
|
3328
|
+
}): void;
|
|
3329
|
+
/** A level from 0 to 1, as a volume with a speaker before it or as an opacity over its color. A
|
|
3330
|
+
* drag reports every step it passes. */
|
|
3331
|
+
slider(control: {
|
|
3332
|
+
value: number;
|
|
3333
|
+
kind: 'volume' | {
|
|
3334
|
+
opacity: string;
|
|
3335
|
+
};
|
|
3336
|
+
onChange(value: number): void;
|
|
3337
|
+
label?: string;
|
|
3338
|
+
disabled?: boolean;
|
|
3339
|
+
}): void;
|
|
3340
|
+
/** Start a second line of controls under the first, in the controls' column. */
|
|
3341
|
+
nextLine(): void;
|
|
3342
|
+
}
|
|
3343
|
+
/** A host's contribution to the settings dialog. */
|
|
3344
|
+
interface ChartSettingsContribution {
|
|
3345
|
+
/** Either a page of the host's own, placed after another page (or last), or rows appended to one
|
|
3346
|
+
* of the chart's pages, before one of its rows (or at its end). `before` may name several rows or
|
|
3347
|
+
* sections: the rows land before the first of them the page holds, so a placement survives a
|
|
3348
|
+
* section the page shows only in some contexts (the Status line page's `indicators`).
|
|
3349
|
+
*
|
|
3350
|
+
* `after` names the page to follow: one of the chart's (a `ChartSettingsPageId`) or another
|
|
3351
|
+
* contributed page's id. A list names several, and the first of them the dialog holds wins, so
|
|
3352
|
+
* `after: ['trading', 'canvas']` follows a contributed `trading` page where there is one and the
|
|
3353
|
+
* Canvas page otherwise. The order is read once every contribution is known, so a page stands
|
|
3354
|
+
* after the contributed page it names whichever attached first. Pages that name the same
|
|
3355
|
+
* page stand after it in the order their extensions attach, each followed by the pages that name
|
|
3356
|
+
* it: the order of the widget's `extensions` (an extension attached again on a symbol switch
|
|
3357
|
+
* keeps its place), and one extension's pages in the order it contributes them. A page whose
|
|
3358
|
+
* `after` names no page the dialog holds, or is absent, stands last in the same order. */
|
|
3359
|
+
place: {
|
|
3360
|
+
page: {
|
|
3361
|
+
id: string;
|
|
3362
|
+
label: string;
|
|
3363
|
+
icon: ChartSettingsIconPainter;
|
|
3364
|
+
after?: string | readonly string[];
|
|
3365
|
+
};
|
|
3366
|
+
} | {
|
|
3367
|
+
into: ChartSettingsPageId;
|
|
3368
|
+
before?: string | readonly string[];
|
|
3369
|
+
};
|
|
3370
|
+
/** Build the rows. The dialog calls it whenever the page is drawn, including after every change
|
|
3371
|
+
* a row reports, so it reads the host's current state each time. */
|
|
3372
|
+
build(form: ChartSettingsForm): void;
|
|
3373
|
+
/** The dialog opened: answer the state that Cancel restores. */
|
|
3374
|
+
open?(): unknown;
|
|
3375
|
+
/** The viewer cancelled: restore the state `open` answered. Changes preview as they are made, so
|
|
3376
|
+
* this is the only undo. */
|
|
3377
|
+
cancel?(state: unknown): void;
|
|
3378
|
+
/** The viewer pressed Ok. */
|
|
3379
|
+
commit?(): void;
|
|
3380
|
+
/** The viewer chose "Apply defaults": return every setting this contribution owns to its default. */
|
|
3381
|
+
applyDefaults?(): void;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
2810
3384
|
/** Price display as an extension reads it — the chart's own formatter, so an overlay's label and the
|
|
2811
3385
|
* axis beside it can never disagree about what a number looks like. */
|
|
2812
3386
|
interface ChartPriceFormatter {
|
|
@@ -2924,9 +3498,10 @@ interface ChartExtensionMenuItem {
|
|
|
2924
3498
|
checked?: boolean;
|
|
2925
3499
|
/** The row's glyph. Omitted leaves the gutter empty and the label still aligned. */
|
|
2926
3500
|
icon?: ChartExtensionIcon;
|
|
2927
|
-
/** Where the row sits. `level` (the default) is an action on the price the pointer landed on
|
|
2928
|
-
* joins the group under Copy price and Paste
|
|
2929
|
-
*
|
|
3501
|
+
/** Where the row sits. `level` (the default) is an action on the price the pointer landed on: it
|
|
3502
|
+
* joins the group under Copy price and Paste, and the price menu the price scale's plus opens,
|
|
3503
|
+
* where each extension's rows stand together; `view` is a switch over what the chart shows and
|
|
3504
|
+
* joins the group under the remove rows, and the price menu leaves it out. */
|
|
2930
3505
|
group?: 'level' | 'view';
|
|
2931
3506
|
run(): void;
|
|
2932
3507
|
}
|
|
@@ -2959,6 +3534,42 @@ interface ChartExtensionHideLayerHandle {
|
|
|
2959
3534
|
/** Withdraw the layer from the eye. Detach withdraws it either way. */
|
|
2960
3535
|
remove(): void;
|
|
2961
3536
|
}
|
|
3537
|
+
/** A row of an extension's own in the pane's legend: an element the extension builds and keeps,
|
|
3538
|
+
* which the chart places under the symbol's reading and above the indicator rows. The row wears the
|
|
3539
|
+
* status line's backdrop like the legend's own parts, and takes the pointer, so its controls are
|
|
3540
|
+
* pressed rather than the chart under them. Whether it shows, and what it holds, is the
|
|
3541
|
+
* extension's own state: it hides or fills the element as it likes. */
|
|
3542
|
+
interface ChartExtensionLegendRow {
|
|
3543
|
+
element: HTMLElement;
|
|
3544
|
+
/** Where the row stands among contributed rows: a lower rank first, then the rows of one rank
|
|
3545
|
+
* as they were contributed. Absent reads as 0. */
|
|
3546
|
+
rank?: number;
|
|
3547
|
+
}
|
|
3548
|
+
/** The frame a contribution paints an image of the chart in. */
|
|
3549
|
+
interface ChartExtensionCaptureFrame {
|
|
3550
|
+
/** The chart element's width in CSS pixels. */
|
|
3551
|
+
width: number;
|
|
3552
|
+
/** The chart element's height in CSS pixels. */
|
|
3553
|
+
height: number;
|
|
3554
|
+
/** Image pixels per CSS pixel. */
|
|
3555
|
+
pixelRatio: number;
|
|
3556
|
+
}
|
|
3557
|
+
/** An extension's part in an image of the chart. Every image the chart produces of itself (a
|
|
3558
|
+
* download, a copy, `image.capture()`) is taken through the contributions of the extensions
|
|
3559
|
+
* attached to it: each `before` runs, the renderer draws the image, each `paint` paints over it,
|
|
3560
|
+
* and each restore runs, the last answered first. A contribution that throws is contained: the
|
|
3561
|
+
* image is still produced and every restore still runs. */
|
|
3562
|
+
interface ChartExtensionCapture {
|
|
3563
|
+
/** Runs synchronously before the chart draws into the image; answer the restore, run after it is
|
|
3564
|
+
* taken. The renderer draws every pending change before it takes the image, so what a `before`
|
|
3565
|
+
* changed through the chart's capabilities (a price line it updated, a primitive it asked to
|
|
3566
|
+
* redraw) is drawn as it now stands. */
|
|
3567
|
+
before?(): (() => void) | void;
|
|
3568
|
+
/** Runs after the bitmap is taken: paint over it. The origin is the chart element's top left,
|
|
3569
|
+
* which is the top left of the context's `container`; pixelRatio is image pixels per CSS pixel.
|
|
3570
|
+
* The context arrives untransformed, and the chart puts back its state after each paint. */
|
|
3571
|
+
paint?(target: CanvasRenderingContext2D, frame: ChartExtensionCaptureFrame): void;
|
|
3572
|
+
}
|
|
2962
3573
|
/** Builds an extension's context menu rows. The chart calls it on every raise with that moment's
|
|
2963
3574
|
* context, so the rows can depend on the level that was pressed. An empty list contributes nothing
|
|
2964
3575
|
* and costs nothing. */
|
|
@@ -2987,8 +3598,8 @@ interface ChartExtensionContext {
|
|
|
2987
3598
|
* over every pane and over whatever the page stacks around the widget mounts HERE, at viewport
|
|
2988
3599
|
* coordinates; the context menu does the same. */
|
|
2989
3600
|
layer: HTMLElement;
|
|
2990
|
-
/** The chart's effective canvas palette: the mode's resolved theme
|
|
2991
|
-
*
|
|
3601
|
+
/** The chart's effective canvas palette: the mode's resolved theme under the chart settings
|
|
3602
|
+
* in effect, projected onto the values a canvas draws with. */
|
|
2992
3603
|
theme(): CanvasTheme;
|
|
2993
3604
|
formatter(): ChartPriceFormatter;
|
|
2994
3605
|
/** The name symbology gives the charted market, for a surface that prints it; `chart.symbol()`
|
|
@@ -3020,6 +3631,21 @@ interface ChartExtensionContext {
|
|
|
3020
3631
|
contributeContextMenu(build: ChartExtensionMenuBuilder): () => void;
|
|
3021
3632
|
contributeCommands(commands: readonly ChartExtensionCommand[]): () => void;
|
|
3022
3633
|
contributeHideLayer(layer: ChartExtensionHideLayer): ChartExtensionHideLayerHandle;
|
|
3634
|
+
/** Add a page of the extension's own to the chart settings dialog, or rows to one of the chart's
|
|
3635
|
+
* pages. The dialog lists what the active chart's extensions contribute when it opens; the
|
|
3636
|
+
* returned function withdraws the contribution, and detach withdraws it either way. */
|
|
3637
|
+
contributeSettings(contribution: ChartSettingsContribution): () => void;
|
|
3638
|
+
/** Place a row of the extension's own in the pane's legend. The returned function takes it out,
|
|
3639
|
+
* and detach takes it out either way; the element is the extension's to keep. */
|
|
3640
|
+
contributeLegendRow(row: ChartExtensionLegendRow): () => void;
|
|
3641
|
+
/** Ask the datafeed for the chart's bar marks and time-scale marks again, now, and draw what it
|
|
3642
|
+
* answers: for an extension whose own setting changes what the feed serves, such as a row it
|
|
3643
|
+
* contributes to the settings dialog, so the change shows while the dialog is open. */
|
|
3644
|
+
refreshMarks(): void;
|
|
3645
|
+
/** Take part in every image of the chart: hold out what the extension draws while the image is
|
|
3646
|
+
* taken, or paint over the image what the chart's canvases do not carry. The returned function
|
|
3647
|
+
* withdraws the contribution, and detach withdraws it either way. */
|
|
3648
|
+
contributeCapture(capture: ChartExtensionCapture): () => void;
|
|
3023
3649
|
}
|
|
3024
3650
|
/** What an extension gives back at attach. `detach` is required; the two state methods are the
|
|
3025
3651
|
* opt-in for anything the viewer would expect a saved chart to bring back. */
|
|
@@ -3162,8 +3788,10 @@ declare function clipToWindow(bars: readonly FeedBar[], window: {
|
|
|
3162
3788
|
to: number;
|
|
3163
3789
|
} | null): FeedBar[];
|
|
3164
3790
|
/** Placement → where the series goes. Pane index for 'new-pane' is resolved at add time (the
|
|
3165
|
-
* chart's CURRENT pane count), matching the indicator renderer's rule.
|
|
3166
|
-
|
|
3791
|
+
* chart's CURRENT pane count), matching the indicator renderer's rule. A 'new-scale' series takes
|
|
3792
|
+
* the side the main series does not stand on, the left unless named. The other two stand in the
|
|
3793
|
+
* main pane, the first unless a viewer moved it. */
|
|
3794
|
+
declare function seriesTargetOf(placement: ComparePlacement, paneCount: number, secondScale?: 'left' | 'right', mainPane?: number): {
|
|
3167
3795
|
paneIndex: number;
|
|
3168
3796
|
priceScaleId?: string;
|
|
3169
3797
|
};
|
|
@@ -3179,6 +3807,12 @@ interface CompareDeps {
|
|
|
3179
3807
|
} | null;
|
|
3180
3808
|
/** How many bars a fresh compare asks for when the main window is not yet known. */
|
|
3181
3809
|
seedCountBack?: number;
|
|
3810
|
+
/** The side the main series' price scale stands on; the right when absent. A 'new-scale'
|
|
3811
|
+
* comparison takes the other side. */
|
|
3812
|
+
mainScale?(): 'left' | 'right';
|
|
3813
|
+
/** The index of the pane the main series stands in, which a 'same-percent' or 'new-scale'
|
|
3814
|
+
* comparison shares; the first pane when absent. */
|
|
3815
|
+
mainPane?(): number;
|
|
3182
3816
|
/** Entries changed (add/remove/visibility/color) or a comparison's latest value moved — hosts
|
|
3183
3817
|
* re-render their legend from `list()` / `latest()`. */
|
|
3184
3818
|
onChange?(): void;
|
|
@@ -3208,9 +3842,9 @@ interface CompareHandle {
|
|
|
3208
3842
|
list(): CompareEntry[];
|
|
3209
3843
|
/** The latest clipped close for one comparison, or null (no bars in window / unknown symbol). */
|
|
3210
3844
|
latest(symbol: string): number | null;
|
|
3211
|
-
/** The pane the comparison's series currently lives on
|
|
3212
|
-
*
|
|
3213
|
-
*
|
|
3845
|
+
/** The pane the comparison's series currently lives on, or null for an unknown symbol: how a host
|
|
3846
|
+
* places the comparison's legend row in the right pane's group. Read live from the series,
|
|
3847
|
+
* because pane indices shift as other panes come, go and move. */
|
|
3214
3848
|
paneIndexOf(symbol: string): number | null;
|
|
3215
3849
|
/** Percent change across the clipped window (last close vs the window's FIRST in-window close —
|
|
3216
3850
|
* the loaded-window approximation of the percent scale's first-visible-bar base), or null with
|
|
@@ -3224,6 +3858,9 @@ interface CompareHandle {
|
|
|
3224
3858
|
sync(): void;
|
|
3225
3859
|
/** The chart's timeframe changed: every comparison refetches at the new bucket size. */
|
|
3226
3860
|
setTimeframe(): void;
|
|
3861
|
+
/** The main series' price scale moved to the other side: every 'new-scale' comparison moves to
|
|
3862
|
+
* the side it left, and that side shows while one lives. */
|
|
3863
|
+
scaleMoved(): void;
|
|
3227
3864
|
serialize(): CompareSnapshot[];
|
|
3228
3865
|
/** Replace the whole set from a snapshot (restore path). Unknown placements are dropped. */
|
|
3229
3866
|
restore(snapshot: readonly unknown[]): void;
|
|
@@ -3519,7 +4156,7 @@ interface ChartSaveLoadApi {
|
|
|
3519
4156
|
}
|
|
3520
4157
|
|
|
3521
4158
|
/** What one step says changed, in the order a diff asks. */
|
|
3522
|
-
type HistoryChange = 'symbol' | 'timeframe' | 'style' | 'priceScale' | '
|
|
4159
|
+
type HistoryChange = 'symbol' | 'timeframe' | 'style' | 'priceScale' | 'settings' | 'compareAdd' | 'compareRemove' | 'compareChange' | 'indicatorAdd' | 'indicatorRemove' | 'indicatorChange' | 'paneMove' | 'drawingAdd' | 'drawingRemove' | 'drawingChange';
|
|
3523
4160
|
/** The undo surface a control and a command read. */
|
|
3524
4161
|
interface ChartHistoryApi {
|
|
3525
4162
|
canUndo(): boolean;
|
|
@@ -3613,8 +4250,12 @@ interface CommandSpec {
|
|
|
3613
4250
|
labelText?: string;
|
|
3614
4251
|
/** The default shortcut, in `KeyboardEvent` terms (e.g. `Alt+KeyR`). */
|
|
3615
4252
|
shortcut?: string;
|
|
3616
|
-
/** Whether the command can run right now, from capability and chart state.
|
|
3617
|
-
|
|
4253
|
+
/** Whether the command can run right now, from capability and chart state. A command whose one id
|
|
4254
|
+
* spans many subjects reads the argument it would run with, and answers for that subject: the
|
|
4255
|
+
* top pane cannot move up. Asked with none, it answers whether any subject could, unless a run
|
|
4256
|
+
* with none acts on a subject of its own, as the horizontal line at the crosshair's price does,
|
|
4257
|
+
* and then for that subject. */
|
|
4258
|
+
available(arg?: unknown): boolean;
|
|
3618
4259
|
/** Whether the access policy refuses this argument, for a command whose one id spans many
|
|
3619
4260
|
* subjects (the tool to arm). A refused argument answers `denied`, as a refused id does. */
|
|
3620
4261
|
refuses?(arg: unknown): boolean;
|
|
@@ -3643,8 +4284,8 @@ interface CommandRegistry {
|
|
|
3643
4284
|
/** Every registered command, in registration order. Unavailable and denied commands are listed:
|
|
3644
4285
|
* a menu decides whether to draw a disabled row, and hiding one would leave the host guessing. */
|
|
3645
4286
|
list(): readonly CommandSpec[];
|
|
3646
|
-
/** Whether `execute` would run this command right now. */
|
|
3647
|
-
available(id: string): boolean;
|
|
4287
|
+
/** Whether `execute` would run this command right now, with this argument where it takes one. */
|
|
4288
|
+
available(id: string, arg?: unknown): boolean;
|
|
3648
4289
|
execute(id: string, arg?: unknown): CommandResult;
|
|
3649
4290
|
/** Remap a shortcut, or clear it with null. */
|
|
3650
4291
|
setShortcut(id: string, shortcut: string | null): void;
|
|
@@ -3999,6 +4640,8 @@ interface DrawingsHandle {
|
|
|
3999
4640
|
setVisibilityPreset(preset: VisibilityPreset): void;
|
|
4000
4641
|
/** Drop a ready picture onto the chart, centred in view, selected. */
|
|
4001
4642
|
placeImage(image: PlacedImage): void;
|
|
4643
|
+
/** Place a horizontal line at a price in the tool's default look, selected. */
|
|
4644
|
+
placeHorizontalLine(price: number): void;
|
|
4002
4645
|
/** Blank every drawing (the eye), without touching any drawing's own switch. */
|
|
4003
4646
|
setAllHidden(hidden: boolean): void;
|
|
4004
4647
|
allHidden(): boolean;
|
|
@@ -4157,7 +4800,7 @@ declare function mountContextMenu(container: HTMLElement, run: (id: ChartMenuAct
|
|
|
4157
4800
|
* timeframe, tick, price format, teardown) and minus the session verbs only the package's own
|
|
4158
4801
|
* surfaces use (the live `IDrawing`, the preview and edit session, the inline text session, the
|
|
4159
4802
|
* presets). The public surface grows on demand, not by exposure. */
|
|
4160
|
-
type ChartDrawingsApi = Omit<DrawingsHandle, 'setSymbol' | 'setTimeframe' | 'setTick' | 'setCurrency' | 'setPriceFormatter' | 'destroy' | 'selectedDrawing' | 'commitEdit' | 'beginPreview' | 'endPreview' | 'textEdit' | 'commitText' | 'cancelText' | 'presets'>;
|
|
4803
|
+
type ChartDrawingsApi = Omit<DrawingsHandle, 'setSymbol' | 'setTimeframe' | 'setTick' | 'setCurrency' | 'setPriceFormatter' | 'destroy' | 'selectedDrawing' | 'commitEdit' | 'beginPreview' | 'endPreview' | 'textEdit' | 'commitText' | 'cancelText' | 'presets' | 'placeHorizontalLine'>;
|
|
4161
4804
|
|
|
4162
4805
|
/** What a preset frames: seconds of history, the year to date, or everything loaded. */
|
|
4163
4806
|
type RangeSpan = number | 'ytd' | 'all';
|
|
@@ -4336,14 +4979,24 @@ interface ChartHandle {
|
|
|
4336
4979
|
/** Stepping back and forward through this chart's own content. Each step is one reading of the
|
|
4337
4980
|
* content, so a step back puts the whole reading back rather than reversing one verb. */
|
|
4338
4981
|
history: ChartHistoryApi;
|
|
4339
|
-
/** The EFFECTIVE
|
|
4340
|
-
*
|
|
4341
|
-
|
|
4342
|
-
/** Apply
|
|
4343
|
-
* over earlier ones leaf by leaf, so two
|
|
4344
|
-
|
|
4982
|
+
/** The EFFECTIVE settings tree: the theme's factory values, the host's constructor partial, then
|
|
4983
|
+
* the viewer's own leaves. */
|
|
4984
|
+
settings(): ChartSettings;
|
|
4985
|
+
/** Apply a partial to the viewer's own leaves: the top of the precedence ladder. Later calls layer
|
|
4986
|
+
* over earlier ones leaf by leaf, so two callers compose instead of clobbering. A leaf the tree
|
|
4987
|
+
* does not have, or a value its leaf cannot hold, is ignored. The change is a content change: it
|
|
4988
|
+
* marks the chart for saving and is a step of its history. */
|
|
4989
|
+
applySettings(partial: PartialChartSettings): void;
|
|
4990
|
+
/** Drop the viewer's own leaves and put the price scale back to normal. The theme's values and the
|
|
4991
|
+
* host's partial stand; the viewport and every other preference are untouched. */
|
|
4992
|
+
resetSettings(): void;
|
|
4345
4993
|
/** The chart's one price formatter, in the chart's language and on the symbol's own grid. */
|
|
4346
4994
|
formatter(): PriceFormatter;
|
|
4995
|
+
/** Ask the datafeed for this chart's bar marks and time-scale marks again, now, over the window
|
|
4996
|
+
* the chart holds, and draw what it answers in place of what is drawn. A host calls it when a
|
|
4997
|
+
* change of its own changes what its feed serves, so the change shows at once. A chart that draws
|
|
4998
|
+
* no marks, or holds no bars yet, asks nothing. */
|
|
4999
|
+
refreshMarks(): void;
|
|
4347
5000
|
saveLoad: ChartSaveLoadApi;
|
|
4348
5001
|
/** Pane-composition sync primitives, which a layout drives. */
|
|
4349
5002
|
sync: ChartPaneSyncApi;
|
|
@@ -4739,6 +5392,8 @@ interface Capabilities {
|
|
|
4739
5392
|
/** The feed serves neutral bar marks / time-scale marks. */
|
|
4740
5393
|
marks: boolean;
|
|
4741
5394
|
timescaleMarks: boolean;
|
|
5395
|
+
/** The feed serves a symbol's live prices: its bid, ask, last and previous close. */
|
|
5396
|
+
prices: boolean;
|
|
4742
5397
|
/** How live the active symbol's data is; null until it resolves. */
|
|
4743
5398
|
dataStatus: DataStatus | null;
|
|
4744
5399
|
/** Which saved-resource families the adapter carries. All false without an adapter. */
|
|
@@ -5072,10 +5727,11 @@ interface ChartWidgetOptions extends MarkPainterHooks {
|
|
|
5072
5727
|
drawingPersistence?: DrawingPersistenceOptions;
|
|
5073
5728
|
/** The product theme: which built-in mode, and any custom semantic palettes. */
|
|
5074
5729
|
theme?: ThemeOptions;
|
|
5075
|
-
/**
|
|
5076
|
-
* precedence ladder, and it wins over the palette
|
|
5077
|
-
*
|
|
5078
|
-
|
|
5730
|
+
/** The chart settings this host opens every chart with: any leaves of any sections, over the
|
|
5731
|
+
* theme's factory values. This is the other precedence ladder, and it wins over the palette
|
|
5732
|
+
* wherever both could reach the same pixel: the viewer's own settings (`applySettings`, the
|
|
5733
|
+
* settings dialog, a saved chart) beat this, and this beats what the theme resolves to. */
|
|
5734
|
+
settings?: PartialChartSettings;
|
|
5079
5735
|
/** Which chart behavior exists. */
|
|
5080
5736
|
features?: FeatureConfig;
|
|
5081
5737
|
/** Which of the chart's own controls render. */
|
|
@@ -5421,6 +6077,9 @@ interface PaneState {
|
|
|
5421
6077
|
heights: Readonly<Record<number, number>>;
|
|
5422
6078
|
/** Heights remembered from BEFORE the pane's current collapse/maximize, by pane index. */
|
|
5423
6079
|
remembered: Readonly<Record<number, number>>;
|
|
6080
|
+
/** The index of the main pane, which a viewer may move below another pane. The first when
|
|
6081
|
+
* absent. */
|
|
6082
|
+
main?: number;
|
|
5424
6083
|
}
|
|
5425
6084
|
interface PanePlan {
|
|
5426
6085
|
/** Heights to apply, by pane index (only entries that change). */
|
|
@@ -5429,7 +6088,7 @@ interface PanePlan {
|
|
|
5429
6088
|
remembered: Record<number, number>;
|
|
5430
6089
|
}
|
|
5431
6090
|
/** Plan one pane operation. The TOTAL height is conserved exactly — the space a pane gives up goes
|
|
5432
|
-
* to the main pane
|
|
6091
|
+
* to the main pane and vice versa, because the chart's own height is fixed by its container;
|
|
5433
6092
|
* handing back a different sum would make the renderer redistribute unpredictably. */
|
|
5434
6093
|
declare function planPaneOp(state: PaneState, op: PaneOp): PanePlan;
|
|
5435
6094
|
/** Whether a pane currently reads as collapsed (drives which control the legend shows).
|
|
@@ -5450,14 +6109,32 @@ declare const SESSION_LABEL: Readonly<Record<SessionState, string>>;
|
|
|
5450
6109
|
* against the theme in effect, so the marker follows light or dark and a host's custom palette
|
|
5451
6110
|
* instead of carrying a color of its own. */
|
|
5452
6111
|
declare const SESSION_DOT: Readonly<Record<SessionState, ThemeRoleId>>;
|
|
5453
|
-
/**
|
|
5454
|
-
* read
|
|
5455
|
-
*
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
*
|
|
5459
|
-
*
|
|
5460
|
-
|
|
6112
|
+
/** The bar times among `times` (ascending) that open a new trading day: each bar whose trading day,
|
|
6113
|
+
* read in the exchange zone, differs from the bar before it. The first bar opens nothing, because
|
|
6114
|
+
* the day before it is not on screen. */
|
|
6115
|
+
declare function sessionBreakTimes(model: SessionModel, times: readonly number[]): number[];
|
|
6116
|
+
/** How the bands look under the chart settings: the shading of each stretch outside regular hours
|
|
6117
|
+
* (null leaves it clear) and the line at each session's start (null draws none). The closed
|
|
6118
|
+
* stretch keeps its theme role. */
|
|
6119
|
+
interface SessionLook {
|
|
6120
|
+
pre: string | null;
|
|
6121
|
+
after: string | null;
|
|
6122
|
+
extended: string | null;
|
|
6123
|
+
breaks: {
|
|
6124
|
+
color: string;
|
|
6125
|
+
width: number;
|
|
6126
|
+
style: ChartStrokeStyle;
|
|
6127
|
+
} | null;
|
|
6128
|
+
}
|
|
6129
|
+
/** A series primitive that shades every non-regular-hours stretch of the visible chart and draws a
|
|
6130
|
+
* vertical line where each trading day starts. Bars are read back from the price series (no
|
|
6131
|
+
* second feed), classified under the symbol's CURRENT session model, merged into runs, and drawn as
|
|
6132
|
+
* full-height rects UNDER the main series (zOrder bottom). Re-renders with every chart paint, so it
|
|
6133
|
+
* tracks pan/zoom for free. An UNKNOWN model (null) draws nothing: drawing nothing is the only
|
|
6134
|
+
* honest render before the symbol resolves. A continuous market never bands (it is always open),
|
|
6135
|
+
* though its days still break. Both render on INTRADAY timeframes only: a daily or larger bar spans
|
|
6136
|
+
* whole sessions, so classifying its single timestamp would shade entire days by whichever session
|
|
6137
|
+
* that instant fell in, and every bar would start a day. */
|
|
5461
6138
|
interface SessionBandsPrimitive {
|
|
5462
6139
|
paneViews(): unknown[];
|
|
5463
6140
|
attached(param: {
|
|
@@ -5470,9 +6147,14 @@ interface SessionBandsPrimitive {
|
|
|
5470
6147
|
* repaint (on a quiet market: never). */
|
|
5471
6148
|
refresh(): void;
|
|
5472
6149
|
}
|
|
5473
|
-
declare function createSessionBands(chart: IChartApi, series: ISeriesApi<SeriesType>,
|
|
6150
|
+
declare function createSessionBands(chart: IChartApi, series: ISeriesApi<SeriesType>,
|
|
6151
|
+
/** Whether the stretches outside regular hours are shaded. */
|
|
6152
|
+
enabled: () => boolean, model: () => SessionModel | null, intraday: () => boolean,
|
|
5474
6153
|
/** The theme in effect. Read at draw time, so a mode switch repaints the bands with the pane. */
|
|
5475
|
-
theme: () => SemanticTheme
|
|
6154
|
+
theme: () => SemanticTheme,
|
|
6155
|
+
/** The colors and the session breaks the chart settings ask for. Without it each stretch wears
|
|
6156
|
+
* its theme role and no break is drawn. */
|
|
6157
|
+
look?: () => SessionLook): SessionBandsPrimitive;
|
|
5476
6158
|
|
|
5477
6159
|
/** The compact editor beside `rect` inside `container`, its glyphs drawn from the chart's own
|
|
5478
6160
|
* artwork. */
|
|
@@ -5486,6 +6168,61 @@ declare function openInputsEditor(container: HTMLElement, rect: {
|
|
|
5486
6168
|
* field's name and an enum's options are the manifest's own vocabulary and are not translated. */
|
|
5487
6169
|
strings?: ChartI18n): void;
|
|
5488
6170
|
|
|
6171
|
+
/** The chart settings a chart opens with under a resolved theme, before any host or viewer names a
|
|
6172
|
+
* leaf. */
|
|
6173
|
+
declare function chartSettingsDefaults(theme: SemanticTheme): ChartSettings;
|
|
6174
|
+
/** Every section of the tree, in its order. */
|
|
6175
|
+
declare const CHART_SETTINGS_SECTIONS: readonly ChartSettingsSection[];
|
|
6176
|
+
/** What reading a stored partial kept, and the `section.leaf` paths it had to drop because the value
|
|
6177
|
+
* was not one the leaf can hold. A path the tree does not have at all is ignored rather than
|
|
6178
|
+
* reported: it is a leaf this build does not know, not a broken one. */
|
|
6179
|
+
interface ReadChartSettings {
|
|
6180
|
+
settings: PartialChartSettings;
|
|
6181
|
+
rejected: string[];
|
|
6182
|
+
}
|
|
6183
|
+
/** Read a stored or supplied partial. `isColor` decides whether a string is a color the renderer can
|
|
6184
|
+
* paint; the portable parser is the default. */
|
|
6185
|
+
declare function readPartialChartSettings(raw: unknown, isColor?: (value: string) => boolean): ReadChartSettings;
|
|
6186
|
+
/** Layer partials over a complete tree, later partials winning leaf by leaf. A leaf the tree does
|
|
6187
|
+
* not have is ignored. */
|
|
6188
|
+
declare function layerChartSettings(base: ChartSettings, ...partials: (PartialChartSettings | null | undefined)[]): ChartSettings;
|
|
6189
|
+
|
|
6190
|
+
/** The chart settings' factory colors that are the same in both modes. */
|
|
6191
|
+
interface ChartFactoryColors {
|
|
6192
|
+
/** A single-value line drawn in one color, and the area style's line. */
|
|
6193
|
+
line: string;
|
|
6194
|
+
/** A single-value line drawn as a gradient: its color at the highest price on screen. */
|
|
6195
|
+
lineGradientTop: string;
|
|
6196
|
+
/** Its color at the lowest price on screen. */
|
|
6197
|
+
lineGradientBottom: string;
|
|
6198
|
+
/** The area style's fill at its line, fading to the second at the pane's foot. */
|
|
6199
|
+
areaTop: string;
|
|
6200
|
+
areaBottom: string;
|
|
6201
|
+
/** The vertical line at each session's start. */
|
|
6202
|
+
sessionBreaks: string;
|
|
6203
|
+
/** The previous session's close on the price scale. */
|
|
6204
|
+
previousClose: string;
|
|
6205
|
+
/** The visible range's high and low: their lines across the plot, and their labels on the scale,
|
|
6206
|
+
* while the setting names no color of its own. */
|
|
6207
|
+
highLowLine: string;
|
|
6208
|
+
highLowLabel: string;
|
|
6209
|
+
bid: string;
|
|
6210
|
+
ask: string;
|
|
6211
|
+
/** The text on every colored value label the price scale wears, and on the tag beside it. */
|
|
6212
|
+
scaleLabelText: string;
|
|
6213
|
+
/** The last values of the pre-market, post-market and overnight stretches on the price scale. */
|
|
6214
|
+
preMarketLabel: string;
|
|
6215
|
+
postMarketLabel: string;
|
|
6216
|
+
nightLabel: string;
|
|
6217
|
+
}
|
|
6218
|
+
/** The factory colors of the chart settings that do not change with the mode. */
|
|
6219
|
+
declare const CHART_FACTORY_COLORS: Readonly<ChartFactoryColors>;
|
|
6220
|
+
/** The brand pair: what a host's own surfaces on the chart read, an extension's lines among them,
|
|
6221
|
+
* so a rebrand edits two strings. The candles keep the series pair, because candles are the market
|
|
6222
|
+
* and the brand pair marks what a host draws on top of it. */
|
|
6223
|
+
declare const BRAND_UP = "#4c98fb";
|
|
6224
|
+
declare const BRAND_DOWN = "#f23645";
|
|
6225
|
+
|
|
5489
6226
|
/** The `/symbols` fields this mapping reads. A server may send more; anything not listed here has
|
|
5490
6227
|
* no place in symbology. */
|
|
5491
6228
|
interface UdfSymbolResponse {
|
|
@@ -5668,12 +6405,34 @@ declare function timezoneLabel(zone: string, at?: Date): string;
|
|
|
5668
6405
|
* `tag`. */
|
|
5669
6406
|
declare function formatClock(tag: string, zone: string, at?: Date): string;
|
|
5670
6407
|
/** The time-axis tick-mark formatter for lightweight-charts: each mark granularity written in the
|
|
5671
|
-
* zone and the language. Assign it to
|
|
5672
|
-
|
|
6408
|
+
* zone and the language, the times on a clock of 24 hours or of 12. Assign it to
|
|
6409
|
+
* `timeScale.tickMarkFormatter`. */
|
|
6410
|
+
declare function makeTickMarkFormatter(tag: string, zone: string, hours?: ChartHoursFormat): (time: Time, tickMarkType: TickMarkType) => string;
|
|
6411
|
+
/** How the crosshair's time label writes a moment: the date's pattern, whether the weekday leads it,
|
|
6412
|
+
* the clock, and the words the quarter of a year is written with. */
|
|
6413
|
+
interface TimeLabelFormat {
|
|
6414
|
+
dateFormat: ChartDateFormat;
|
|
6415
|
+
dayOfWeek: boolean;
|
|
6416
|
+
hoursFormat: ChartHoursFormat;
|
|
6417
|
+
/** The quarter, 1 to 4, as the reader's language writes it (Q3). */
|
|
6418
|
+
quarter(quarter: number): string;
|
|
6419
|
+
}
|
|
6420
|
+
/** A date written by a pattern, in the zone and the language: the month's name from the language,
|
|
6421
|
+
* every number in Latin digits. */
|
|
6422
|
+
declare function formatChartDate(at: Date, zone: string, tag: string, pattern: ChartDateFormat, quarter: (quarter: number) => string): string;
|
|
6423
|
+
/** A pattern written on the sample date, in the reader's language, with or without the weekday:
|
|
6424
|
+
* what a date-format picker shows for each choice ("Mon 29 Sep '97"). */
|
|
6425
|
+
declare function chartDateSample(format: ChartDateFormat, options: {
|
|
6426
|
+
locale: string;
|
|
6427
|
+
dayOfWeek: boolean;
|
|
6428
|
+
t: ChartTranslate;
|
|
6429
|
+
}): string;
|
|
5673
6430
|
/** The crosshair time label for lightweight-charts: the date always, the wall time only when
|
|
5674
6431
|
* `withTime` (an intraday chart). A daily or larger bar's timestamp is a session date, and a
|
|
5675
|
-
* shifted midnight would misread as a fill time.
|
|
5676
|
-
|
|
6432
|
+
* shifted midnight would misread as a fill time. With a `format` the date follows its pattern,
|
|
6433
|
+
* weekday and clock; without one it is the language's own short date with its weekday, on a clock
|
|
6434
|
+
* of 24 hours. Assign it to `localization.timeFormatter`. */
|
|
6435
|
+
declare function makeCrosshairTimeFormatter(tag: string, zone: string, withTime: boolean, format?: TimeLabelFormat): (time: Time) => string;
|
|
5677
6436
|
/** One row of the timezone picker: the choice it selects and the text it wears. */
|
|
5678
6437
|
interface TimezoneRow {
|
|
5679
6438
|
readonly id: string;
|
|
@@ -5810,4 +6569,4 @@ declare function mountTimeframePicker(options: TimeframePickerOptions & {
|
|
|
5810
6569
|
container: HTMLElement;
|
|
5811
6570
|
}): MountedTimeframePicker;
|
|
5812
6571
|
|
|
5813
|
-
export { ARRANGEMENTS, type AccessPolicy, type ActiveSubsession, type Arrangement, type AttachDrawingsOptions, BRAND_DOWN, BRAND_UP, BUILT_IN_INDICATORS, BUILT_IN_LOCALES, type BuiltInIndicator, CHART_ICON_IDS, CHART_STYLES, COLLAPSED_H, COMPARE_COLORS, type CanvasTheme, type Capabilities, ChartBody, type ChartChrome, type ChartCompareApi, type ChartCustomLocale, ChartDatafeed, type ChartDictionary, type ChartDrawingsApi, type ChartEvents, type ChartExtension, type ChartExtensionChart, type ChartExtensionCommand, type ChartExtensionContext, type ChartExtensionHandle, type ChartExtensionIcon, type ChartExtensionIconPath, type ChartExtensionMenuBuilder, type ChartExtensionMenuContext, type ChartExtensionMenuItem, type ChartExtensionPane, type ChartExtensionPriceLine, type ChartExtensionReplayState, type ChartExtensionScope, type ChartExtensionSeries, type ChartHandle, type ChartHistoryApi, type ChartI18n, type ChartI18nOptions, type ChartIconArtwork, type ChartIconContext, type ChartIconDiagnostic, type ChartIconFactory, type ChartIconFailure, type ChartIconId, type ChartIcons, type ChartLegendRow, type ChartLocale, type ChartLocaleCode, type ChartMenuAction, type ChartMenuContext, type ChartMenuIcon, type ChartMenuRow, ChartMessageKey, ChartMeta, type
|
|
6572
|
+
export { ARRANGEMENTS, type AccessPolicy, type ActiveSubsession, type Arrangement, type AttachDrawingsOptions, BRAND_DOWN, BRAND_UP, BUILT_IN_INDICATORS, BUILT_IN_LOCALES, type BuiltInIndicator, CHART_DATE_FORMATS, CHART_FACTORY_COLORS, CHART_ICON_IDS, CHART_SETTINGS_SECTIONS, CHART_STYLES, COLLAPSED_H, COMPARE_COLORS, type CandleStyleSettings, type CanvasTheme, type Capabilities, type ChartBackgroundType, ChartBody, type ChartChrome, type ChartCompareApi, type ChartControlVisibility, type ChartCustomLocale, ChartDatafeed, type ChartDateFormat, type ChartDictionary, type ChartDrawingsApi, type ChartEvents, type ChartExtension, type ChartExtensionCapture, type ChartExtensionCaptureFrame, type ChartExtensionChart, type ChartExtensionCommand, type ChartExtensionContext, type ChartExtensionHandle, type ChartExtensionIcon, type ChartExtensionIconPath, type ChartExtensionLegendRow, type ChartExtensionMenuBuilder, type ChartExtensionMenuContext, type ChartExtensionMenuItem, type ChartExtensionPane, type ChartExtensionPriceLine, type ChartExtensionReplayState, type ChartExtensionScope, type ChartExtensionSeries, type ChartFactoryColors, type ChartHandle, type ChartHistoryApi, type ChartHoursFormat, type ChartI18n, type ChartI18nOptions, type ChartIconArtwork, type ChartIconContext, type ChartIconDiagnostic, type ChartIconFactory, type ChartIconFailure, type ChartIconId, type ChartIcons, type ChartLastValueMode, type ChartLegendRow, type ChartLineColorType, type ChartLocale, type ChartLocaleCode, type ChartMenuAction, type ChartMenuContext, type ChartMenuIcon, type ChartMenuRow, ChartMessageKey, ChartMeta, type ChartPaneSyncApi, type ChartPreferences, type ChartPriceFormatter, type ChartPricePrecision, type ChartPriceSource, type ChartReplayApi, ChartSaveLoadAdapter, type ChartSaveLoadApi, type ChartScalePlacement, type ChartSessionHours, type ChartSettings, type ChartSettingsContribution, type ChartSettingsControls, type ChartSettingsForm, type ChartSettingsIconPainter, type ChartSettingsOption, type ChartSettingsPageId, type ChartSettingsRowHandle, type ChartSettingsSection, type ChartSettingsTip, type ChartStorage, type ChartStrokeStyle, type ChartStyleId, type ChartTimezone, type ChartTitleSource, type ChartTranslate, type ChartWidget, type ChartWidgetOptions, type CommandRegistry, type CommandResult, type CommandScope, type CommandSpec, type CompareDeps, type CompareEntry, type CompareHandle, type ComparePlacement, type CompareSnapshot, type CompareSymbol, type ContextMenuHandle, type CrosshairUi, type CustomThemes, DEFAULT_SUBSESSION, DEFAULT_TIMEZONE, type DataSourceMarkPainter, DataStatus, DatafeedSearchOptions, type DrawingApplyOutcome, DrawingAssetPort, DrawingContextKind, type DrawingDocumentApi, type DrawingDocumentPort, type DrawingDocumentRefusal, type DrawingEvent, type DrawingInks, type DrawingOwner, DrawingPreferences, type DrawingPresets, type DrawingReadOutcome, type DrawingRejection, type DrawingRejectionReason, DrawingResourceContext, DrawingsBody, type DrawingsEvents, type DrawingsHandle, DrawingsMeta, type DrawingsWorkflow, EXCHANGE_TIMEZONE, type FeatureConfig, FeedBar, type FetchLike, FillBetweenPrimitive, type FullscreenApi, type FullscreenOptions, type HistoryChange, type HistoryEventState, IMAGE_HEADER_H, type ImageApi, type ImageEvent, type ImageHeader, type ImageOptions, type ImageTextRun, type ImageTile, type IndicatorCategory, type IndicatorDefinition, type IndicatorEvent, type IndicatorFill, type IndicatorInstance, type IndicatorLevel, type IndicatorManifest, type IndicatorOverrides, type IndicatorPickerAction, type IndicatorPickerBuiltInState, type IndicatorPickerCollection, type IndicatorPickerItem, type IndicatorPickerSource, type IndicatorPlot, type IndicatorPlots, type IndicatorsApi, type IndicatorsRenderer, LAYOUT_MENU_ROWS, type LayoutApi, LayoutBody, type LayoutEvent, LayoutMeta, type LayoutOptions, type LayoutSaveLoadApi, type LayoutSyncFlags, type LegendUi, type LineStyleSettings, type LogicalRange, MAIN_MIN_H, MIN_BAR_SPACING, MIRRORED_ICONS, type ManifestFill, type ManifestInput, type ManifestLevel, type ManifestPlot, type ManifestRun, MarkIconId, type MarkPainters, type MarketStatus, type MatchSegment, type MountedSymbolSearch, type MountedTimeframePicker, type OpenResource, PRICE_SCALE_MODE, type PaneOp, type PanePlan, type PaneRect, type PaneState, type PartialChartSettings, type PlacedImage, type PlotArea, type PlotPoint, PriceFormat, PriceFormatter, RANGE_PRESETS, RECENT_SYMBOLS_CAP, REPLAY_SPEEDS, type RangeFrameTarget, type RangePreset, type RangeSpan, type ReadChartSettings, type RecentsPort, type ReplayEventState, type ReplaySpeed, type ResourceLoadOutcome, ResourceRef, type ResourceRemoveOutcome, type ResourceSaveOutcome, ResourceStore, SCALE_MODES, SCALE_MODE_OPTIONS, SCROLL_STEP_BARS, SESSION_DOT, SESSION_LABEL, SESSION_STATE_TITLE, SPREAD_OPERATORS, type SaveConflictInfo, type ScaleMode, type SearchClassFilter, SearchClassNode, type SearchController, type SearchControllerOptions, type SearchDisplayOptions, SearchPage, type SearchScope, type SearchState, type SelectedDrawing, type SemanticTheme, type SessionBandsPrimitive, type SessionLook, type SessionModel, type SessionSchedule, type SessionSegment, type SessionSource, type SessionState, type SessionTimeline, type SettingsMenuUi, ShadePrimitive, type SpreadOperator, type SpreadOperatorId, type SubsessionSource, SymbolInfo, type SymbolMarkPainter, type SymbolPriceFormat, SymbolRow, type SymbolSearchCache, type SymbolSearchHandle, type SymbolSearchOptions, THEME_ROLES, TIMEFRAME_MAX, TIMEFRAME_PRESETS, TIMEFRAME_PRESET_TOKENS, TIMEFRAME_UNITS, TIMEFRAME_UNIT_NAME, TIMEFRAME_UNIT_SECONDS, TIMEZONES, TOP_BAR_SLOTS, TemplateBody, TemplateMeta, TextDraft, TextEditFrame, type TextEditSession, type TextInlineEdit, type ThemeChangeListener, type ThemeController, type ThemeControllerOptions, type ThemeDeclaration, type ThemeDiagnostic, type ThemeDiagnosticCode, type ThemeMode, type ThemeOptions, type ThemeRole, type ThemeRoleFamily, type ThemeRoleId, type ThemeRoleKind, type ThemeRootStyle, type TimeLabelFormat, type TimeRange, type Timeframe, type TimeframeGroup, type TimeframePickerHandle, type TimeframePickerOptions, type TimeframeRestrictions, type TimeframeUnit, type TimezoneRow, type ToolbarButton, type ToolbarButtonOptions, type ToolbarButtonState, type TopBarSlot, type TopBarUi, type TouchOptions, type TransitionOptions, type UdfDatafeedOptions, type UdfSymbolResponse, type UiConfig, type VenueMarkPainter, type WidgetEvents, ZOOM_FACTOR, type ZoneClock, allowedTimeframes, applyBar, applyPlotOverrides, arrangementName, arrangementOf, attachCompare, attachDrawings, attachIndicators, autoTimeframeFor, buildManifestPlots, canvasTheme, canvasToBlob, chartContextMenu, chartDateSample, chartDictionaries, chartIconArtwork, chartSettingsDefaults, clipToWindow, coerceChartStyle, coerceScaleMode, compareTimeframes, composeFormingBar, composeImage, createChart, createChartI18n, createSearchController, createSessionBands, createSymbolSearchCache, createThemeController, createUdfDatafeed, effectivePlotColor, exchangeTimezoneText, formatChartDate, formatClock, formatDuration, formatTimeframe, frameRange, hasExtendedHours, imageFileName, imageHeaderRuns, imageLayoutHeaderRuns, imageTileRuns, indicatorHidden, isChartStyle, isCollapsed, isIntradayTimeframe, isSymbolPair, isTimezoneChoice, latestPlotValue, layerChartSettings, looksLikeSpread, makeCrosshairTimeFormatter, makeTickMarkFormatter, manifestInputDefaults, marketStatus, marketStatusFor, marketStatusText, marketStatusTitle, matchSegments, memoryChartStorage, memoryRecents, mountContextMenu, mountSymbolSearch, mountTimeframePicker, nextSessionChange, openInputsEditor, openSymbolSearch, openTimeframePicker, overriddenManifest, parseSessionModel, parseTimeframe, pickCompareColor, placeableByWidget, planPaneOp, promoteRecent, rangeAvailable, rangePresetTip, rangeSpanSeconds, readPartialChartSettings, resolveDisplayTimezone, resolveInitialTf, scrolledPosition, seriesTargetOf, sessionBreakTimes, sessionStateAt, sessionTimeline, spreadExpression, spreadSearchQuery, subTimeframesFor, subsessionBarFilter, tfSeconds, tfToUdfResolution, timeframeAllowed, timeframeGroupUnit, timeframeLabel, timeframeOrder, timeframeSeconds, timezoneCity, timezoneLabel, timezoneListing, toolName, tzOffsetLabel, tzOffsetMinutes, udfPriceFormat, udfResolutionToTf, udfSymbolInfo, valueShaped, withFoldedHistory, zoneClock, zoomedBarSpacing };
|