@tradecanvas/chart 1.54.4 → 1.55.0
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/dist/Chart.d.ts +3 -0
- package/dist/Chart.d.ts.map +1 -1
- package/dist/LayoutSession-35QS4WN1.cjs +2 -0
- package/dist/LayoutSession-35QS4WN1.cjs.map +1 -0
- package/dist/{LayoutSession-C-bPYqKt.js → LayoutSession-CMY8AjJV.js} +10 -2
- package/dist/LayoutSession-CMY8AjJV.js.map +1 -0
- package/dist/{i18n-DGsh8zmc.js → i18n-BaJ3lo-i.js} +3 -1
- package/dist/i18n-BaJ3lo-i.js.map +1 -0
- package/dist/i18n-SIiP0kRx.cjs +2 -0
- package/dist/i18n-SIiP0kRx.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetSettings.d.ts.map +1 -1
- package/dist/widget/chartMenu.d.ts +2 -1
- package/dist/widget/chartMenu.d.ts.map +1 -1
- package/dist/widget/index.cjs +5 -5
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +19 -5
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +1 -0
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +29 -1
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/types.d.ts +2 -0
- package/dist/widget/types.d.ts.map +1 -1
- package/dist/widget/widgetConfig.d.ts.map +1 -1
- package/dist/widget/widgetFeatures.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/LayoutSession-C-bPYqKt.js.map +0 -1
- package/dist/LayoutSession-ZO0qacW9.cjs +0 -2
- package/dist/LayoutSession-ZO0qacW9.cjs.map +0 -1
- package/dist/i18n-DGsh8zmc.js.map +0 -1
- package/dist/i18n-GirmlAsM.cjs +0 -2
- package/dist/i18n-GirmlAsM.cjs.map +0 -1
package/dist/widget/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as e, a as t, c as n, d as r, f as i, i as a, n as o, o as s, r as c, t as l } from "../LayoutSession-
|
|
2
|
-
import { a as u, c as d, i as f, n as p, o as m, r as h, s as ee, t as g } from "../i18n-
|
|
1
|
+
import { O as e, a as t, c as n, d as r, f as i, i as a, n as o, o as s, r as c, t as l } from "../LayoutSession-CMY8AjJV.js";
|
|
2
|
+
import { a as u, c as d, i as f, n as p, o as m, r as h, s as ee, t as g } from "../i18n-BaJ3lo-i.js";
|
|
3
3
|
import { CHART_STYLE_KEYS as _, CHART_TYPE_ICONS as v, DARK_THEME as y, DEFAULT_SIGNAL_STYLE as b, DEFAULT_TRADE_ZONE_STYLE as x, DEFAULT_TRADING_CONFIG as S, DRAWING_TOOL_ICONS as te, LIGHT_THEME as ne, PHI as re, PRICE_SOURCES as ie, SANS_FONT_FAMILY as ae, UI_ICONS as oe, barTimeUnit as se, formatPrice as ce, iconSvg as le, indicatorSource as ue, isTimeFrame as de, isValidTimeZone as fe, marketStatus as pe, offsetAt as me, parseIndicatorSource as he, phiStep as ge, readChartStyleOverrides as _e, readChartTypeOptions as ve, readIndicatorPlotStyles as ye, readNews as be, readQuote as xe, resampleBars as Se, sanitizeDrawingOptions as Ce, sanitizeDrawingStyle as we, stepDecimals as Te, symbolTimeZone as Ee, tickBarCount as De, timeParts as Oe, timeframeFollowsDays as ke, timeframeToMs as C, tzLabel as Ae, wallToUtc as je, zoneOffsetMinutes as Me, zonedDateFormatter as Ne } from "@tradecanvas/commons";
|
|
4
4
|
import { ChartStateManager as Pe, INDICATOR_CATEGORIES as Fe, INTERVAL_LIMITS as Ie, INTERVAL_UNITS as Le, MAX_ALERT_BARS as Re, MIN_ALERT_BARS as ze, RANGE_PRESETS as Be, ResamplingAdapter as Ve, SYMBOL_INDICATOR_IDS as He, indicatorCategory as Ue, indicatorValuePrecision as We, isSeriesPalette as Ge, plotColor as Ke, plotShown as qe, rangePresetStart as Je, servesTimeframe as Ye, sourceParam as Xe, withResampling as Ze } from "@tradecanvas/core";
|
|
5
5
|
//#region src/io/resampleOHLCV.ts
|
|
@@ -1067,6 +1067,7 @@ var kt = [
|
|
|
1067
1067
|
legendVisible: !0,
|
|
1068
1068
|
barCountdown: !0,
|
|
1069
1069
|
indicatorValueLabels: !1,
|
|
1070
|
+
alignAxisLabels: !0,
|
|
1070
1071
|
logScale: !1,
|
|
1071
1072
|
scaleMode: "regular",
|
|
1072
1073
|
autoScale: !0,
|
|
@@ -1260,6 +1261,7 @@ var O = [...new Set([
|
|
|
1260
1261
|
indexedScale: ["menu.chart.scale"],
|
|
1261
1262
|
labels: ["menu.chart.scale"],
|
|
1262
1263
|
indicatorValueLabels: ["menu.chart.scale"],
|
|
1264
|
+
alignAxisLabels: ["menu.chart.scale"],
|
|
1263
1265
|
barCountdown: ["menu.chart.scale"],
|
|
1264
1266
|
lines: ["menu.chart.scale"],
|
|
1265
1267
|
highLowLines: ["menu.chart.scale"],
|
|
@@ -3222,6 +3224,7 @@ var V = [
|
|
|
3222
3224
|
z(this.t("settings.invertScale"), e.invertScale, (e) => this.patch({ invertScale: e })),
|
|
3223
3225
|
z(this.t("settings.leftScale"), e.leftPriceScale, (e) => this.patch({ leftPriceScale: e })),
|
|
3224
3226
|
z(this.t("settings.indicatorValues"), e.indicatorValueLabels, (e) => this.patch({ indicatorValueLabels: e })),
|
|
3227
|
+
z(this.t("settings.alignAxisLabels"), e.alignAxisLabels, (e) => this.patch({ alignAxisLabels: e })),
|
|
3225
3228
|
...this.available.barCountdown === !1 ? [] : [z(this.t("settings.barCountdown"), e.barCountdown, (e) => this.patch({ barCountdown: e }))],
|
|
3226
3229
|
B(this.t("settings.timezone"), e.timezone, r, (e) => this.patch({ timezone: e })),
|
|
3227
3230
|
B(this.t("settings.numberLocale"), e.numberLocale, Nn(e.numberLocale), (e) => this.patch({ numberLocale: e }))
|
|
@@ -8562,6 +8565,10 @@ function zc(e, t) {
|
|
|
8562
8565
|
id: "indicatorValueLabels",
|
|
8563
8566
|
label: t("settings.indicatorValues"),
|
|
8564
8567
|
checked: e.labels.values
|
|
8568
|
+
}, {
|
|
8569
|
+
id: "alignAxisLabels",
|
|
8570
|
+
label: t("settings.alignAxisLabels"),
|
|
8571
|
+
checked: e.labels.aligned
|
|
8565
8572
|
}];
|
|
8566
8573
|
e.labels.countdown !== void 0 && i.push({
|
|
8567
8574
|
id: "barCountdown",
|
|
@@ -11274,7 +11281,8 @@ var Ad = 4, jd = 1, Md = 7, Nd = 17, Pd = 3, Fd = 150, Id = 5e3, Ld = 8, Rd = 6e
|
|
|
11274
11281
|
"legendVisible",
|
|
11275
11282
|
"volumeVisible",
|
|
11276
11283
|
"barCountdown",
|
|
11277
|
-
"indicatorValueLabels"
|
|
11284
|
+
"indicatorValueLabels",
|
|
11285
|
+
"alignAxisLabels"
|
|
11278
11286
|
], Gd = O.filter((e) => _[e] !== "color"), Kd = () => typeof document < "u" && document.hidden, qd = 200, Jd = class {
|
|
11279
11287
|
chart;
|
|
11280
11288
|
state;
|
|
@@ -11486,7 +11494,8 @@ var Ad = 4, jd = 1, Md = 7, Nd = 17, Pd = 3, Fd = 150, Id = 5e3, Ld = 8, Rd = 6e
|
|
|
11486
11494
|
legendVisible: l.legend !== !1,
|
|
11487
11495
|
volumeVisible: l.volume !== !1,
|
|
11488
11496
|
barCountdown: l.barCountdown !== !1,
|
|
11489
|
-
indicatorValueLabels: l.indicatorValueLabels === !0
|
|
11497
|
+
indicatorValueLabels: l.indicatorValueLabels === !0,
|
|
11498
|
+
alignAxisLabels: l.alignAxisLabels !== !1
|
|
11490
11499
|
}, this.settingsState = { ...this.settingsDefaults }, this.timeframes = Yn(Un(t.timeframes, l.timeframes), this.customTimeframes.list(), l.timeframes), !this.timeframes.some((e) => this.timeframeFavorites.has(e))) {
|
|
11491
11500
|
let e = Wn(this.timeframes, l.defaultTimeframeFavorites, !!t.timeframes?.length);
|
|
11492
11501
|
for (let t of e) this.timeframeFavorites.add(t);
|
|
@@ -12688,6 +12697,7 @@ var Ad = 4, jd = 1, Md = 7, Nd = 17, Pd = 3, Fd = 150, Id = 5e3, Ld = 8, Rd = 6e
|
|
|
12688
12697
|
leftScale: r.leftPriceScale,
|
|
12689
12698
|
labels: {
|
|
12690
12699
|
values: r.indicatorValueLabels,
|
|
12700
|
+
aligned: r.alignAxisLabels,
|
|
12691
12701
|
...i.barCountdown === !1 ? {} : { countdown: r.barCountdown }
|
|
12692
12702
|
},
|
|
12693
12703
|
lines: {
|
|
@@ -12975,6 +12985,9 @@ var Ad = 4, jd = 1, Md = 7, Nd = 17, Pd = 3, Fd = 150, Id = 5e3, Ld = 8, Rd = 6e
|
|
|
12975
12985
|
case "indicatorValueLabels":
|
|
12976
12986
|
this.changeSettings({ indicatorValueLabels: !i.indicatorValueLabels });
|
|
12977
12987
|
break;
|
|
12988
|
+
case "alignAxisLabels":
|
|
12989
|
+
this.changeSettings({ alignAxisLabels: !i.alignAxisLabels });
|
|
12990
|
+
break;
|
|
12978
12991
|
case "barCountdown":
|
|
12979
12992
|
this.changeSettings({ barCountdown: !i.barCountdown });
|
|
12980
12993
|
break;
|
|
@@ -14269,6 +14282,7 @@ var Ad = 4, jd = 1, Md = 7, Nd = 17, Pd = 3, Fd = 150, Id = 5e3, Ld = 8, Rd = 6e
|
|
|
14269
14282
|
legendVisible: e.isLegendVisible?.(),
|
|
14270
14283
|
barCountdown: e.isBarCountdownVisible?.(),
|
|
14271
14284
|
indicatorValueLabels: e.isIndicatorValueLabelsVisible?.(),
|
|
14285
|
+
alignAxisLabels: e.isAxisLabelsAligned?.(),
|
|
14272
14286
|
leftPriceScale: e.isLeftPriceScaleVisible?.(),
|
|
14273
14287
|
volumeProfileVisible: e.isVolumeProfileVisible?.(),
|
|
14274
14288
|
marketProfileVisible: e.isMarketProfileVisible?.(),
|
|
@@ -14754,7 +14768,7 @@ var Ad = 4, jd = 1, Md = 7, Nd = 17, Pd = 3, Fd = 150, Id = 5e3, Ld = 8, Rd = 6e
|
|
|
14754
14768
|
}, Object.keys(e).some((e) => !Hd.has(e)) && this.layoutSession?.changed(), this.scheduleLegend(), e.gridVisible !== void 0 && this.chart.setGridVisible(e.gridVisible), e.volumeVisible !== void 0 && this.chart.setVolumeVisible(e.volumeVisible), e.volumeProfileVisible !== void 0 && this.chart.setVolumeProfileVisible(e.volumeProfileVisible), e.marketProfileVisible !== void 0 && this.chart.setMarketProfileVisible(e.marketProfileVisible), e.marketProfileSplit !== void 0 && this.chart.setMarketProfileConfig({ splitBySession: e.marketProfileSplit }), e.marketProfileLetters !== void 0 && this.chart.setMarketProfileConfig({ letters: e.marketProfileLetters }), e.marketProfileBuckets !== void 0 && this.chart.setMarketProfileConfig({ buckets: e.marketProfileBuckets }), e.marketProfileOpacity !== void 0 && this.chart.setMarketProfileConfig({ opacity: e.marketProfileOpacity }), e.depthHeatmapVisible !== void 0 && this.chart.setDepthHeatmapVisible(e.depthHeatmapVisible), e.depthHeatmapOpacity !== void 0 && this.chart.setDepthHeatmapConfig({ opacity: e.depthHeatmapOpacity }), e.sessionShadingVisible !== void 0 && this.chart.setSessionShadingVisible(e.sessionShadingVisible), e.pivotMarkersVisible !== void 0 && this.chart.setPivotMarkersVisible(e.pivotMarkersVisible), e.pivotStrength !== void 0 && this.chart.setPivotMarkersConfig({
|
|
14755
14769
|
left: e.pivotStrength,
|
|
14756
14770
|
right: e.pivotStrength
|
|
14757
|
-
}), e.pivotStructureLabels !== void 0 && this.chart.setPivotMarkersConfig({ structureLabels: e.pivotStructureLabels }), e.periodLevelsVisible !== void 0 && this.chart.setPeriodLevelsVisible(e.periodLevelsVisible), e.periodLevelsPeriod !== void 0 && this.chart.setPeriodLevelsPeriod(e.periodLevelsPeriod), e.legendVisible !== void 0 && this.chart.setLegend({ visible: e.legendVisible }), e.barCountdown !== void 0 && this.chart.setBarCountdownVisible(e.barCountdown), e.indicatorValueLabels !== void 0 && this.chart.setIndicatorValueLabelsVisible(e.indicatorValueLabels), e.crosshairMode !== void 0 && this.chart.setCrosshairMode(e.crosshairMode), e.autoScale !== void 0 && this.chart.setAutoScale(e.autoScale), e.invertScale !== void 0 && this.chart.setInvertScale(e.invertScale), e.leftPriceScale !== void 0 && (this.chart.setLeftPriceScaleVisible(e.leftPriceScale), this.placeDrawingButton()), (e.scaleMode !== void 0 || e.autoScale !== void 0) && queueMicrotask(() => this.refreshScaleSwitches()), e.timezone !== void 0 && queueMicrotask(() => this.statusBar?.tick()), e.scaleMode === void 0 ? e.logScale !== void 0 && (this.settingsState = {
|
|
14771
|
+
}), e.pivotStructureLabels !== void 0 && this.chart.setPivotMarkersConfig({ structureLabels: e.pivotStructureLabels }), e.periodLevelsVisible !== void 0 && this.chart.setPeriodLevelsVisible(e.periodLevelsVisible), e.periodLevelsPeriod !== void 0 && this.chart.setPeriodLevelsPeriod(e.periodLevelsPeriod), e.legendVisible !== void 0 && this.chart.setLegend({ visible: e.legendVisible }), e.barCountdown !== void 0 && this.chart.setBarCountdownVisible(e.barCountdown), e.indicatorValueLabels !== void 0 && this.chart.setIndicatorValueLabelsVisible(e.indicatorValueLabels), e.alignAxisLabels !== void 0 && this.chart.setAxisLabelsAligned(e.alignAxisLabels), e.crosshairMode !== void 0 && this.chart.setCrosshairMode(e.crosshairMode), e.autoScale !== void 0 && this.chart.setAutoScale(e.autoScale), e.invertScale !== void 0 && this.chart.setInvertScale(e.invertScale), e.leftPriceScale !== void 0 && (this.chart.setLeftPriceScaleVisible(e.leftPriceScale), this.placeDrawingButton()), (e.scaleMode !== void 0 || e.autoScale !== void 0) && queueMicrotask(() => this.refreshScaleSwitches()), e.timezone !== void 0 && queueMicrotask(() => this.statusBar?.tick()), e.scaleMode === void 0 ? e.logScale !== void 0 && (this.settingsState = {
|
|
14758
14772
|
...this.settingsState,
|
|
14759
14773
|
scaleMode: e.logScale ? "logarithmic" : "regular"
|
|
14760
14774
|
}, this.showScaleMode()) : (this.settingsState = {
|