@tradecanvas/chart 1.10.0 → 1.12.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 (83) hide show
  1. package/README.md +18 -14
  2. package/dist/Chart.d.ts +16 -6
  3. package/dist/Chart.d.ts.map +1 -1
  4. package/dist/LayoutSession-1uhJw0L7.cjs +2 -0
  5. package/dist/LayoutSession-1uhJw0L7.cjs.map +1 -0
  6. package/dist/{LayoutSession-P9Vb-Jpb.js → LayoutSession-2yRujs2S.js} +298 -284
  7. package/dist/LayoutSession-2yRujs2S.js.map +1 -0
  8. package/dist/charts/ChartTypeStrategy.d.ts +2 -0
  9. package/dist/charts/ChartTypeStrategy.d.ts.map +1 -1
  10. package/dist/{i18n-CiQ8EDVs.js → i18n-BU-BoBDZ.js} +6 -2
  11. package/dist/i18n-BU-BoBDZ.js.map +1 -0
  12. package/dist/{i18n-WsLA9SmD.cjs → i18n-DkzAxytR.cjs} +2 -2
  13. package/dist/i18n-DkzAxytR.cjs.map +1 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +22 -22
  18. package/dist/index.js.map +1 -1
  19. package/dist/widget/ChartWidget.d.ts +5 -3
  20. package/dist/widget/ChartWidget.d.ts.map +1 -1
  21. package/dist/widget/i18n.d.ts.map +1 -1
  22. package/dist/widget/index.cjs +2 -2
  23. package/dist/widget/index.cjs.map +1 -1
  24. package/dist/widget/index.js +97 -3
  25. package/dist/widget/index.js.map +1 -1
  26. package/dist/widget/locales/ar.d.ts.map +1 -1
  27. package/dist/widget/locales/cs.d.ts +4 -0
  28. package/dist/widget/locales/cs.d.ts.map +1 -0
  29. package/dist/widget/locales/da.d.ts +4 -0
  30. package/dist/widget/locales/da.d.ts.map +1 -0
  31. package/dist/widget/locales/de.d.ts.map +1 -1
  32. package/dist/widget/locales/el.d.ts +4 -0
  33. package/dist/widget/locales/el.d.ts.map +1 -0
  34. package/dist/widget/locales/en.d.ts +2 -0
  35. package/dist/widget/locales/en.d.ts.map +1 -1
  36. package/dist/widget/locales/es.d.ts.map +1 -1
  37. package/dist/widget/locales/et.d.ts +4 -0
  38. package/dist/widget/locales/et.d.ts.map +1 -0
  39. package/dist/widget/locales/fa.d.ts +4 -0
  40. package/dist/widget/locales/fa.d.ts.map +1 -0
  41. package/dist/widget/locales/fr.d.ts.map +1 -1
  42. package/dist/widget/locales/he.d.ts.map +1 -1
  43. package/dist/widget/locales/hu.d.ts +4 -0
  44. package/dist/widget/locales/hu.d.ts.map +1 -0
  45. package/dist/widget/locales/id.d.ts.map +1 -1
  46. package/dist/widget/locales/index.cjs +1 -1
  47. package/dist/widget/locales/index.cjs.map +1 -1
  48. package/dist/widget/locales/index.d.ts +15 -1
  49. package/dist/widget/locales/index.d.ts.map +1 -1
  50. package/dist/widget/locales/index.js +10127 -5
  51. package/dist/widget/locales/index.js.map +1 -1
  52. package/dist/widget/locales/it.d.ts +4 -0
  53. package/dist/widget/locales/it.d.ts.map +1 -0
  54. package/dist/widget/locales/ja.d.ts.map +1 -1
  55. package/dist/widget/locales/ko.d.ts.map +1 -1
  56. package/dist/widget/locales/ms.d.ts +4 -0
  57. package/dist/widget/locales/ms.d.ts.map +1 -0
  58. package/dist/widget/locales/nb.d.ts +4 -0
  59. package/dist/widget/locales/nb.d.ts.map +1 -0
  60. package/dist/widget/locales/nl.d.ts +4 -0
  61. package/dist/widget/locales/nl.d.ts.map +1 -0
  62. package/dist/widget/locales/pl.d.ts +4 -0
  63. package/dist/widget/locales/pl.d.ts.map +1 -0
  64. package/dist/widget/locales/pt.d.ts.map +1 -1
  65. package/dist/widget/locales/ro.d.ts +4 -0
  66. package/dist/widget/locales/ro.d.ts.map +1 -0
  67. package/dist/widget/locales/ru.d.ts.map +1 -1
  68. package/dist/widget/locales/sk.d.ts +4 -0
  69. package/dist/widget/locales/sk.d.ts.map +1 -0
  70. package/dist/widget/locales/sv.d.ts +4 -0
  71. package/dist/widget/locales/sv.d.ts.map +1 -0
  72. package/dist/widget/locales/th.d.ts.map +1 -1
  73. package/dist/widget/locales/tr.d.ts.map +1 -1
  74. package/dist/widget/locales/vi.d.ts.map +1 -1
  75. package/dist/widget/locales/zh.d.ts.map +1 -1
  76. package/dist/widget/locales/zhHant.d.ts.map +1 -1
  77. package/dist/widget/widgetConfig.d.ts.map +1 -1
  78. package/package.json +3 -3
  79. package/dist/LayoutSession-BFqQwhvV.cjs +0 -2
  80. package/dist/LayoutSession-BFqQwhvV.cjs.map +0 -1
  81. package/dist/LayoutSession-P9Vb-Jpb.js.map +0 -1
  82. package/dist/i18n-CiQ8EDVs.js.map +0 -1
  83. package/dist/i18n-WsLA9SmD.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { C as e, a as t, c as n, i as r, n as i, o as a, r as o, t as s } from "../LayoutSession-P9Vb-Jpb.js";
2
- import { a as c, c as l, i as u, n as d, o as ee, r as f, s as p, t as m } from "../i18n-CiQ8EDVs.js";
1
+ import { C as e, a as t, c as n, i as r, n as i, o as a, r as o, t as s } from "../LayoutSession-2yRujs2S.js";
2
+ import { a as c, c as l, i as u, n as d, o as ee, r as f, s as p, t as m } from "../i18n-BU-BoBDZ.js";
3
3
  import { DARK_THEME as h, LIGHT_THEME as te, PRICE_SOURCES as ne, formatPrice as re, indicatorSource as ie, isTimeFrame as ae, isValidTimeZone as g, marketStatus as oe, offsetAt as se, parseIndicatorSource as ce, readChartTypeOptions as le, readNews as ue, readQuote as de, sanitizeDrawingOptions as fe, sanitizeDrawingStyle as pe, tickBarCount as _, timeParts as me, timeframeBucketStart as he, timeframeToMs as v, tzLabel as ge, volumeColor as _e, wallToUtc as ve, zoneOffsetMinutes as ye } from "@tradecanvas/commons";
4
4
  import { ChartStateManager as be, MAX_ALERT_BARS as xe, MIN_ALERT_BARS as Se, RANGE_PRESETS as Ce, indicatorValuePrecision as we, plotColor as Te, servesTimeframe as Ee, sourceParam as De, withResampling as y } from "@tradecanvas/core";
5
5
  //#region src/io/resampleOHLCV.ts
@@ -1088,6 +1088,86 @@ var b = [
1088
1088
  id: "netvolume",
1089
1089
  name: "Net Volume",
1090
1090
  type: "panel"
1091
+ },
1092
+ {
1093
+ id: "avgprice",
1094
+ name: "Average Price",
1095
+ type: "overlay"
1096
+ },
1097
+ {
1098
+ id: "medprice",
1099
+ name: "Median Price",
1100
+ type: "overlay"
1101
+ },
1102
+ {
1103
+ id: "typprice",
1104
+ name: "Typical Price",
1105
+ type: "overlay"
1106
+ },
1107
+ {
1108
+ id: "machannel",
1109
+ name: "Moving Average Channel",
1110
+ type: "overlay"
1111
+ },
1112
+ {
1113
+ id: "hamming",
1114
+ name: "Moving Average Hamming",
1115
+ type: "overlay"
1116
+ },
1117
+ {
1118
+ id: "madouble",
1119
+ name: "Moving Average Double",
1120
+ type: "overlay"
1121
+ },
1122
+ {
1123
+ id: "matriple",
1124
+ name: "Moving Average Triple",
1125
+ type: "overlay"
1126
+ },
1127
+ {
1128
+ id: "volindex",
1129
+ name: "Volatility Index",
1130
+ type: "overlay"
1131
+ },
1132
+ {
1133
+ id: "asi",
1134
+ name: "Accumulative Swing Index",
1135
+ type: "panel"
1136
+ },
1137
+ {
1138
+ id: "advdecline",
1139
+ name: "Advance/Decline",
1140
+ type: "panel"
1141
+ },
1142
+ {
1143
+ id: "majority",
1144
+ name: "Majority Rule",
1145
+ type: "panel"
1146
+ },
1147
+ {
1148
+ id: "chopzone",
1149
+ name: "Chop Zone",
1150
+ type: "panel"
1151
+ },
1152
+ {
1153
+ id: "smiergodic",
1154
+ name: "SMI Ergodic",
1155
+ type: "panel"
1156
+ },
1157
+ {
1158
+ id: "po",
1159
+ name: "Price Oscillator",
1160
+ type: "panel"
1161
+ },
1162
+ {
1163
+ id: "volohlc",
1164
+ name: "Volatility O-H-L-C",
1165
+ type: "panel"
1166
+ },
1167
+ {
1168
+ id: "volzt",
1169
+ name: "Volatility Zero Trend",
1170
+ type: "panel"
1091
1171
  }
1092
1172
  ], Ie = [
1093
1173
  "sma",
@@ -8880,6 +8960,20 @@ var Ni = [
8880
8960
  main: t,
8881
8961
  other: e
8882
8962
  })
8963
+ },
8964
+ {
8965
+ id: "correlation",
8966
+ label: f(this.t("compare.correlation"), {
8967
+ main: t,
8968
+ other: e
8969
+ })
8970
+ },
8971
+ {
8972
+ id: "correlationLog",
8973
+ label: f(this.t("compare.correlationLog"), {
8974
+ main: t,
8975
+ other: e
8976
+ })
8883
8977
  }
8884
8978
  ], r = this.chart.getPlotRect();
8885
8979
  this.chartMenu?.open(n, r.x + 24, r.y + 24, (t) => void this.addCompareSymbol(e, t));
@@ -8890,7 +8984,7 @@ var Ni = [
8890
8984
  return;
8891
8985
  }
8892
8986
  if (t !== "percent") {
8893
- let n = t === "scale" ? this.chart.addIndicator("compareSymbol", { symbol: e }, "bottom", { scale: "left" }) : t === "pane" ? this.chart.addIndicator("compareSymbol", { symbol: e }) : this.chart.addIndicator("spread", {
8987
+ let n = t === "scale" ? this.chart.addIndicator("compareSymbol", { symbol: e }, "bottom", { scale: "left" }) : t === "pane" ? this.chart.addIndicator("compareSymbol", { symbol: e }) : t === "correlation" ? this.chart.addIndicator("correlation", { symbol: e }) : t === "correlationLog" ? this.chart.addIndicator("correlationlog", { symbol: e }) : this.chart.addIndicator("spread", {
8894
8988
  symbol: e,
8895
8989
  mode: t
8896
8990
  });