apexcharts 8.0.1 → 8.2.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 (267) hide show
  1. package/README.md +14 -8
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +2310 -2274
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.esm.js +1367 -1110
  6. package/dist/apexcharts.full.js +3880 -3531
  7. package/dist/apexcharts.full.min.js +2 -2
  8. package/dist/apexcharts.js +3676 -3409
  9. package/dist/apexcharts.min.js +2 -2
  10. package/dist/apexcharts.ssr.common.js +2 -2
  11. package/dist/apexcharts.ssr.esm.js +4114 -3591
  12. package/dist/area.common.js +2 -2
  13. package/dist/area.esm.js +25 -67
  14. package/dist/bar.common.js +2 -2
  15. package/dist/bar.esm.js +159 -163
  16. package/dist/bar.js +2 -2
  17. package/dist/boxPlot.common.js +2 -2
  18. package/dist/boxPlot.esm.js +125 -106
  19. package/dist/bubble.common.js +2 -2
  20. package/dist/bubble.esm.js +25 -67
  21. package/dist/candlestick.common.js +2 -2
  22. package/dist/candlestick.esm.js +125 -106
  23. package/dist/candlestick.js +2 -2
  24. package/dist/column.common.js +2 -2
  25. package/dist/column.esm.js +159 -163
  26. package/dist/core.common.js +2 -2
  27. package/dist/core.esm.js +2310 -2274
  28. package/dist/donut.common.js +2 -2
  29. package/dist/donut.esm.js +100 -78
  30. package/dist/dumbbell.common.js +2 -2
  31. package/dist/dumbbell.esm.js +192 -167
  32. package/dist/features/all.common.js +2 -2
  33. package/dist/features/all.esm.js +945 -640
  34. package/dist/features/annotations.common.js +2 -2
  35. package/dist/features/annotations.esm.js +46 -21
  36. package/dist/features/annotations.js +2 -2
  37. package/dist/features/context-menu.common.js +1 -1
  38. package/dist/features/context-menu.esm.js +1 -1
  39. package/dist/features/context-menu.js +1 -1
  40. package/dist/features/drilldown.common.js +2 -2
  41. package/dist/features/drilldown.esm.js +22 -2
  42. package/dist/features/drilldown.js +2 -2
  43. package/dist/features/dumbbell.common.js +2 -2
  44. package/dist/features/dumbbell.esm.js +34 -5
  45. package/dist/features/dumbbell.js +2 -2
  46. package/dist/features/exports.common.js +2 -2
  47. package/dist/features/exports.esm.js +203 -204
  48. package/dist/features/exports.js +2 -2
  49. package/dist/features/facet.common.js +1 -1
  50. package/dist/features/facet.esm.js +1 -1
  51. package/dist/features/facet.js +1 -1
  52. package/dist/features/highlight-filter.common.js +2 -2
  53. package/dist/features/highlight-filter.esm.js +97 -41
  54. package/dist/features/highlight-filter.js +2 -2
  55. package/dist/features/history.common.js +2 -2
  56. package/dist/features/history.esm.js +4 -3
  57. package/dist/features/history.js +2 -2
  58. package/dist/features/ink.common.js +1 -1
  59. package/dist/features/ink.esm.js +1 -1
  60. package/dist/features/ink.js +1 -1
  61. package/dist/features/keyboard.common.js +2 -2
  62. package/dist/features/keyboard.esm.js +20 -23
  63. package/dist/features/keyboard.js +2 -2
  64. package/dist/features/legend.common.js +2 -2
  65. package/dist/features/legend.esm.js +61 -41
  66. package/dist/features/legend.js +2 -2
  67. package/dist/features/link.common.js +2 -2
  68. package/dist/features/link.esm.js +8 -8
  69. package/dist/features/link.js +2 -2
  70. package/dist/features/marks.common.js +2 -2
  71. package/dist/features/marks.esm.js +1 -1
  72. package/dist/features/marks.js +1 -1
  73. package/dist/features/measure.common.js +1 -1
  74. package/dist/features/measure.esm.js +1 -1
  75. package/dist/features/measure.js +1 -1
  76. package/dist/features/morph.common.js +2 -2
  77. package/dist/features/morph.esm.js +260 -279
  78. package/dist/features/morph.js +2 -2
  79. package/dist/features/perspectives.common.js +2 -2
  80. package/dist/features/perspectives.esm.js +28 -19
  81. package/dist/features/perspectives.js +2 -2
  82. package/dist/features/raincloud.common.js +2 -2
  83. package/dist/features/raincloud.esm.js +54 -36
  84. package/dist/features/raincloud.js +2 -2
  85. package/dist/features/renderer-canvas.common.js +1 -1
  86. package/dist/features/renderer-canvas.esm.js +1 -1
  87. package/dist/features/renderer-canvas.js +1 -1
  88. package/dist/features/stats.common.js +2 -2
  89. package/dist/features/stats.esm.js +66 -18
  90. package/dist/features/stats.js +2 -2
  91. package/dist/features/storyboard.common.js +2 -2
  92. package/dist/features/storyboard.esm.js +24 -15
  93. package/dist/features/storyboard.js +2 -2
  94. package/dist/features/streamgraph.common.js +2 -2
  95. package/dist/features/streamgraph.esm.js +34 -5
  96. package/dist/features/streamgraph.js +2 -2
  97. package/dist/features/toolbar.common.js +2 -2
  98. package/dist/features/toolbar.esm.js +211 -217
  99. package/dist/features/toolbar.js +2 -2
  100. package/dist/features/trellis.common.js +2 -2
  101. package/dist/features/trellis.esm.js +31 -19
  102. package/dist/features/trellis.js +2 -2
  103. package/dist/features/waterfall.common.js +2 -2
  104. package/dist/features/waterfall.esm.js +34 -5
  105. package/dist/features/waterfall.js +2 -2
  106. package/dist/features/weave.common.js +2 -2
  107. package/dist/features/weave.esm.js +290 -48
  108. package/dist/features/weave.js +2 -2
  109. package/dist/full.common.js +2 -2
  110. package/dist/full.esm.js +289 -150
  111. package/dist/heatmap.common.js +2 -2
  112. package/dist/heatmap.esm.js +48 -17
  113. package/dist/heatmap.js +2 -2
  114. package/dist/histogram.common.js +2 -2
  115. package/dist/histogram.esm.js +224 -180
  116. package/dist/icicle.common.js +2 -2
  117. package/dist/icicle.esm.js +1 -1
  118. package/dist/icicle.js +1 -1
  119. package/dist/line.common.js +2 -2
  120. package/dist/line.esm.js +25 -67
  121. package/dist/line.js +2 -2
  122. package/dist/pictograms.common.js +1 -1
  123. package/dist/pictograms.esm.js +1 -1
  124. package/dist/pictograms.js +1 -1
  125. package/dist/pie.common.js +2 -2
  126. package/dist/pie.esm.js +100 -78
  127. package/dist/pie.js +2 -2
  128. package/dist/polarArea.common.js +2 -2
  129. package/dist/polarArea.esm.js +100 -78
  130. package/dist/radar.common.js +2 -2
  131. package/dist/radar.esm.js +8 -5
  132. package/dist/radar.js +2 -2
  133. package/dist/radialBar.common.js +2 -2
  134. package/dist/radialBar.esm.js +166 -133
  135. package/dist/radialBar.js +2 -2
  136. package/dist/raincloud.common.js +2 -2
  137. package/dist/raincloud.esm.js +55 -42
  138. package/dist/rangeArea.common.js +2 -2
  139. package/dist/rangeArea.esm.js +25 -67
  140. package/dist/rangeBar.common.js +2 -2
  141. package/dist/rangeBar.esm.js +159 -163
  142. package/dist/scatter.common.js +2 -2
  143. package/dist/scatter.esm.js +25 -67
  144. package/dist/streamgraph.common.js +2 -2
  145. package/dist/streamgraph.esm.js +58 -71
  146. package/dist/sunburst.common.js +2 -2
  147. package/dist/sunburst.esm.js +1 -1
  148. package/dist/sunburst.js +1 -1
  149. package/dist/treemap.common.js +2 -2
  150. package/dist/treemap.esm.js +28 -90
  151. package/dist/treemap.js +2 -2
  152. package/dist/unit-shapes.common.js +2 -2
  153. package/dist/unit-shapes.esm.js +1 -1
  154. package/dist/unit-shapes.js +1 -1
  155. package/dist/unit.common.js +2 -2
  156. package/dist/unit.esm.js +30 -6
  157. package/dist/unit.js +2 -2
  158. package/dist/violin.common.js +2 -2
  159. package/dist/violin.esm.js +2 -7
  160. package/dist/violin.js +2 -2
  161. package/dist/waterfall.common.js +2 -2
  162. package/dist/waterfall.esm.js +192 -167
  163. package/package.json +3 -1
  164. package/src/apexcharts.js +260 -201
  165. package/src/charts/Bar.js +16 -5
  166. package/src/charts/BarStacked.js +42 -88
  167. package/src/charts/BoxCandleStick.js +1 -7
  168. package/src/charts/HeatMap.js +73 -16
  169. package/src/charts/Line.js +21 -71
  170. package/src/charts/Pie.js +142 -89
  171. package/src/charts/Radar.js +4 -1
  172. package/src/charts/Radial.js +91 -63
  173. package/src/charts/RangeBar.js +1 -7
  174. package/src/charts/Treemap.js +25 -78
  175. package/src/charts/Unit.js +28 -10
  176. package/src/charts/Violin.js +1 -7
  177. package/src/charts/common/Hierarchy.js +0 -22
  178. package/src/charts/common/OuterLabels.js +12 -5
  179. package/src/charts/common/Stats.js +55 -28
  180. package/src/charts/common/bar/DataLabels.js +94 -83
  181. package/src/charts/common/bar/Helpers.js +34 -57
  182. package/src/charts/common/circle/Helpers.js +5 -2
  183. package/src/charts/common/treemap/Helpers.js +1 -1
  184. package/src/entries/full.js +0 -17
  185. package/src/features/link.js +9 -10
  186. package/src/features/perspectives.js +20 -19
  187. package/src/features/raincloud.js +51 -53
  188. package/src/features/stats.js +23 -35
  189. package/src/libs/Treemap-squared.js +7 -47
  190. package/src/modules/Animations.js +55 -73
  191. package/src/modules/Base.js +3 -2
  192. package/src/modules/ChartFactory.js +6 -1
  193. package/src/modules/Core.js +57 -30
  194. package/src/modules/CoreUtils.js +32 -33
  195. package/src/modules/Crosshairs.js +29 -11
  196. package/src/modules/Data.js +279 -153
  197. package/src/modules/DataLabels.js +18 -2
  198. package/src/modules/Events.js +1 -4
  199. package/src/modules/Exports.js +284 -305
  200. package/src/modules/Fill.js +23 -10
  201. package/src/modules/Formatters.js +14 -3
  202. package/src/modules/Graphics.js +8 -14
  203. package/src/modules/MorphPieces.js +4 -2
  204. package/src/modules/MorphTypeChange.js +332 -316
  205. package/src/modules/Range.js +56 -99
  206. package/src/modules/Responsive.js +186 -61
  207. package/src/modules/Scales.js +4 -47
  208. package/src/modules/Series.js +14 -45
  209. package/src/modules/Theme.js +108 -57
  210. package/src/modules/Toolbar.js +7 -13
  211. package/src/modules/accessibility/KeyboardNavigation.js +29 -28
  212. package/src/modules/animations/AxisTransition.js +54 -16
  213. package/src/modules/animations/CircleTransition.js +1 -4
  214. package/src/modules/animations/DataLabelTransition.js +15 -10
  215. package/src/modules/animations/StreamScroll.js +6 -4
  216. package/src/modules/annotations/Annotations.js +18 -17
  217. package/src/modules/annotations/Helpers.js +41 -17
  218. package/src/modules/axes/XAxis.js +4 -4
  219. package/src/modules/axes/YAxis.js +1 -6
  220. package/src/modules/dimensions/Dimensions.js +12 -7
  221. package/src/modules/dimensions/Grid.js +15 -3
  222. package/src/modules/dimensions/YAxis.js +7 -6
  223. package/src/modules/drilldown/Drilldown.js +22 -1
  224. package/src/modules/dumbbell/DumbbellData.js +3 -5
  225. package/src/modules/helpers/Destroy.js +10 -1
  226. package/src/modules/helpers/InitCtxVariables.js +19 -16
  227. package/src/modules/helpers/RawStash.js +51 -0
  228. package/src/modules/helpers/UpdateHelpers.js +95 -30
  229. package/src/modules/highlightFilter/HighlightFilter.js +107 -52
  230. package/src/modules/highlightFilter/PiePart.js +1 -1
  231. package/src/modules/highlightFilter/RadialPart.js +1 -1
  232. package/src/modules/history/History.js +7 -2
  233. package/src/modules/legend/Legend.js +100 -62
  234. package/src/modules/license/LicenseEnforcer.js +6 -1
  235. package/src/modules/settings/Config.js +60 -153
  236. package/src/modules/settings/Defaults.js +352 -58
  237. package/src/modules/settings/Globals.js +23 -5
  238. package/src/modules/settings/Options.js +19 -5
  239. package/src/modules/settings/TypeAliases.js +3 -6
  240. package/src/modules/streamgraph/StreamData.js +3 -5
  241. package/src/modules/tooltip/AxesTooltip.js +33 -41
  242. package/src/modules/tooltip/Intersect.js +50 -43
  243. package/src/modules/tooltip/Labels.js +62 -23
  244. package/src/modules/tooltip/Marker.js +6 -7
  245. package/src/modules/tooltip/Position.js +31 -35
  246. package/src/modules/tooltip/Tooltip.js +107 -119
  247. package/src/modules/tooltip/Utils.js +94 -159
  248. package/src/modules/trellis/TrellisExports.js +21 -9
  249. package/src/modules/trellis/TrellisTooltip.js +18 -8
  250. package/src/modules/waterfall/WaterfallData.js +3 -5
  251. package/src/modules/weave/Claims.js +14 -3
  252. package/src/modules/weave/Highlights.js +209 -0
  253. package/src/modules/weave/PluginAPI.js +64 -3
  254. package/src/modules/weave/WeaveHost.js +215 -51
  255. package/src/ssr/BrowserAPIs.js +5 -3
  256. package/src/ssr/DOMShim.js +6 -30
  257. package/src/ssr/Hydration.js +5 -36
  258. package/src/ssr/RenderShim.js +333 -0
  259. package/src/ssr/SSRRenderer.js +81 -36
  260. package/src/svg/SVGAnimation.js +10 -7
  261. package/src/types/internal.d.ts +37 -7
  262. package/src/utils/Constants.js +7 -8
  263. package/src/utils/DateTime.js +21 -195
  264. package/src/utils/MissingFeature.js +7 -9
  265. package/src/utils/Resize.js +4 -0
  266. package/src/utils/Utils.js +102 -171
  267. package/types/apexcharts.d.ts +57 -7
@@ -17,8 +17,20 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
20
32
  /*!
21
- * ApexCharts v8.0.1
33
+ * ApexCharts v8.2.0
22
34
  * (c) 2018-2026 ApexCharts
23
35
  */
24
36
  import * as _core from "apexcharts/core";
@@ -127,6 +139,25 @@ class Waterfall {
127
139
  }
128
140
  }
129
141
  const Utils = _core.__apex_Utils;
142
+ function collapsedIndices(gl) {
143
+ return (gl.collapsedSeriesIndices || []).concat(
144
+ gl.ancillaryCollapsedSeriesIndices || []
145
+ );
146
+ }
147
+ function stashSeries(ser, gl) {
148
+ const records = (gl.collapsedSeries || []).concat(
149
+ gl.ancillaryCollapsedSeries || []
150
+ );
151
+ return ser.map((s, i) => {
152
+ const _a = s || {}, { hidden: _hidden } = _a, rest = __objRest(_a, ["hidden"]);
153
+ let data = rest.data;
154
+ if (Array.isArray(data) && !data.length) {
155
+ const rec = records.find((r) => r.index === i);
156
+ if (rec && Array.isArray(rec.data)) data = rec.data;
157
+ }
158
+ return __spreadProps(__spreadValues({}, rest), { data: Array.isArray(data) ? data.slice() : data });
159
+ });
160
+ }
130
161
  function readDatum(d, j, categories) {
131
162
  const fallbackX = categories && categories[j] !== void 0 ? categories[j] : j + 1;
132
163
  if (d == null) {
@@ -223,14 +254,12 @@ function waterfallTransform(ser, w) {
223
254
  const gl = w.globals;
224
255
  if (!Array.isArray(ser)) return ser;
225
256
  if (!gl.waterfallRawSeries) {
226
- gl.waterfallRawSeries = ser.map((s) => __spreadProps(__spreadValues({}, s), {
227
- data: Array.isArray(s == null ? void 0 : s.data) ? s.data.slice() : s == null ? void 0 : s.data
228
- }));
257
+ gl.waterfallRawSeries = stashSeries(ser, gl);
229
258
  }
230
259
  const raw = gl.waterfallRawSeries;
231
260
  const colors = ((_b = (_a = cnf.plotOptions) == null ? void 0 : _a.waterfall) == null ? void 0 : _b.colors) || {};
232
261
  const categories = (_c = cnf.xaxis) == null ? void 0 : _c.categories;
233
- const collapsed = gl.collapsedSeriesIndices || [];
262
+ const collapsed = collapsedIndices(gl);
234
263
  const values = [];
235
264
  const cumulative = [];
236
265
  const kinds = [];
@@ -564,18 +593,32 @@ class BarDataLabels {
564
593
  realIndex,
565
594
  j
566
595
  );
596
+ const val = (hl == null ? void 0 : hl.hide) ? void 0 : waterfallStep !== null ? waterfallStep : (
597
+ // only RangeBar passes a range, vertical or horizontal
598
+ y2 !== void 0 ? [y1, y2] : w.config.chart.stackType === "100%" ? (
599
+ // Read the percentages globally rather than out of `series`.
600
+ // Under `stackType: '100%'` BarStacked replaces `series` with
601
+ // the percentage rows, and in a combo chart it narrows them to
602
+ // just the series it draws as bars, so `series` is indexed by
603
+ // bar position while `realIndex` counts every series. A line
604
+ // ahead of a column pushed `realIndex` past the end and the
605
+ // label read a value off `undefined` (#2429).
606
+ w.globals.seriesPercent[realIndex][j]
607
+ ) : w.seriesData.series[realIndex][j]
608
+ );
609
+ let text;
567
610
  let textRects = {
568
611
  width: 0,
569
612
  height: 0
570
613
  };
571
- if (w.config.dataLabels.enabled) {
572
- const yLabel = waterfallStep !== null ? waterfallStep : w.seriesData.series[realIndex][j];
614
+ if (dataLabelsConfig.enabled) {
615
+ text = val === void 0 ? "" : dataLabelsConfig.formatter(val, __spreadProps(__spreadValues({}, w), {
616
+ seriesIndex: realIndex,
617
+ dataPointIndex: j,
618
+ w
619
+ }));
573
620
  textRects = graphics.getTextRects(
574
- w.config.dataLabels.formatter ? w.config.dataLabels.formatter(yLabel, __spreadProps(__spreadValues({}, w), {
575
- seriesIndex: realIndex,
576
- dataPointIndex: j,
577
- w
578
- })) : w.formatters.yLabelFormatters[0](yLabel),
621
+ text,
579
622
  parseFloat(dataLabelsConfig.style.fontSize).toString(),
580
623
  dataLabelsConfig.style.fontFamily,
581
624
  void 0,
@@ -620,19 +663,8 @@ class BarDataLabels {
620
663
  x: dataLabelsPos.dataLabelsX,
621
664
  y: dataLabelsPos.dataLabelsY,
622
665
  neg: params.neg,
623
- // A datum the highlight filter leaves without a part keeps no label. It
624
- // is still drawn, blank, as a null value is: the overlap pass indexes
625
- // its rects by data point, so a skipped one would misalign the rest.
626
- val: (hl == null ? void 0 : hl.hide) ? void 0 : waterfallStep !== null ? waterfallStep : this.barCtx.isRangeBar ? [y1, y2] : w.config.chart.stackType === "100%" ? (
627
- // Read the percentages globally rather than out of `series`.
628
- // Under `stackType: '100%'` BarStacked replaces `series` with
629
- // the percentage rows, and in a combo chart it narrows them to
630
- // just the series it draws as bars, so `series` is indexed by
631
- // bar position while `realIndex` counts every series. A line
632
- // ahead of a column pushed `realIndex` past the end and the
633
- // label read a value off `undefined` (#2429).
634
- w.globals.seriesPercent[realIndex][j]
635
- ) : w.seriesData.series[realIndex][j],
666
+ val,
667
+ text,
636
668
  i: realIndex,
637
669
  j,
638
670
  barWidth: params.barWidth,
@@ -670,16 +702,16 @@ class BarDataLabels {
670
702
  return this.w.labelData.seriesGroups.length > 1;
671
703
  }
672
704
  /**
673
- * The series group `realIndex` belongs to, and that group's own stacking
674
- * state, or null when totals are chart-wide (the single-group case).
705
+ * The series group `realIndex` belongs to, or null when totals are
706
+ * chart-wide (the single-group case).
675
707
  * @param {number} realIndex
676
- * @returns {{groupIndex: number, group: string[]} | null}
708
+ * @returns {{groupIndex: number} | null}
677
709
  */
678
710
  getTotalGroupContext(realIndex) {
679
711
  if (!this.hasMultipleSeriesGroups()) return null;
680
712
  const groupIndex = this.barCtx.barHelpers.getSeriesGroupIndex(realIndex);
681
713
  if (groupIndex < 0) return null;
682
- return { groupIndex, group: this.w.labelData.seriesGroups[groupIndex] };
714
+ return { groupIndex };
683
715
  }
684
716
  /**
685
717
  * Whether `realIndex` is the series that should draw the stacked total.
@@ -706,10 +738,23 @@ class BarDataLabels {
706
738
  getStackedTotalValue({ realIndex, j }) {
707
739
  if (this.hlt) return this.hlt.val;
708
740
  const w = this.w;
741
+ const top = this.xStackTop(realIndex, j);
742
+ if (top) return top[3];
709
743
  const ctx = this.getTotalGroupContext(realIndex);
710
744
  const byGroups = w.seriesData.stackedSeriesTotalsByGroups;
711
745
  return ctx && byGroups && byGroups[ctx.groupIndex] ? byGroups[ctx.groupIndex][j] : this.barCtx.stackedSeriesTotals[j];
712
746
  }
747
+ /**
748
+ * The running stack at this column's x (BarStacked `tops`, columns only) on
749
+ * a numeric axis, where columns stack by x rather than by index.
750
+ * @param {number} realIndex @param {number} j
751
+ */
752
+ xStackTop(realIndex, j) {
753
+ var _a, _b;
754
+ const w = this.w;
755
+ return w.axisFlags.isXNumeric && /** @type {any} */
756
+ ((_b = (_a = this.barCtx.stacks) == null ? void 0 : _a[w.labelData.seriesGroupIndex[realIndex]]) == null ? void 0 : _b.tops.get(w.seriesData.seriesX[realIndex][j]));
757
+ }
713
758
  /** @param {{realIndex: any, j: any}} opts */
714
759
  getStackedTotalDataLabel({ realIndex, j }) {
715
760
  const w = this.w;
@@ -829,18 +874,23 @@ class BarDataLabels {
829
874
  }
830
875
  let lowestPrevY = newY;
831
876
  const totalGroupCtx = this.getTotalGroupContext(realIndex);
832
- const prevYGroups = totalGroupCtx ? [totalGroupCtx.group] : w.labelData.seriesGroups;
833
- prevYGroups.forEach((sg) => {
834
- var _a2;
835
- (_a2 = this.barCtx[sg.join(",")]) == null ? void 0 : _a2.prevY.forEach(
836
- (arr) => {
837
- if (valIsNegative) {
838
- lowestPrevY = Math.max(arr[j], lowestPrevY);
839
- } else {
840
- lowestPrevY = Math.min(arr[j], lowestPrevY);
841
- }
877
+ const top = this.xStackTop(realIndex, j);
878
+ const stacks = top ? [] : (
879
+ /** @type {any} */
880
+ this.barCtx.stacks || []
881
+ );
882
+ if (top) {
883
+ lowestPrevY = valIsNegative ? Math.max(newY, top[5]) : Math.min(newY, top[4]);
884
+ }
885
+ stacks.forEach((g, gi) => {
886
+ if (totalGroupCtx && gi !== totalGroupCtx.groupIndex) return;
887
+ g.prevY.forEach((arr) => {
888
+ if (valIsNegative) {
889
+ lowestPrevY = Math.max(arr[j], lowestPrevY);
890
+ } else {
891
+ lowestPrevY = Math.min(arr[j], lowestPrevY);
842
892
  }
843
- );
893
+ });
844
894
  });
845
895
  if (this.hlt) lowestPrevY = this.hlt.edge;
846
896
  if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {
@@ -952,18 +1002,19 @@ class BarDataLabels {
952
1002
  }
953
1003
  let lowestPrevX = newX;
954
1004
  const totalGroupCtx = this.getTotalGroupContext(realIndex);
955
- const prevXGroups = totalGroupCtx ? [totalGroupCtx.group] : w.labelData.seriesGroups;
956
- prevXGroups.forEach((sg) => {
957
- var _a2;
958
- (_a2 = this.barCtx[sg.join(",")]) == null ? void 0 : _a2.prevX.forEach(
959
- (arr) => {
960
- if (valIsNegative) {
961
- lowestPrevX = Math.min(arr[j], lowestPrevX);
962
- } else {
963
- lowestPrevX = Math.max(arr[j], lowestPrevX);
964
- }
1005
+ const stacks = (
1006
+ /** @type {any} */
1007
+ this.barCtx.stacks || []
1008
+ );
1009
+ stacks.forEach((g, gi) => {
1010
+ if (totalGroupCtx && gi !== totalGroupCtx.groupIndex) return;
1011
+ g.prevX.forEach((arr) => {
1012
+ if (valIsNegative) {
1013
+ lowestPrevX = Math.min(arr[j], lowestPrevX);
1014
+ } else {
1015
+ lowestPrevX = Math.max(arr[j], lowestPrevX);
965
1016
  }
966
- );
1017
+ });
967
1018
  });
968
1019
  if (this.hlt) lowestPrevX = this.hlt.edge;
969
1020
  if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {
@@ -1014,11 +1065,12 @@ class BarDataLabels {
1014
1065
  totalDataLabelsAnchor
1015
1066
  };
1016
1067
  }
1017
- /** @param {{x: any, y: any, val: any, neg?: boolean, i: any, j: any, textRects: any, barHeight: any, barWidth: any, dataLabelsConfig: any}} opts */
1068
+ /** @param {{x: any, y: any, val: any, text?: any, neg?: boolean, i: any, j: any, textRects: any, barHeight: any, barWidth: any, dataLabelsConfig: any}} opts */
1018
1069
  drawCalculatedDataLabels({
1019
1070
  x,
1020
1071
  y,
1021
1072
  val,
1073
+ text,
1022
1074
  neg,
1023
1075
  i,
1024
1076
  // = realIndex
@@ -1041,7 +1093,10 @@ class BarDataLabels {
1041
1093
  const isSeriesCollapsing = (w.globals.collapsingSeriesIndices || []).indexOf(i) > -1;
1042
1094
  if (isSeriesCollapsing) {
1043
1095
  const prev = (_a = w.globals.prevDataLabels) == null ? void 0 : _a.get(`${i}::${datumKey(w, i, j)}`);
1044
- if (prev && isFinite(prev.val)) val = prev.val;
1096
+ if (prev && isFinite(prev.val)) {
1097
+ val = prev.val;
1098
+ text = void 0;
1099
+ }
1045
1100
  }
1046
1101
  if (dataLabelsConfig.enabled && (!isSeriesCollapsed || isSeriesCollapsing)) {
1047
1102
  elDataLabelsWrap = graphics.group({
@@ -1059,8 +1114,9 @@ class BarDataLabels {
1059
1114
  elDataLabelsWrap.node.setAttribute("data:dlVal", String(val));
1060
1115
  }
1061
1116
  }
1062
- let text = "";
1063
- if (typeof val !== "undefined") {
1117
+ if (val === void 0) {
1118
+ text = "";
1119
+ } else if (text === void 0) {
1064
1120
  text = formatter(val, __spreadProps(__spreadValues({}, w), {
1065
1121
  seriesIndex: i,
1066
1122
  dataPointIndex: j,
@@ -1279,9 +1335,9 @@ class Helpers {
1279
1335
  }
1280
1336
  /**
1281
1337
  * Smallest positive gap between neighbouring x values once every series is
1282
- * merged onto one axis. A k-way merge over the series arrays, which are
1283
- * already sorted in every ordinary case; an unsorted one can only make the
1284
- * answer smaller, i.e. the bars narrower, never overlapping.
1338
+ * merged onto one axis. A k-way merge over the series arrays, which needs
1339
+ * each one ascending: a non-ascending array (newest-first data) is merged
1340
+ * from a sorted copy, or every gap would read as one huge slot.
1285
1341
  *
1286
1342
  * Collapsed series count too, exactly as they did for `minXDiff`. Skipping
1287
1343
  * them would widen every bar the moment someone hid the tightest-spaced
@@ -1295,7 +1351,11 @@ class Helpers {
1295
1351
  const arrays = [];
1296
1352
  for (let i = 0; i < seriesX.length; i++) {
1297
1353
  const xs = seriesX[i];
1298
- if (Array.isArray(xs) && xs.length > 0) arrays.push(xs);
1354
+ if (Array.isArray(xs) && xs.length > 0) {
1355
+ arrays.push(
1356
+ xs.some((v, n) => v < xs[n - 1]) ? xs.filter((v) => v === +v).sort((a, b) => a - b) : xs
1357
+ );
1358
+ }
1299
1359
  }
1300
1360
  if (!arrays.length) return 0;
1301
1361
  const cursor = new Array(arrays.length).fill(0);
@@ -1407,30 +1467,27 @@ class Helpers {
1407
1467
  * @param {Record<string, any>} ctx
1408
1468
  */
1409
1469
  initializeStackedPrevVars(ctx) {
1410
- const w = ctx.w;
1411
- w.labelData.seriesGroups.forEach((group) => {
1412
- if (!ctx[group]) ctx[group] = {};
1413
- ctx[group].prevY = [];
1414
- ctx[group].prevX = [];
1415
- ctx[group].prevYF = [];
1416
- ctx[group].prevXF = [];
1417
- ctx[group].prevYVal = [];
1418
- ctx[group].prevXVal = [];
1419
- });
1470
+ ctx.stacks = ctx.w.labelData.seriesGroups.map(() => ({
1471
+ prevY: [],
1472
+ prevX: [],
1473
+ prevYF: [],
1474
+ prevXF: [],
1475
+ prevYVal: [],
1476
+ prevXVal: [],
1477
+ tops: /* @__PURE__ */ new Map()
1478
+ }));
1420
1479
  }
1421
1480
  /**
1422
1481
  * @param {Record<string, any>} ctx
1423
1482
  */
1424
1483
  initializeStackedXYVars(ctx) {
1425
- const w = ctx.w;
1426
- w.labelData.seriesGroups.forEach((group) => {
1427
- if (!ctx[group]) ctx[group] = {};
1428
- ctx[group].xArrj = [];
1429
- ctx[group].xArrjF = [];
1430
- ctx[group].xArrjVal = [];
1431
- ctx[group].yArrj = [];
1432
- ctx[group].yArrjF = [];
1433
- ctx[group].yArrjVal = [];
1484
+ ctx.stacks.forEach((g) => {
1485
+ g.xArrj = [];
1486
+ g.xArrjF = [];
1487
+ g.xArrjVal = [];
1488
+ g.yArrj = [];
1489
+ g.yArrjF = [];
1490
+ g.yArrjVal = [];
1434
1491
  });
1435
1492
  }
1436
1493
  /**
@@ -1756,7 +1813,7 @@ class Helpers {
1756
1813
  direction
1757
1814
  };
1758
1815
  }
1759
- /** @param {{ barWidth?: any, barXPosition?: any, y1?: any, y2?: any, yRatio?: any, strokeWidth?: any, isReversed?: any, series?: any, seriesGroup?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */
1816
+ /** @param {{ barWidth?: any, barXPosition?: any, y1?: any, y2?: any, yRatio?: any, strokeWidth?: any, isReversed?: any, series?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */
1760
1817
  getColumnPaths({
1761
1818
  barWidth,
1762
1819
  barXPosition,
@@ -1764,7 +1821,6 @@ class Helpers {
1764
1821
  y2,
1765
1822
  strokeWidth,
1766
1823
  series,
1767
- seriesGroup,
1768
1824
  realIndex,
1769
1825
  i,
1770
1826
  j,
@@ -1798,8 +1854,7 @@ class Helpers {
1798
1854
  pathFrom = r.base;
1799
1855
  }
1800
1856
  if (w.config.chart.stacked) {
1801
- let _ctx = this.barCtx;
1802
- _ctx = this.barCtx[seriesGroup];
1857
+ const _ctx = this.barCtx.groupCtx;
1803
1858
  _ctx.yArrj.push(y2 - strokeCenter * direction);
1804
1859
  _ctx.yArrjF.push(Math.abs(y1 - y2 + r.strokeWidth * direction));
1805
1860
  _ctx.yArrjVal.push(this.barCtx.series[i][j]);
@@ -1979,7 +2034,7 @@ class Helpers {
1979
2034
  barXPosition: center
1980
2035
  };
1981
2036
  }
1982
- /** @param {{ barYPosition?: any, barHeight?: any, x1?: any, x2?: any, strokeWidth?: any, isReversed?: any, series?: any, seriesGroup?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */
2037
+ /** @param {{ barYPosition?: any, barHeight?: any, x1?: any, x2?: any, strokeWidth?: any, isReversed?: any, series?: any, realIndex?: any, i?: any, j?: any, w?: any }} opts */
1983
2038
  getBarpaths({
1984
2039
  barYPosition,
1985
2040
  barHeight,
@@ -1987,7 +2042,6 @@ class Helpers {
1987
2042
  x2,
1988
2043
  strokeWidth,
1989
2044
  series,
1990
- seriesGroup,
1991
2045
  realIndex,
1992
2046
  i,
1993
2047
  j,
@@ -2026,8 +2080,7 @@ class Helpers {
2026
2080
  pathFrom = graphics.move(fromX, y1) + graphics.line(fromX, y1) + slFrom + slFrom + slFrom + slFrom + slFrom + graphics.line(fromX, y1) + closing;
2027
2081
  }
2028
2082
  if (w.config.chart.stacked) {
2029
- let _ctx = this.barCtx;
2030
- _ctx = this.barCtx[seriesGroup];
2083
+ const _ctx = this.barCtx.groupCtx;
2031
2084
  _ctx.xArrj.push(x2 + strokeCenter * direction);
2032
2085
  _ctx.xArrjF.push(Math.abs(x1 - x2 - r.strokeWidth * direction));
2033
2086
  _ctx.xArrjVal.push(this.barCtx.series[i][j]);
@@ -2353,24 +2406,14 @@ class Helpers {
2353
2406
  * @returns {number}
2354
2407
  */
2355
2408
  getSeriesGroupIndex(seriesIndex) {
2356
- const w = this.w;
2357
- return w.labelData.seriesGroups.findIndex(
2358
- (group) => group.indexOf(w.seriesData.seriesNames[seriesIndex]) > -1
2359
- );
2409
+ var _a;
2410
+ return (_a = this.w.labelData.seriesGroupIndex[seriesIndex]) != null ? _a : -1;
2360
2411
  }
2361
2412
  /**
2362
2413
  * @param {number} seriesIndex
2363
2414
  */
2364
2415
  getGroupIndex(seriesIndex) {
2365
- const w = this.w;
2366
- const groupIndex = w.labelData.seriesGroups.findIndex(
2367
- (group) => (
2368
- // w.config.series[i].name may be undefined, so use
2369
- // w.seriesData.seriesNames[i], which has default names for those
2370
- // series. w.labelData.seriesGroups[] uses the same default naming.
2371
- group.indexOf(w.seriesData.seriesNames[seriesIndex]) > -1
2372
- )
2373
- );
2416
+ const groupIndex = this.getSeriesGroupIndex(seriesIndex);
2374
2417
  const cGI = this.barCtx.columnGroupIndices;
2375
2418
  let columnGroupIndex = cGI.indexOf(groupIndex);
2376
2419
  if (columnGroupIndex < 0) {
@@ -2497,6 +2540,20 @@ class Bar {
2497
2540
  );
2498
2541
  this.barHelpers = new Helpers(this);
2499
2542
  }
2543
+ /**
2544
+ * Point the per-series axis state at this series' y axis. Every bar-family
2545
+ * renderer calls it before initialPositions, which reads the baseline by
2546
+ * this.translationsIndex.
2547
+ * @param {number} realIndex
2548
+ * @return {number} translationsIndex
2549
+ */
2550
+ setSeriesAxis(realIndex) {
2551
+ if (this.yRatio.length > 1) {
2552
+ this.yaxisIndex = this.w.globals.seriesYAxisReverseMap[realIndex];
2553
+ this.translationsIndex = realIndex;
2554
+ }
2555
+ return this.translationsIndex;
2556
+ }
2500
2557
  /** primary draw method which is called on bar object
2501
2558
  * @memberof Bar
2502
2559
  * @param {any[]} series - user supplied series values
@@ -2542,11 +2599,7 @@ class Bar {
2542
2599
  if (series[i].length > 0) {
2543
2600
  this.visibleI = this.visibleI + 1;
2544
2601
  }
2545
- if (this.yRatio.length > 1) {
2546
- this.yaxisIndex = w.globals.seriesYAxisReverseMap[realIndex];
2547
- this.translationsIndex = realIndex;
2548
- }
2549
- const translationsIndex = this.translationsIndex;
2602
+ const translationsIndex = this.setSeriesAxis(realIndex);
2550
2603
  this.isReversed = w.config.yaxis[this.yaxisIndex] && w.config.yaxis[this.yaxisIndex].reversed;
2551
2604
  if (this.isPyramid) {
2552
2605
  this.pyramidLayout = this.barHelpers.computePyramidLayout(series[i]);
@@ -3564,7 +3617,6 @@ class BarStacked extends Bar {
3564
3617
  draw(series, seriesIndex) {
3565
3618
  const w = this.w;
3566
3619
  this.graphics = new Graphics(this.w);
3567
- this.bar = new Bar(this.w, this.ctx, this.xyRatios);
3568
3620
  const coreUtils = new CoreUtils(this.w);
3569
3621
  series = coreUtils.getLogSeries(series);
3570
3622
  this.yRatio = coreUtils.getLogYRatios(this.yRatio);
@@ -3595,18 +3647,10 @@ class BarStacked extends Bar {
3595
3647
  ) : i;
3596
3648
  const { groupIndex, columnGroupIndex } = this.barHelpers.getGroupIndex(realIndex);
3597
3649
  this.groupCtx = /** @type {any} */
3598
- this[
3599
- /** @type {any} */
3600
- w.labelData.seriesGroups[groupIndex]
3601
- ];
3650
+ this.stacks[groupIndex];
3602
3651
  const xArrValues = [];
3603
3652
  const yArrValues = [];
3604
- let translationsIndex = 0;
3605
- if (this.yRatio.length > 1) {
3606
- this.yaxisIndex = /** @type {any} */
3607
- w.globals.seriesYAxisReverseMap[realIndex][0];
3608
- translationsIndex = realIndex;
3609
- }
3653
+ const translationsIndex = this.setSeriesAxis(realIndex);
3610
3654
  this.isReversed = w.config.yaxis[this.yaxisIndex] && w.config.yaxis[this.yaxisIndex].reversed;
3611
3655
  let elSeries = this.graphics.group({
3612
3656
  class: `apexcharts-series`,
@@ -3670,8 +3714,7 @@ class BarStacked extends Bar {
3670
3714
  x,
3671
3715
  y,
3672
3716
  elSeries,
3673
- columnGroupIndex,
3674
- seriesGroup: w.labelData.seriesGroups[groupIndex]
3717
+ columnGroupIndex
3675
3718
  };
3676
3719
  let paths = (
3677
3720
  /** @type {any} */
@@ -3862,7 +3905,7 @@ class BarStacked extends Bar {
3862
3905
  zeroW
3863
3906
  };
3864
3907
  }
3865
- /** @param {{indexes: any, barHeight: any, strokeWidth: any, zeroW: any, x: any, y: any, columnGroupIndex: any, seriesGroup: any, yDivision: any, elSeries: any}} opts */
3908
+ /** @param {{indexes: any, barHeight: any, strokeWidth: any, zeroW: any, x: any, y: any, columnGroupIndex: any, yDivision: any, elSeries: any}} opts */
3866
3909
  drawStackedBarPaths({
3867
3910
  indexes,
3868
3911
  barHeight,
@@ -3871,7 +3914,6 @@ class BarStacked extends Bar {
3871
3914
  x,
3872
3915
  y,
3873
3916
  columnGroupIndex,
3874
- seriesGroup,
3875
3917
  yDivision,
3876
3918
  elSeries
3877
3919
  }) {
@@ -3922,7 +3964,6 @@ class BarStacked extends Bar {
3922
3964
  isReversed: this.isReversed,
3923
3965
  series: this.series,
3924
3966
  realIndex: indexes.realIndex,
3925
- seriesGroup,
3926
3967
  i,
3927
3968
  j,
3928
3969
  w
@@ -3953,7 +3994,7 @@ class BarStacked extends Bar {
3953
3994
  y
3954
3995
  };
3955
3996
  }
3956
- /** @param {{indexes: any, x: any, y: any, xDivision: any, barWidth: any, zeroH: any, columnGroupIndex: any, seriesGroup: any, elSeries: any}} opts */
3997
+ /** @param {{indexes: any, x: any, y: any, xDivision: any, barWidth: any, zeroH: any, columnGroupIndex: any, elSeries: any}} opts */
3957
3998
  drawStackedColumnPaths({
3958
3999
  indexes,
3959
4000
  x,
@@ -3962,10 +4003,9 @@ class BarStacked extends Bar {
3962
4003
  barWidth,
3963
4004
  zeroH,
3964
4005
  columnGroupIndex,
3965
- seriesGroup,
3966
4006
  elSeries
3967
4007
  }) {
3968
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
4008
+ var _a, _b, _c, _d, _e, _f;
3969
4009
  const w = this.w;
3970
4010
  const i = indexes.i;
3971
4011
  const j = indexes.j;
@@ -3979,43 +4019,23 @@ class BarStacked extends Bar {
3979
4019
  }
3980
4020
  const barXPosition = x + columnGroupIndex * barWidth;
3981
4021
  let barYPosition;
3982
- let prevBarH = 0;
3983
- for (let k = 0; k < this.groupCtx.prevYF.length; k++) {
3984
- prevBarH = prevBarH + (!isNaN(this.groupCtx.prevYF[k][j]) ? this.groupCtx.prevYF[k][j] : 0);
3985
- }
3986
- const gsi = this.groupCtx.prevY.length;
3987
- if (gsi > 0 && !w.axisFlags.isXNumeric || gsi > 0 && w.axisFlags.isXNumeric && w.seriesData.seriesX[realIndex - 1][j] === w.seriesData.seriesX[realIndex][j]) {
4022
+ const g = this.groupCtx;
4023
+ const key = w.axisFlags.isXNumeric ? w.seriesData.seriesX[realIndex][j] : j;
4024
+ const top = g.tops.get(key);
4025
+ if (top) {
4026
+ const [prevYValue, prevVal, prevBarH] = top;
3988
4027
  let bYP;
3989
- let prevYValue;
3990
- const p = Math.min(this.yRatio.length + 1, realIndex + 1);
3991
- if (this.groupCtx.prevY[gsi - 1] !== void 0 && this.groupCtx.prevY[gsi - 1].length) {
3992
- for (let ii = 1; ii < p; ii++) {
3993
- if (!isNaN((_a = this.groupCtx.prevY[gsi - ii]) == null ? void 0 : _a[j])) {
3994
- prevYValue = this.groupCtx.prevY[gsi - ii][j];
3995
- break;
3996
- }
3997
- }
3998
- }
3999
- for (let ii = 1; ii < p; ii++) {
4000
- if (((_b = this.groupCtx.prevYVal[gsi - ii]) == null ? void 0 : _b[j]) < 0) {
4001
- bYP = /** @type {any} */
4002
- ((_c = this.series[i]) == null ? void 0 : _c[j]) >= 0 ? prevYValue - prevBarH + (this.isReversed ? prevBarH : 0) * 2 : prevYValue;
4003
- break;
4004
- } else if (((_d = this.groupCtx.prevYVal[gsi - ii]) == null ? void 0 : _d[j]) >= 0) {
4005
- bYP = /** @type {any} */
4006
- ((_e = this.series[i]) == null ? void 0 : _e[j]) >= 0 ? prevYValue : prevYValue + prevBarH - (this.isReversed ? prevBarH : 0) * 2;
4007
- break;
4008
- }
4028
+ if (prevVal < 0) {
4029
+ bYP = /** @type {any} */
4030
+ ((_a = this.series[i]) == null ? void 0 : _a[j]) >= 0 ? prevYValue - prevBarH + (this.isReversed ? prevBarH : 0) * 2 : prevYValue;
4031
+ } else if (prevVal >= 0) {
4032
+ bYP = /** @type {any} */
4033
+ ((_b = this.series[i]) == null ? void 0 : _b[j]) >= 0 ? prevYValue : prevYValue + prevBarH - (this.isReversed ? prevBarH : 0) * 2;
4009
4034
  }
4010
4035
  if (typeof bYP === "undefined") bYP = w.layout.gridHeight;
4011
- if (
4012
- /**
4013
- * @param {number} val
4014
- */
4015
- ((_f = this.groupCtx.prevYF[0]) == null ? void 0 : _f.every((val) => val === 0)) && this.groupCtx.prevYF.slice(1, gsi).every(
4016
- (arr) => arr.every((val) => isNaN(val))
4017
- )
4018
- ) {
4036
+ if (((_c = g.prevYF[0]) == null ? void 0 : _c.every((val) => val === 0)) && g.prevYF.slice(1).every(
4037
+ (arr) => arr.every((val) => isNaN(val))
4038
+ )) {
4019
4039
  barYPosition = zeroH;
4020
4040
  } else {
4021
4041
  barYPosition = bYP;
@@ -4025,12 +4045,12 @@ class BarStacked extends Bar {
4025
4045
  }
4026
4046
  if (
4027
4047
  /** @type {any} */
4028
- (_g = this.series[i]) == null ? void 0 : _g[j]
4048
+ (_d = this.series[i]) == null ? void 0 : _d[j]
4029
4049
  ) {
4030
4050
  y = barYPosition - /** @type {any} */
4031
- ((_h = this.series[i]) == null ? void 0 : _h[j]) / this.yRatio[translationsIndex] + (this.isReversed ? (
4051
+ ((_e = this.series[i]) == null ? void 0 : _e[j]) / this.yRatio[translationsIndex] + (this.isReversed ? (
4032
4052
  /** @type {any} */
4033
- ((_i = this.series[i]) == null ? void 0 : _i[j]) / this.yRatio[translationsIndex]
4053
+ ((_f = this.series[i]) == null ? void 0 : _f[j]) / this.yRatio[translationsIndex]
4034
4054
  ) : 0) * 2;
4035
4055
  } else {
4036
4056
  y = barYPosition;
@@ -4044,12 +4064,22 @@ class BarStacked extends Bar {
4044
4064
  strokeWidth: this.strokeWidth,
4045
4065
  isReversed: this.isReversed,
4046
4066
  series: this.series,
4047
- seriesGroup,
4048
4067
  realIndex: indexes.realIndex,
4049
4068
  i,
4050
4069
  j,
4051
4070
  w
4052
4071
  });
4072
+ const t = g.yArrj[j];
4073
+ if (!isNaN(t)) {
4074
+ g.tops.set(key, [
4075
+ t,
4076
+ g.yArrjVal[j],
4077
+ (top ? top[2] : 0) + g.yArrjF[j],
4078
+ (top ? top[3] : 0) + (w.seriesData.series[realIndex][j] || 0),
4079
+ top ? Math.min(top[0], top[4]) : 1 / 0,
4080
+ top ? Math.max(top[0], top[5]) : -1 / 0
4081
+ ]);
4082
+ }
4053
4083
  this.barHelpers.barBackground({
4054
4084
  bc,
4055
4085
  j,
@@ -4110,12 +4140,7 @@ class RangeBar extends Bar {
4110
4140
  if (series[i].length > 0) {
4111
4141
  this.visibleI = this.visibleI + 1;
4112
4142
  }
4113
- let translationsIndex = 0;
4114
- if (this.yRatio.length > 1) {
4115
- this.yaxisIndex = /** @type {any} */
4116
- w.globals.seriesYAxisReverseMap[realIndex][0];
4117
- translationsIndex = realIndex;
4118
- }
4143
+ const translationsIndex = this.setSeriesAxis(realIndex);
4119
4144
  const initPositions = this.barHelpers.initialPositions(realIndex);
4120
4145
  const {
4121
4146
  y: initY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apexcharts",
3
- "version": "8.0.1",
3
+ "version": "8.2.0",
4
4
  "description": "A JavaScript Chart Library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -357,6 +357,8 @@
357
357
  "unit": "vitest run tests/unit/",
358
358
  "check:license-enforcement": "node tests/license/check-license-enforcement.mjs",
359
359
  "check:size": "node build/check-size.mjs",
360
+ "cdn:pin": "node build/cdn-pin.mjs",
361
+ "check:cdn-pin": "node build/cdn-pin.mjs --check",
360
362
  "e2e": "node tests/e2e/samples.js test",
361
363
  "e2e:update": "node tests/e2e/samples.js update",
362
364
  "e2e:ci": "node tests/e2e/samples.js test:ci",