@tradecanvas/chart 1.54.3 → 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.
Files changed (66) hide show
  1. package/dist/Chart.d.ts +3 -0
  2. package/dist/Chart.d.ts.map +1 -1
  3. package/dist/LayoutSession-35QS4WN1.cjs +2 -0
  4. package/dist/LayoutSession-35QS4WN1.cjs.map +1 -0
  5. package/dist/{LayoutSession-BnFHy400.js → LayoutSession-CMY8AjJV.js} +10 -2
  6. package/dist/LayoutSession-CMY8AjJV.js.map +1 -0
  7. package/dist/{i18n-DGsh8zmc.js → i18n-BaJ3lo-i.js} +3 -1
  8. package/dist/i18n-BaJ3lo-i.js.map +1 -0
  9. package/dist/i18n-SIiP0kRx.cjs +2 -0
  10. package/dist/i18n-SIiP0kRx.cjs.map +1 -0
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/widget/ChartWidget.d.ts.map +1 -1
  14. package/dist/widget/WidgetSettings.d.ts.map +1 -1
  15. package/dist/widget/chartMenu.d.ts +2 -1
  16. package/dist/widget/chartMenu.d.ts.map +1 -1
  17. package/dist/widget/index.cjs +5 -5
  18. package/dist/widget/index.cjs.map +1 -1
  19. package/dist/widget/index.js +19 -5
  20. package/dist/widget/index.js.map +1 -1
  21. package/dist/widget/locales/ar.d.ts.map +1 -1
  22. package/dist/widget/locales/cs.d.ts.map +1 -1
  23. package/dist/widget/locales/da.d.ts.map +1 -1
  24. package/dist/widget/locales/de.d.ts.map +1 -1
  25. package/dist/widget/locales/el.d.ts.map +1 -1
  26. package/dist/widget/locales/en.d.ts +1 -0
  27. package/dist/widget/locales/en.d.ts.map +1 -1
  28. package/dist/widget/locales/es.d.ts.map +1 -1
  29. package/dist/widget/locales/et.d.ts.map +1 -1
  30. package/dist/widget/locales/fa.d.ts.map +1 -1
  31. package/dist/widget/locales/fr.d.ts.map +1 -1
  32. package/dist/widget/locales/he.d.ts.map +1 -1
  33. package/dist/widget/locales/hu.d.ts.map +1 -1
  34. package/dist/widget/locales/id.d.ts.map +1 -1
  35. package/dist/widget/locales/index.cjs +1 -1
  36. package/dist/widget/locales/index.cjs.map +1 -1
  37. package/dist/widget/locales/index.js +29 -1
  38. package/dist/widget/locales/index.js.map +1 -1
  39. package/dist/widget/locales/it.d.ts.map +1 -1
  40. package/dist/widget/locales/ja.d.ts.map +1 -1
  41. package/dist/widget/locales/ko.d.ts.map +1 -1
  42. package/dist/widget/locales/ms.d.ts.map +1 -1
  43. package/dist/widget/locales/nb.d.ts.map +1 -1
  44. package/dist/widget/locales/nl.d.ts.map +1 -1
  45. package/dist/widget/locales/pl.d.ts.map +1 -1
  46. package/dist/widget/locales/pt.d.ts.map +1 -1
  47. package/dist/widget/locales/ro.d.ts.map +1 -1
  48. package/dist/widget/locales/ru.d.ts.map +1 -1
  49. package/dist/widget/locales/sk.d.ts.map +1 -1
  50. package/dist/widget/locales/sv.d.ts.map +1 -1
  51. package/dist/widget/locales/th.d.ts.map +1 -1
  52. package/dist/widget/locales/tr.d.ts.map +1 -1
  53. package/dist/widget/locales/vi.d.ts.map +1 -1
  54. package/dist/widget/locales/zh.d.ts.map +1 -1
  55. package/dist/widget/locales/zhHant.d.ts.map +1 -1
  56. package/dist/widget/types.d.ts +2 -0
  57. package/dist/widget/types.d.ts.map +1 -1
  58. package/dist/widget/widgetConfig.d.ts.map +1 -1
  59. package/dist/widget/widgetFeatures.d.ts.map +1 -1
  60. package/package.json +3 -3
  61. package/dist/LayoutSession-B_VIcwOL.cjs +0 -2
  62. package/dist/LayoutSession-B_VIcwOL.cjs.map +0 -1
  63. package/dist/LayoutSession-BnFHy400.js.map +0 -1
  64. package/dist/i18n-DGsh8zmc.js.map +0 -1
  65. package/dist/i18n-GirmlAsM.cjs +0 -2
  66. package/dist/i18n-GirmlAsM.cjs.map +0 -1
@@ -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-BnFHy400.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-DGsh8zmc.js";
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 = {