apexcharts 8.2.0 → 8.3.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 (222) hide show
  1. package/README.md +7 -7
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +271 -173
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.css +35 -0
  6. package/dist/apexcharts.esm.js +1722 -1527
  7. package/dist/apexcharts.full.js +1459 -1075
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +994 -715
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +994 -715
  13. package/dist/area.common.js +2 -2
  14. package/dist/area.esm.js +91 -40
  15. package/dist/bar.common.js +2 -2
  16. package/dist/bar.esm.js +433 -394
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +364 -322
  20. package/dist/bubble.common.js +2 -2
  21. package/dist/bubble.esm.js +91 -40
  22. package/dist/candlestick.common.js +2 -2
  23. package/dist/candlestick.esm.js +364 -322
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +433 -394
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +271 -173
  29. package/dist/donut.common.js +1 -1
  30. package/dist/donut.esm.js +1 -1
  31. package/dist/dumbbell.common.js +2 -2
  32. package/dist/dumbbell.esm.js +433 -394
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +250 -187
  35. package/dist/features/annotations.common.js +1 -1
  36. package/dist/features/annotations.esm.js +1 -1
  37. package/dist/features/annotations.js +1 -1
  38. package/dist/features/context-menu.common.js +1 -1
  39. package/dist/features/context-menu.esm.js +1 -1
  40. package/dist/features/context-menu.js +1 -1
  41. package/dist/features/drilldown.common.js +2 -2
  42. package/dist/features/drilldown.esm.js +4 -2
  43. package/dist/features/drilldown.js +2 -2
  44. package/dist/features/dumbbell.common.js +1 -1
  45. package/dist/features/dumbbell.esm.js +1 -1
  46. package/dist/features/dumbbell.js +1 -1
  47. package/dist/features/exports.common.js +1 -1
  48. package/dist/features/exports.esm.js +1 -1
  49. package/dist/features/exports.js +1 -1
  50. package/dist/features/facet.common.js +1 -1
  51. package/dist/features/facet.esm.js +1 -1
  52. package/dist/features/facet.js +1 -1
  53. package/dist/features/highlight-filter.common.js +2 -2
  54. package/dist/features/highlight-filter.esm.js +14 -9
  55. package/dist/features/highlight-filter.js +2 -2
  56. package/dist/features/history.common.js +1 -1
  57. package/dist/features/history.esm.js +1 -1
  58. package/dist/features/history.js +1 -1
  59. package/dist/features/ink.common.js +1 -1
  60. package/dist/features/ink.esm.js +1 -1
  61. package/dist/features/ink.js +1 -1
  62. package/dist/features/keyboard.common.js +2 -2
  63. package/dist/features/keyboard.esm.js +97 -145
  64. package/dist/features/keyboard.js +2 -2
  65. package/dist/features/legend.common.js +2 -2
  66. package/dist/features/legend.esm.js +63 -43
  67. package/dist/features/legend.js +2 -2
  68. package/dist/features/link.common.js +1 -1
  69. package/dist/features/link.esm.js +1 -1
  70. package/dist/features/link.js +1 -1
  71. package/dist/features/marks.common.js +1 -1
  72. package/dist/features/marks.esm.js +1 -1
  73. package/dist/features/marks.js +1 -1
  74. package/dist/features/measure.common.js +1 -1
  75. package/dist/features/measure.esm.js +1 -1
  76. package/dist/features/measure.js +1 -1
  77. package/dist/features/morph.common.js +1 -1
  78. package/dist/features/morph.esm.js +1 -1
  79. package/dist/features/morph.js +1 -1
  80. package/dist/features/perspectives.common.js +1 -1
  81. package/dist/features/perspectives.esm.js +1 -1
  82. package/dist/features/perspectives.js +1 -1
  83. package/dist/features/raincloud.common.js +1 -1
  84. package/dist/features/raincloud.esm.js +1 -1
  85. package/dist/features/raincloud.js +1 -1
  86. package/dist/features/renderer-canvas.common.js +2 -2
  87. package/dist/features/renderer-canvas.esm.js +2 -1
  88. package/dist/features/renderer-canvas.js +2 -2
  89. package/dist/features/stats.common.js +1 -1
  90. package/dist/features/stats.esm.js +1 -1
  91. package/dist/features/stats.js +1 -1
  92. package/dist/features/storyboard.common.js +1 -1
  93. package/dist/features/storyboard.esm.js +1 -1
  94. package/dist/features/storyboard.js +1 -1
  95. package/dist/features/streamgraph.common.js +2 -2
  96. package/dist/features/streamgraph.esm.js +3 -2
  97. package/dist/features/streamgraph.js +2 -2
  98. package/dist/features/toolbar.common.js +2 -2
  99. package/dist/features/toolbar.esm.js +92 -2
  100. package/dist/features/toolbar.js +2 -2
  101. package/dist/features/trellis.common.js +2 -2
  102. package/dist/features/trellis.esm.js +83 -47
  103. package/dist/features/trellis.js +2 -2
  104. package/dist/features/waterfall.common.js +1 -1
  105. package/dist/features/waterfall.esm.js +1 -1
  106. package/dist/features/waterfall.js +1 -1
  107. package/dist/features/weave.common.js +1 -1
  108. package/dist/features/weave.esm.js +1 -1
  109. package/dist/features/weave.js +1 -1
  110. package/dist/full.common.js +2 -2
  111. package/dist/full.esm.js +950 -795
  112. package/dist/heatmap.common.js +2 -2
  113. package/dist/heatmap.esm.js +3 -17
  114. package/dist/heatmap.js +2 -2
  115. package/dist/histogram.common.js +2 -2
  116. package/dist/histogram.esm.js +433 -394
  117. package/dist/icicle.common.js +2 -2
  118. package/dist/icicle.esm.js +54 -38
  119. package/dist/icicle.js +2 -2
  120. package/dist/line.common.js +2 -2
  121. package/dist/line.esm.js +91 -40
  122. package/dist/line.js +2 -2
  123. package/dist/locales/en.json +2 -1
  124. package/dist/locales/ro.json +3 -2
  125. package/dist/pictograms.common.js +1 -1
  126. package/dist/pictograms.esm.js +1 -1
  127. package/dist/pictograms.js +1 -1
  128. package/dist/pie.common.js +1 -1
  129. package/dist/pie.esm.js +1 -1
  130. package/dist/pie.js +1 -1
  131. package/dist/polarArea.common.js +1 -1
  132. package/dist/polarArea.esm.js +1 -1
  133. package/dist/radar.common.js +2 -2
  134. package/dist/radar.esm.js +5 -4
  135. package/dist/radar.js +2 -2
  136. package/dist/radialBar.common.js +1 -1
  137. package/dist/radialBar.esm.js +1 -1
  138. package/dist/radialBar.js +1 -1
  139. package/dist/raincloud.common.js +2 -2
  140. package/dist/raincloud.esm.js +72 -26
  141. package/dist/rangeArea.common.js +2 -2
  142. package/dist/rangeArea.esm.js +91 -40
  143. package/dist/rangeBar.common.js +2 -2
  144. package/dist/rangeBar.esm.js +433 -394
  145. package/dist/scatter.common.js +2 -2
  146. package/dist/scatter.esm.js +91 -40
  147. package/dist/streamgraph.common.js +2 -2
  148. package/dist/streamgraph.esm.js +93 -41
  149. package/dist/sunburst.common.js +2 -2
  150. package/dist/sunburst.esm.js +103 -93
  151. package/dist/sunburst.js +2 -2
  152. package/dist/treemap.common.js +2 -2
  153. package/dist/treemap.esm.js +105 -86
  154. package/dist/treemap.js +2 -2
  155. package/dist/unit-shapes.common.js +1 -1
  156. package/dist/unit-shapes.esm.js +1 -1
  157. package/dist/unit-shapes.js +1 -1
  158. package/dist/unit.common.js +2 -2
  159. package/dist/unit.esm.js +280 -202
  160. package/dist/unit.js +2 -2
  161. package/dist/violin.common.js +2 -2
  162. package/dist/violin.esm.js +72 -26
  163. package/dist/violin.js +2 -2
  164. package/dist/waterfall.common.js +2 -2
  165. package/dist/waterfall.esm.js +432 -393
  166. package/package.json +1 -1
  167. package/src/apexcharts.js +13 -6
  168. package/src/assets/apexcharts.css +35 -0
  169. package/src/charts/Bar.js +62 -55
  170. package/src/charts/BarStacked.js +80 -88
  171. package/src/charts/BoxCandleStick.js +28 -31
  172. package/src/charts/Icicle.js +37 -37
  173. package/src/charts/Line.js +118 -42
  174. package/src/charts/Radar.js +5 -7
  175. package/src/charts/RangeBar.js +47 -43
  176. package/src/charts/Sunburst.js +101 -98
  177. package/src/charts/Treemap.js +108 -66
  178. package/src/charts/Unit.js +368 -250
  179. package/src/charts/Violin.js +48 -30
  180. package/src/charts/common/Breadcrumb.js +2 -2
  181. package/src/charts/common/Hierarchy.js +32 -11
  182. package/src/charts/common/Jitter.js +32 -7
  183. package/src/charts/common/bar/DataLabels.js +76 -81
  184. package/src/charts/common/bar/Helpers.js +43 -7
  185. package/src/charts/common/line/Helpers.js +12 -15
  186. package/src/charts/common/partition/NodeTooltip.js +8 -1
  187. package/src/charts/common/partition/Partition.js +33 -1
  188. package/src/charts/common/treemap/Helpers.js +3 -11
  189. package/src/locales/en.json +2 -1
  190. package/src/locales/ro.json +3 -2
  191. package/src/modules/Core.js +4 -0
  192. package/src/modules/CoreUtils.js +18 -42
  193. package/src/modules/Data.js +23 -24
  194. package/src/modules/DataLabels.js +6 -6
  195. package/src/modules/Graphics.js +62 -49
  196. package/src/modules/Markers.js +3 -1
  197. package/src/modules/Range.js +44 -29
  198. package/src/modules/RendererController.js +17 -3
  199. package/src/modules/Scales.js +32 -9
  200. package/src/modules/Series.js +39 -18
  201. package/src/modules/Theme.js +1 -1
  202. package/src/modules/ZoomPanSelection.js +119 -2
  203. package/src/modules/accessibility/KeyboardNavigation.js +114 -186
  204. package/src/modules/animations/LengthTransition.js +22 -2
  205. package/src/modules/drilldown/Breadcrumb.js +5 -2
  206. package/src/modules/helpers/Destroy.js +1 -1
  207. package/src/modules/highlightFilter/HighlightFilter.js +8 -9
  208. package/src/modules/highlightFilter/TreemapPart.js +2 -2
  209. package/src/modules/legend/HeatmapGradientLegend.js +76 -45
  210. package/src/modules/legend/Helpers.js +2 -0
  211. package/src/modules/legend/Legend.js +11 -12
  212. package/src/modules/settings/Options.js +7 -0
  213. package/src/modules/streamgraph/StreamLabels.js +1 -0
  214. package/src/modules/tooltip/Tooltip.js +20 -4
  215. package/src/modules/tooltip/Utils.js +8 -0
  216. package/src/modules/trellis/Trellis.js +6 -0
  217. package/src/modules/trellis/TrellisChrome.js +18 -7
  218. package/src/modules/trellis/TrellisSync.js +2 -0
  219. package/src/renderers/canvas/CanvasGraphics.js +1 -0
  220. package/src/ssr/DOMShim.js +10 -0
  221. package/src/types/internal.d.ts +9 -3
  222. package/types/apexcharts.d.ts +31 -12
@@ -4,6 +4,7 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __pow = Math.pow;
7
8
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
9
  var __spreadValues = (a2, b) => {
9
10
  for (var prop in b || (b = {}))
@@ -51,7 +52,7 @@ var __async = (__this, __arguments, generator) => {
51
52
  });
52
53
  };
53
54
  /*!
54
- * ApexCharts v8.2.0
55
+ * ApexCharts v8.3.0
55
56
  * (c) 2018-2026 ApexCharts
56
57
  */
57
58
  class Environment {
@@ -124,6 +125,15 @@ class SSRElement {
124
125
  setAttribute(name2, value) {
125
126
  this.attributes.set(name2, value);
126
127
  }
128
+ /**
129
+ * Namespaced attributes serialize by their qualified name.
130
+ * @param {any} _ns
131
+ * @param {string} name
132
+ * @param {any} value
133
+ */
134
+ setAttributeNS(_ns, name2, value) {
135
+ this.setAttribute(name2, value);
136
+ }
127
137
  /**
128
138
  * @param {string} name
129
139
  */
@@ -1921,7 +1931,7 @@ class Formatters {
1921
1931
  }
1922
1932
  }
1923
1933
  const name = "en";
1924
- const options = { "months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "toolbar": { "exportToSVG": "Download SVG", "exportToPNG": "Download PNG", "exportToCSV": "Download CSV", "menu": "Menu", "selection": "Selection", "selectionZoom": "Selection Zoom", "zoomIn": "Zoom In", "zoomOut": "Zoom Out", "pan": "Panning", "reset": "Reset Zoom", "measure": "Measure" } };
1934
+ const options = { "months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], "toolbar": { "exportToSVG": "Download SVG", "exportToPNG": "Download PNG", "exportToCSV": "Download CSV", "menu": "Menu", "selection": "Selection", "selectionZoom": "Selection Zoom", "zoomIn": "Zoom In", "zoomOut": "Zoom Out", "pan": "Panning", "reset": "Reset Zoom", "measure": "Measure", "wheelZoomHint": "Use {key} + scroll to zoom" } };
1925
1935
  const en = {
1926
1936
  name,
1927
1937
  options
@@ -2731,7 +2741,14 @@ class Options {
2731
2741
  // asked for and nobody can undo is a trap. Set either to true to
2732
2742
  // force the gesture on regardless (for a page that supplies its own
2733
2743
  // reset control), or false to turn it off outright.
2744
+ //
2745
+ // The 'auto' wheel is also cooperative: a bare wheel scrolls the
2746
+ // page, and Ctrl/Cmd + wheel (or a trackpad pinch) zooms, so a page
2747
+ // of charts scrolls past them. `true` zooms on every wheel.
2734
2748
  allowMouseWheelZoom: "auto",
2749
+ // With the cooperative wheel, a bare scroll over the chart briefly
2750
+ // shows how to zoom it ("Use Ctrl + scroll to zoom").
2751
+ wheelHint: true,
2735
2752
  // Momentum: two-finger pinch-zoom on touch devices. Zooms the x-axis
2736
2753
  // around the pinch centroid (matching the x-only wheel/toolbar zoom),
2737
2754
  // frame-by-frame rather than the 400ms wheel throttle.
@@ -9069,21 +9086,6 @@ class CoreUtils {
9069
9086
  });
9070
9087
  gl.seriesYAxisMap = axisSeriesMap.map((x2) => x2);
9071
9088
  gl.seriesYAxisReverseMap = seriesYAxisReverseMap.map((x2) => x2);
9072
- gl.seriesYAxisMap.forEach((axisSeries, ai) => {
9073
- axisSeries.forEach((si) => {
9074
- if (
9075
- /** @type {any} */
9076
- cnf.series[si] && /** @type {any} */
9077
- cnf.series[si].group === void 0
9078
- ) {
9079
- const _series = (
9080
- /** @type {any} */
9081
- cnf.series[si]
9082
- );
9083
- _series.group = "apexcharts-axis-".concat(ai.toString());
9084
- }
9085
- });
9086
- });
9087
9089
  }
9088
9090
  /**
9089
9091
  * @param {number | null} [index]
@@ -9217,12 +9219,15 @@ class CoreUtils {
9217
9219
  (s2, i2) => isBarSeries(s2) ? -1 : i2
9218
9220
  ).filter((i2) => i2 !== -1) : [];
9219
9221
  const stackedTotals = excluded.length ? this.getStackedSeriesTotals(excluded) : w.seriesData.stackedSeriesTotals;
9220
- const sx = w.axisFlags.isXNumeric && !w.config.plotOptions.bar.horizontal && w.seriesData.seriesX;
9222
+ const sx = w.axisFlags.isXNumeric && w.seriesData.seriesX;
9223
+ const gi = w.labelData.seriesGroupIndex;
9224
+ const byKey = sx || w.labelData.seriesGroups.length > 1;
9225
+ const key = (i2, j2) => gi[i2] + " " + (sx ? sx[i2][j2] : j2);
9221
9226
  const byX = /* @__PURE__ */ new Map();
9222
- if (sx) {
9227
+ if (byKey) {
9223
9228
  w.seriesData.series.forEach((s2, i2) => {
9224
9229
  if (excluded.indexOf(i2) < 0) {
9225
- s2.forEach((v, j2) => byX.set(sx[i2][j2], (byX.get(sx[i2][j2]) || 0) + v));
9230
+ s2.forEach((v, j2) => byX.set(key(i2, j2), (byX.get(key(i2, j2)) || 0) + v));
9226
9231
  }
9227
9232
  });
9228
9233
  }
@@ -9230,7 +9235,7 @@ class CoreUtils {
9230
9235
  const seriesPercent = [];
9231
9236
  if (Array.isArray(ser)) {
9232
9237
  for (let j2 = 0; j2 < ser.length; j2++) {
9233
- const total = sx ? byX.get(sx[i2][j2]) : stackedTotals[j2];
9238
+ const total = byKey ? byX.get(key(i2, j2)) : stackedTotals[j2];
9234
9239
  let percent = 0;
9235
9240
  if (total) {
9236
9241
  percent = 100 * ser[j2] / total;
@@ -9277,13 +9282,11 @@ class CoreUtils {
9277
9282
  if (!zRatio) {
9278
9283
  zRatio = 1;
9279
9284
  }
9280
- if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) {
9281
- const _hasNegsGl = (
9282
- /** @type {any} */
9283
- gl
9284
- );
9285
- _hasNegsGl.hasNegs = true;
9286
- }
9285
+ const _hasNegsGl = (
9286
+ /** @type {any} */
9287
+ gl
9288
+ );
9289
+ _hasNegsGl.hasNegs = gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0;
9287
9290
  if (w.globals.seriesYAxisReverseMap.length > 0) {
9288
9291
  const scaleBaseLineYScale = (y, i2) => {
9289
9292
  const yAxis = w.config.yaxis[w.globals.seriesYAxisReverseMap[i2]];
@@ -9440,7 +9443,7 @@ class CoreUtils {
9440
9443
  // other series of the same type on the same axis.
9441
9444
  /**
9442
9445
  * @param {Record<string, any>} typeSeries
9443
- * @param {string[]} typeGroups
9446
+ * @param {number[]} typeGroups
9444
9447
  * @param {string} type
9445
9448
  * @param {string} chartClass
9446
9449
  */
@@ -9452,10 +9455,7 @@ class CoreUtils {
9452
9455
  const gs = [];
9453
9456
  const gi = [];
9454
9457
  typeSeries.i.forEach((i2, ii) => {
9455
- if (
9456
- /** @type {Record<string,any>} */
9457
- w.config.series[i2].group === gn
9458
- ) {
9458
+ if (w.labelData.seriesGroupIndex[i2] === gn) {
9459
9459
  gs.push(typeSeries.series[ii]);
9460
9460
  gi.push(i2);
9461
9461
  }
@@ -11568,6 +11568,22 @@ class Graphics {
11568
11568
  ].join(" ");
11569
11569
  return arc;
11570
11570
  }
11571
+ /**
11572
+ * stroke.dashArray of a series, shared with the canvas renderer. A plugin
11573
+ * may have claimed it: resolved here rather than written into the config,
11574
+ * so the caller's own dashing is untouched and there is nothing to restore
11575
+ * when the claim goes. See weave/Claims.
11576
+ * @param {number} realIndex
11577
+ */
11578
+ seriesDash(realIndex) {
11579
+ const d = this.w.config.stroke.dashArray;
11580
+ return resolveClaimed(
11581
+ this.w,
11582
+ "stroke.dashArray",
11583
+ realIndex,
11584
+ Array.isArray(d) ? d[realIndex] : d
11585
+ );
11586
+ }
11571
11587
  /**
11572
11588
  * @memberof Graphics
11573
11589
  * @param {Record<string, any>} opts
@@ -11640,19 +11656,6 @@ class Graphics {
11640
11656
  w.globals.animationEnded = true;
11641
11657
  }
11642
11658
  }
11643
- const strokeDashArrayOpt = w.config.stroke.dashArray;
11644
- let strokeDashArray = 0;
11645
- if (Array.isArray(strokeDashArrayOpt)) {
11646
- strokeDashArray = strokeDashArrayOpt[realIndex];
11647
- } else {
11648
- strokeDashArray = w.config.stroke.dashArray;
11649
- }
11650
- strokeDashArray = resolveClaimed(
11651
- w,
11652
- "stroke.dashArray",
11653
- realIndex,
11654
- strokeDashArray
11655
- );
11656
11659
  const el = this.drawPath({
11657
11660
  d,
11658
11661
  stroke,
@@ -11661,7 +11664,7 @@ class Graphics {
11661
11664
  fillOpacity: 1,
11662
11665
  classes: className,
11663
11666
  strokeLinecap,
11664
- strokeDashArray
11667
+ strokeDashArray: this.seriesDash(realIndex)
11665
11668
  });
11666
11669
  el.attr("index", realIndex);
11667
11670
  if (shouldClipToGrid) {
@@ -11854,13 +11857,19 @@ class Graphics {
11854
11857
  }
11855
11858
  return g;
11856
11859
  }
11857
- /** @param {{ text: any, maxWidth: any, fontSize: any, fontFamily?: any }} opts */
11858
- getTextBasedOnMaxWidth({ text, maxWidth, fontSize, fontFamily }) {
11859
- const tRects = this.getTextRects(text, fontSize, fontFamily, "");
11860
- const wordWidth = tRects.width / text.length;
11861
- const wordsBasedOnWidth = Math.floor(maxWidth / wordWidth);
11860
+ /** @param {{ text: any, maxWidth: any, fontSize: any, fontFamily?: any, fontWeight?: any }} opts */
11861
+ getTextBasedOnMaxWidth({ text, maxWidth, fontSize, fontFamily, fontWeight }) {
11862
+ const tRects = this.getTextRects(
11863
+ text,
11864
+ fontSize,
11865
+ fontFamily,
11866
+ "",
11867
+ true,
11868
+ fontWeight
11869
+ );
11870
+ const n2 = Math.floor(maxWidth / (tRects.width / text.length)) - 3;
11862
11871
  if (maxWidth < tRects.width) {
11863
- return text.slice(0, wordsBasedOnWidth - 3) + "...";
11872
+ return n2 < 0 ? "" : text.slice(0, n2) + "...";
11864
11873
  }
11865
11874
  return text;
11866
11875
  }
@@ -11897,7 +11906,8 @@ class Graphics {
11897
11906
  const commonProps = {
11898
11907
  maxWidth,
11899
11908
  fontSize,
11900
- fontFamily
11909
+ fontFamily,
11910
+ fontWeight
11901
11911
  };
11902
11912
  let elText;
11903
11913
  if (Array.isArray(text)) {
@@ -12098,7 +12108,12 @@ class Graphics {
12098
12108
  if (w.config.states.hover.filter.type !== "none") {
12099
12109
  if (!w.interact.isTouchDevice) {
12100
12110
  const hoverFilter = w.config.states.hover.filter;
12101
- filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);
12111
+ filters.applyFilter(
12112
+ path,
12113
+ Filters.isSliceChart(w) ? j2 : i2,
12114
+ hoverFilter.type,
12115
+ hoverFilter.value
12116
+ );
12102
12117
  }
12103
12118
  }
12104
12119
  }
@@ -12132,33 +12147,28 @@ class Graphics {
12132
12147
  }
12133
12148
  if (Filters.hoverOutlineOwnsHoverState(w)) return;
12134
12149
  if (w.config.states.hover.filter.type !== "none") {
12135
- filters.getDefaultFilter(path, i2);
12150
+ filters.getDefaultFilter(path, Filters.isSliceChart(w) ? j2 : i2);
12136
12151
  }
12137
12152
  }
12138
12153
  /**
12139
12154
  * Clear every selected data point (single-select mode): reset the selection
12140
- * array and restore the default filter on all series path/circle/rect nodes.
12141
- * NOTE: preserves the original behavior of passing the clicked series index
12142
- * `i` to getDefaultFilter for every element (not each element's own index).
12143
- * @param {any} filters @param {number} i
12155
+ * array and restore the default filter on each selected node, with its own
12156
+ * series index (dropShadow.enabledOnSeries is per series; a pie slice's
12157
+ * shadow is per slice, j).
12158
+ * @param {any} filters
12144
12159
  */
12145
- _clearAllDataPointSelections(filters, i2) {
12160
+ _clearAllDataPointSelections(filters) {
12146
12161
  const w = this.w;
12147
12162
  w.interact.selectedDataPoints = [];
12148
- const elPaths = w.dom.Paper.find(
12149
- ".apexcharts-series path:not(.apexcharts-decoration-element)"
12150
- );
12151
- const elCircles = w.dom.Paper.find(
12152
- ".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"
12153
- );
12154
- const deSelect = (els) => {
12155
- Array.prototype.forEach.call(els, (el) => {
12163
+ w.dom.Paper.find('.apexcharts-series [selected="true"]').forEach(
12164
+ (el) => {
12156
12165
  el.node.setAttribute("selected", "false");
12157
- filters.getDefaultFilter(el, i2);
12158
- });
12159
- };
12160
- deSelect(elPaths);
12161
- deSelect(elCircles);
12166
+ filters.getDefaultFilter(
12167
+ el,
12168
+ +el.node.getAttribute(Filters.isSliceChart(w) ? "j" : "index")
12169
+ );
12170
+ }
12171
+ );
12162
12172
  }
12163
12173
  /**
12164
12174
  * Toggle the selected state of a single data point. Mutates
@@ -12178,7 +12188,7 @@ class Graphics {
12178
12188
  return "false";
12179
12189
  }
12180
12190
  if (!w.config.states.active.allowMultipleDataPointsSelection && w.interact.selectedDataPoints.length > 0) {
12181
- this._clearAllDataPointSelections(filters, i2);
12191
+ this._clearAllDataPointSelections(filters);
12182
12192
  }
12183
12193
  path.node.setAttribute("selected", "true");
12184
12194
  if (typeof w.interact.selectedDataPoints[i2] === "undefined") {
@@ -12198,10 +12208,10 @@ class Graphics {
12198
12208
  if (Filters.sliceOffsetOwnsActiveState(w)) return;
12199
12209
  if (selected === "true") {
12200
12210
  const activeFilter = w.config.states.active.filter;
12201
- if (activeFilter !== "none") {
12211
+ if (activeFilter.type !== "none") {
12202
12212
  filters.applyFilter(path, i2, activeFilter.type, activeFilter.value);
12203
12213
  } else {
12204
- if (w.config.states.hover.filter !== "none") {
12214
+ if (w.config.states.hover.filter.type !== "none") {
12205
12215
  if (!w.interact.isTouchDevice) {
12206
12216
  const hoverFilter = w.config.states.hover.filter;
12207
12217
  filters.applyFilter(path, i2, hoverFilter.type, hoverFilter.value);
@@ -12234,7 +12244,12 @@ class Graphics {
12234
12244
  const crossfilterClick = !!(link && (typeof link.dimension === "function" || link.enabled));
12235
12245
  if (!crossfilterClick) {
12236
12246
  const selected = this._togglePointSelection(path, filters, i2, j2);
12237
- this._applyPointSelectionFilter(path, filters, i2, selected);
12247
+ this._applyPointSelectionFilter(
12248
+ path,
12249
+ filters,
12250
+ Filters.isSliceChart(w) ? j2 : i2,
12251
+ selected
12252
+ );
12238
12253
  }
12239
12254
  if (typeof w.config.chart.events.dataPointSelection === "function") {
12240
12255
  w.config.chart.events.dataPointSelection(e2, this.ctx, {
@@ -13022,7 +13037,7 @@ class Markers {
13022
13037
  }
13023
13038
  setGlobalMarkerSize() {
13024
13039
  const w = this.w;
13025
- w.globals.markers.size = Array.isArray(w.config.markers.size) ? w.config.markers.size : [w.config.markers.size];
13040
+ w.globals.markers.size = Array.isArray(w.config.markers.size) ? w.config.markers.size.slice() : [w.config.markers.size];
13026
13041
  if (w.globals.markers.size.length > 0) {
13027
13042
  if (w.globals.markers.size.length < w.seriesData.series.length + 1) {
13028
13043
  for (let i2 = 0; i2 <= w.seriesData.series.length; i2++) {
@@ -13732,6 +13747,7 @@ class DataLabels {
13732
13747
  * @param {string} fontSize
13733
13748
  */
13734
13749
  dataLabelsCorrection(x2, y, val, i2, dataPointIndex, alwaysDrawDataLabel, fontSize) {
13750
+ var _a;
13735
13751
  const w = this.w;
13736
13752
  const graphics = new Graphics(this.w);
13737
13753
  let drawnextLabel = false;
@@ -13774,6 +13790,9 @@ class DataLabels {
13774
13790
  if (dataPointIndex === 0 || alwaysDrawDataLabel) {
13775
13791
  drawnextLabel = true;
13776
13792
  }
13793
+ if (drawnextLabel) {
13794
+ ((_a = w.globals.lastDrawnDataLabelsIndexes)[i2] || (_a[i2] = [])).push(len + 1);
13795
+ }
13777
13796
  return {
13778
13797
  x: x2,
13779
13798
  y,
@@ -14019,10 +14038,6 @@ class DataLabels {
14019
14038
  }
14020
14039
  parent.add(dataLabelText);
14021
14040
  if (penDrawn(w, i2)) applyProgressiveReveal(dataLabelText, x2, w);
14022
- if (typeof w.globals.lastDrawnDataLabelsIndexes[i2] === "undefined") {
14023
- w.globals.lastDrawnDataLabelsIndexes[i2] = [];
14024
- }
14025
- w.globals.lastDrawnDataLabelsIndexes[i2].push(j2);
14026
14041
  }
14027
14042
  return dataLabelText;
14028
14043
  }
@@ -15986,6 +16001,13 @@ class Scales {
15986
16001
  if (typeof gl.yAxisScale[index] === "undefined") {
15987
16002
  gl.yAxisScale[index] = [];
15988
16003
  }
16004
+ if (y.logarithmic && minY <= Number.MIN_VALUE) {
16005
+ const s2 = this.w.seriesData.series;
16006
+ const map = gl.isMultipleYAxis && gl.seriesYAxisMap[index];
16007
+ const b = y.logBase || 10;
16008
+ const m = (map ? map.map((i2) => s2[i2]) : s2).flat().reduce((a2, v) => v > 0 && (!a2 || v < a2) ? v : a2, 0);
16009
+ minY = m && Math.min(b, __pow(b, Math.floor(Math.log(m) / Math.log(b))));
16010
+ }
15989
16011
  const range = Math.abs(maxY - minY);
15990
16012
  const spansABase = y.logarithmic && this._logDomainSpan(minY, maxY, y.logBase) >= 1;
15991
16013
  const validLogScale = y.logarithmic && (spansABase || range > 5);
@@ -16018,19 +16040,26 @@ class Scales {
16018
16040
  * @param {number} maxX
16019
16041
  */
16020
16042
  setXScale(minX, maxX) {
16043
+ var _a;
16021
16044
  const w = this.w;
16022
16045
  const gl = w.globals;
16023
16046
  if (maxX === -Number.MAX_VALUE || !Utils$1.isNumber(maxX)) {
16024
16047
  gl.xAxisScale = this.linearScale(0, 10, 10);
16025
16048
  } else {
16026
- const ticks = gl.xTickAmount;
16027
- gl.xAxisScale = this.linearScale(
16028
- minX,
16029
- maxX,
16030
- ticks,
16031
- 0,
16032
- w.config.xaxis.max === void 0 ? w.config.xaxis.stepSize : void 0
16033
- );
16049
+ const x2 = w.config.xaxis;
16050
+ let step = ((_a = x2.max) != null ? _a : x2.range) === void 0 ? x2.stepSize : void 0;
16051
+ const fit = step > 0 && !gl.isBarHorizontal && x2.type !== "datetime";
16052
+ if (fit) {
16053
+ const n2 = Math.ceil((maxX - minX) / step - 1e-9);
16054
+ n2 > 1e3 ? step = void 0 : gl.xTickAmount = n2;
16055
+ }
16056
+ let s2 = this.linearScale(minX, maxX, gl.xTickAmount, 0, step);
16057
+ if (fit && step) {
16058
+ while (s2.niceMax < maxX)
16059
+ s2 = this.linearScale(minX, maxX, ++gl.xTickAmount, 0, step);
16060
+ gl.maxX = s2.niceMax;
16061
+ }
16062
+ gl.xAxisScale = s2;
16034
16063
  }
16035
16064
  return gl.xAxisScale;
16036
16065
  }
@@ -16665,22 +16694,21 @@ class Range {
16665
16694
  gl.barGroups = [];
16666
16695
  gl.lineGroups = [];
16667
16696
  gl.areaGroups = [];
16668
- cnf.series.forEach((s2) => {
16669
- const _s = (
16697
+ cnf.series.forEach((s2, i2) => {
16698
+ const g = this.w.labelData.seriesGroupIndex[i2];
16699
+ switch (
16670
16700
  /** @type {any} */
16671
- s2
16672
- );
16673
- const type = _s.type || cnf.chart.type;
16674
- switch (type) {
16701
+ s2.type || cnf.chart.type
16702
+ ) {
16675
16703
  case "bar":
16676
16704
  case "column":
16677
- gl.barGroups.push(_s.group);
16705
+ gl.barGroups.push(g);
16678
16706
  break;
16679
16707
  case "line":
16680
- gl.lineGroups.push(_s.group);
16708
+ gl.lineGroups.push(g);
16681
16709
  break;
16682
16710
  case "area":
16683
- gl.areaGroups.push(_s.group);
16711
+ gl.areaGroups.push(g);
16684
16712
  break;
16685
16713
  }
16686
16714
  });
@@ -16765,9 +16793,10 @@ class Range {
16765
16793
  ticks = gl.dataPoints - 1;
16766
16794
  }
16767
16795
  } else if (cnf.xaxis.tickAmount === "dataPoints") {
16768
- if (this.w.seriesData.series.length > 1) {
16769
- ticks = this.w.seriesData.series[gl.maxValsInArrayIndex].length - 1;
16770
- }
16796
+ ticks = Math.max(
16797
+ 1,
16798
+ (this.w.seriesData.series[gl.maxValsInArrayIndex] || []).length - 1
16799
+ );
16771
16800
  if (this.w.axisFlags.isXNumeric) {
16772
16801
  const diff = Math.round(gl.maxX - gl.minX);
16773
16802
  if (diff < 30) {
@@ -16825,8 +16854,26 @@ class Range {
16825
16854
  }
16826
16855
  }
16827
16856
  if (isXNumeric && gl.isBarHorizontal) {
16857
+ const rows = (this.w.seriesData.seriesX[gl.maxValsInArrayIndex] || []).slice();
16858
+ const seen = new Set(rows);
16859
+ const n2 = rows.length;
16860
+ if (cnf.chart.type === "bar") {
16861
+ this.w.seriesData.seriesX.forEach(
16862
+ (s2) => s2 == null ? void 0 : s2.forEach((x2) => {
16863
+ if (x2 != null && !seen.has(x2)) {
16864
+ seen.add(x2);
16865
+ rows.push(x2);
16866
+ }
16867
+ })
16868
+ );
16869
+ }
16870
+ if (rows.length > n2) {
16871
+ const dir = rows[0] > rows[n2 - 1] ? -1 : 1;
16872
+ rows.sort((a2, b) => (a2 - b) * dir);
16873
+ gl.dataPoints = rows.length;
16874
+ }
16828
16875
  this.w.labelData.labels = /** @type {any} */
16829
- (this.w.seriesData.seriesX[gl.maxValsInArrayIndex] || []).slice();
16876
+ rows;
16830
16877
  } else if (isXNumeric) {
16831
16878
  this.w.labelData.labels = /** @type {any} */
16832
16879
  gl.xAxisScale.result.slice();
@@ -16951,7 +16998,7 @@ class Range {
16951
16998
  const windowed = this._autoScaleYEnabled();
16952
16999
  if (!this.w.seriesData.series.length) return;
16953
17000
  const gIdx = this.w.labelData.seriesGroupIndex;
16954
- const byX = this.w.axisFlags.isXNumeric && !this.w.config.plotOptions.bar.horizontal;
17001
+ const byX = this.w.axisFlags.isXNumeric;
16955
17002
  const stacks = /* @__PURE__ */ new Map();
16956
17003
  this.w.config.series.forEach(
16957
17004
  (serie, i2) => {
@@ -16966,7 +17013,7 @@ class Range {
16966
17013
  if (!st) stacks.set(key, st = [0, 0]);
16967
17014
  const v = this.w.seriesData.series[i2][j2];
16968
17015
  if (stackSeries && v !== null && Utils$1.isNumber(v)) {
16969
- v > 0 ? st[0] += parseFloat(String(v)) + 1e-4 : st[1] += parseFloat(String(v));
17016
+ v > 0 ? st[0] += v * 1.000001 : st[1] += +v;
16970
17017
  }
16971
17018
  }
16972
17019
  }
@@ -18679,6 +18726,11 @@ function uniquifyKeys(keys) {
18679
18726
  return count === 0 ? k2 : `${k2}#${count}`;
18680
18727
  });
18681
18728
  }
18729
+ function seriesKeys(w, realIndex, n2 = ((_a) => (_a = w.seriesData.series[realIndex]) == null ? void 0 : _a.length)() | 0) {
18730
+ return uniquifyKeys(
18731
+ Array.from({ length: n2 }, (_, j2) => datumKey(w, realIndex, j2))
18732
+ );
18733
+ }
18682
18734
  function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false) {
18683
18735
  var _a, _b;
18684
18736
  if (!lengthTransitionEnabled(w)) return null;
@@ -18691,7 +18743,7 @@ function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false)
18691
18743
  const oldKeys = uniquifyKeys(
18692
18744
  oldY.map((_, j2) => frameDatumKey(frame, realIndex, j2))
18693
18745
  );
18694
- const newKeys = uniquifyKeys(newY.map((_, j2) => datumKey(w, realIndex, j2)));
18746
+ const newKeys = seriesKeys(w, realIndex);
18695
18747
  const join = joinKeys(oldKeys, newKeys);
18696
18748
  if (!join.ordered && !allowReorder) return null;
18697
18749
  if (!join.changed && !includeIdentity) return null;
@@ -20126,11 +20178,8 @@ const _Series = class _Series {
20126
20178
  */
20127
20179
  isSeriesHidden(seriesName) {
20128
20180
  var _a;
20129
- const targetElement = this.getSeriesByName(seriesName);
20130
- const el = (
20131
- /** @type {Element} */
20132
- targetElement
20133
- );
20181
+ const el = this.getSeriesByName(seriesName);
20182
+ if (!el) return { isHidden: false, realIndex: -1 };
20134
20183
  const realIndex = parseInt((_a = el.getAttribute("data:realIndex")) != null ? _a : "0", 10);
20135
20184
  const gl = this.w.globals;
20136
20185
  const isHidden = el.classList.contains("apexcharts-series-collapsed") || gl.collapsedSeriesIndices.includes(realIndex) || gl.ancillaryCollapsedSeriesIndices.includes(realIndex);
@@ -20280,9 +20329,9 @@ const _Series = class _Series {
20280
20329
  */
20281
20330
  toggleSeries(seriesName) {
20282
20331
  var _a;
20283
- const isSeriesHidden = this.isSeriesHidden(seriesName);
20284
- (_a = this._toggleDataSeries) == null ? void 0 : _a.call(this, isSeriesHidden.realIndex, isSeriesHidden.isHidden);
20285
- return isSeriesHidden.isHidden;
20332
+ const { isHidden, realIndex } = this.isSeriesHidden(seriesName);
20333
+ if (realIndex > -1) (_a = this._toggleDataSeries) == null ? void 0 : _a.call(this, realIndex, isHidden);
20334
+ return isHidden;
20286
20335
  }
20287
20336
  /**
20288
20337
  * @param {string} seriesName
@@ -20300,7 +20349,7 @@ const _Series = class _Series {
20300
20349
  hideSeries(seriesName) {
20301
20350
  var _a;
20302
20351
  const isSeriesHidden = this.isSeriesHidden(seriesName);
20303
- if (!isSeriesHidden.isHidden) {
20352
+ if (!isSeriesHidden.isHidden && isSeriesHidden.realIndex > -1) {
20304
20353
  (_a = this._toggleDataSeries) == null ? void 0 : _a.call(this, isSeriesHidden.realIndex, false);
20305
20354
  }
20306
20355
  }
@@ -20376,10 +20425,10 @@ const _Series = class _Series {
20376
20425
  * @param {any[]} series
20377
20426
  */
20378
20427
  emptyCollapsedSeries(series) {
20379
- const w = this.w;
20428
+ const gl = this.w.globals;
20380
20429
  if (!Array.isArray(series)) return series;
20381
20430
  for (let i2 = 0; i2 < series.length; i2++) {
20382
- if (w.globals.collapsedSeriesIndices.indexOf(i2) > -1) {
20431
+ if (gl.collapsedSeriesIndices.includes(i2) || gl.ancillaryCollapsedSeriesIndices.includes(i2)) {
20383
20432
  if (series[i2] && typeof series[i2] === "object") {
20384
20433
  series[i2].data = [];
20385
20434
  } else {
@@ -20585,9 +20634,11 @@ const _Series = class _Series {
20585
20634
  * @param {'highlight'|'reset'} action
20586
20635
  */
20587
20636
  highlightRangeInSeries(rangeIndex, action) {
20637
+ var _a, _b;
20588
20638
  const w = this.w;
20639
+ const t2 = w.config.chart.type === "treemap" ? "treemap" : "heatmap";
20589
20640
  const allHeatMapElements = w.dom.baseEl.getElementsByClassName(
20590
- "apexcharts-heatmap-rect"
20641
+ `apexcharts-${t2}-rect`
20591
20642
  );
20592
20643
  const toggleAllInactive = (op) => {
20593
20644
  for (let i2 = 0; i2 < allHeatMapElements.length; i2++) {
@@ -20604,14 +20655,23 @@ const _Series = class _Series {
20604
20655
  toggleAllInactive("remove");
20605
20656
  return;
20606
20657
  }
20607
- const ranges = w.config.plotOptions.heatmap.colorScale.ranges;
20658
+ const ranges = w.config.plotOptions[t2].colorScale.ranges;
20608
20659
  const range = ranges && ranges[rangeIndex];
20609
20660
  if (!range) return;
20610
20661
  toggleAllInactive("add");
20611
20662
  for (let i2 = 0; i2 < allHeatMapElements.length; i2++) {
20612
- const val = Number(allHeatMapElements[i2].getAttribute("val"));
20663
+ const el = allHeatMapElements[i2];
20664
+ const val = Number(
20665
+ (_b = el.getAttribute("val")) != null ? _b : (_a = w.seriesData.series[
20666
+ /** @type {any} */
20667
+ el.getAttribute("i")
20668
+ ]) == null ? void 0 : _a[
20669
+ /** @type {any} */
20670
+ el.getAttribute("j")
20671
+ ]
20672
+ );
20613
20673
  if (val >= range.from && val <= range.to) {
20614
- allHeatMapElements[i2].classList.remove(this.legendInactiveClass);
20674
+ el.classList.remove(this.legendInactiveClass);
20615
20675
  }
20616
20676
  }
20617
20677
  }
@@ -20625,10 +20685,7 @@ const _Series = class _Series {
20625
20685
  const activeSeriesIndex = w.config.series.map((s2, index) => {
20626
20686
  const checkChartType = () => {
20627
20687
  if (w.globals.comboCharts) {
20628
- return chartTypes.length === 0 || chartTypes.length && chartTypes.indexOf(
20629
- /** @type {Record<string,any>} */
20630
- w.config.series[index].type
20631
- ) > -1;
20688
+ return chartTypes.length === 0 || chartTypes.length && chartTypes.indexOf(s2.type || w.config.chart.type) > -1;
20632
20689
  }
20633
20690
  return true;
20634
20691
  };
@@ -20666,7 +20723,7 @@ const _Series = class _Series {
20666
20723
  let last = -1;
20667
20724
  w.config.series.forEach((s2, i2) => {
20668
20725
  if (w.labelData.seriesGroupIndex[i2] !== gi) return;
20669
- if (w.globals.comboCharts && chartTypes.length && chartTypes.indexOf(s2.type) === -1) {
20726
+ if (w.globals.comboCharts && chartTypes.length && chartTypes.indexOf(s2.type || w.config.chart.type) === -1) {
20670
20727
  return;
20671
20728
  }
20672
20729
  const hasData = s2.data && s2.data.length > 0 && w.globals.collapsedSeriesIndices.indexOf(i2) === -1;
@@ -20679,7 +20736,8 @@ const _Series = class _Series {
20679
20736
  const w = this.w;
20680
20737
  if (w.globals.comboCharts) {
20681
20738
  return this.w.config.series.map((s2, i2) => {
20682
- return s2.type === "bar" || s2.type === "column" ? i2 : -1;
20739
+ const t2 = s2.type || w.config.chart.type;
20740
+ return t2 === "bar" || t2 === "column" ? i2 : -1;
20683
20741
  }).filter((i2) => {
20684
20742
  return i2 !== -1;
20685
20743
  });
@@ -20734,6 +20792,11 @@ const _Series = class _Series {
20734
20792
  for (let j2 = 0; j2 < paths.length; j2++) {
20735
20793
  if (paths[j2].hasAttribute("pathTo")) {
20736
20794
  const d = (type === "line" || type === "area") && paths[j2].getAttribute("d") || paths[j2].getAttribute("pathTo");
20795
+ if (paths[j2].classList.contains("apexcharts-raincloud-box")) {
20796
+ const body = dArr.paths[dArr.paths.length - 1];
20797
+ if (body) (body.box || (body.box = [])).push(d);
20798
+ continue;
20799
+ }
20737
20800
  dArr.paths.push({
20738
20801
  d,
20739
20802
  key: paths[j2].getAttribute("data:pathKey"),
@@ -20757,7 +20820,8 @@ const _Series = class _Series {
20757
20820
  "rangeArea",
20758
20821
  "candlestick",
20759
20822
  "boxPlot",
20760
- "radar"
20823
+ "radar",
20824
+ "violin"
20761
20825
  ];
20762
20826
  chartTypes.forEach((type) => {
20763
20827
  const paths = getPaths(type);
@@ -21332,7 +21396,7 @@ class Theme {
21332
21396
  applyColorTypes(colorTypes, defaultColors) {
21333
21397
  const w = this.w;
21334
21398
  colorTypes.forEach((c) => {
21335
- w.globals[c].colors = w.config[c].colors === void 0 ? this.isColorFn ? w.config.colors.slice() : defaultColors : w.config[c].colors.slice();
21399
+ w.globals[c].colors = w.config[c].colors === void 0 ? this.isColorFn && w.config.colors ? w.config.colors.slice() : defaultColors : w.config[c].colors.slice();
21336
21400
  this.pushExtraColors(
21337
21401
  /** @type {Record<string,any>} */
21338
21402
  w.globals[c].colors
@@ -22348,7 +22412,7 @@ function renderBreadcrumb(w, opts) {
22348
22412
  text.setAttribute("class", "apexcharts-breadcrumb-label");
22349
22413
  text.textContent = String(label);
22350
22414
  btn.appendChild(text);
22351
- btn.addEventListener("click", () => opts.onNavigate(i2, crumb));
22415
+ btn.addEventListener("click", (e2) => opts.onNavigate(i2, crumb, e2));
22352
22416
  nav.appendChild(btn);
22353
22417
  });
22354
22418
  elWrap.appendChild(nav);
@@ -23285,6 +23349,7 @@ class Core {
23285
23349
  const { w, ctx } = this;
23286
23350
  const { config: cnf, globals: gl } = w;
23287
23351
  const { line, boxCandlestick, violin } = renderers;
23352
+ if (cnf.chart.type !== "unit") ctx._unitPrevDots = null;
23288
23353
  let elGraph = [];
23289
23354
  if (gl.comboCharts) {
23290
23355
  const coreUtils = new CoreUtils(this.w);
@@ -24003,26 +24068,33 @@ function drilldownById(w, id) {
24003
24068
  const list = dd && Array.isArray(dd.series) ? dd.series : [];
24004
24069
  return list.find((s2) => s2 && s2.id === id);
24005
24070
  }
24006
- function toNode(w, d, i2, paletteFromParent, parentKey, seenIds = null, opts = {}) {
24071
+ function segment(name2, seen) {
24072
+ var _a;
24073
+ const n2 = String(name2).replace(/\//g, "%2F");
24074
+ const o2 = ((_a = seen.get(n2)) != null ? _a : -1) + 1;
24075
+ seen.set(n2, o2);
24076
+ return `${o2}:${n2}`;
24077
+ }
24078
+ function toNode(w, d, i2, paletteFromParent, parentKey, seenIds = null, opts = {}, seen = /* @__PURE__ */ new Map()) {
24007
24079
  var _a, _b, _c;
24008
24080
  const isObj = d && typeof d === "object";
24009
24081
  const name2 = isObj ? (_b = (_a = d.x) != null ? _a : d.name) != null ? _b : "" : "";
24010
- const value = isObj ? Number((_c = d.y) != null ? _c : d.value) : Number(d);
24082
+ const raw = isObj ? (_c = d.y) != null ? _c : d.value : d;
24083
+ const value = raw == null || raw === "" ? NaN : Number(raw);
24011
24084
  const node = {
24012
24085
  name: String(name2),
24013
24086
  value: isNaN(value) ? null : value,
24014
24087
  color: isObj && d.color ? d.color : void 0,
24015
- // Identity across data updates: the path of names (indexed so same-named
24016
- // siblings stay distinct). Update animations morph matched keys in place.
24017
- _key: `${parentKey}/${i2}:${name2}`
24088
+ _key: `${parentKey}/${segment(name2, seen)}`
24018
24089
  };
24019
24090
  if (paletteFromParent && !node.color) {
24020
24091
  node.color = paletteFromParent[i2 % paletteFromParent.length];
24021
24092
  }
24022
24093
  if (opts.keepDatum) node._datum = d;
24094
+ const kids = /* @__PURE__ */ new Map();
24023
24095
  if (isObj && Array.isArray(d.children) && d.children.length) {
24024
24096
  node.children = d.children.map(
24025
- (c, j2) => toNode(w, c, j2, null, node._key, seenIds, opts)
24097
+ (c, j2) => toNode(w, c, j2, null, node._key, seenIds, opts, kids)
24026
24098
  );
24027
24099
  } else if (isObj && d.drilldown != null && opts.expandDrilldown !== false) {
24028
24100
  const visited = seenIds || /* @__PURE__ */ new Set();
@@ -24033,7 +24105,7 @@ function toNode(w, d, i2, paletteFromParent, parentKey, seenIds = null, opts = {
24033
24105
  nextSeen.add(d.drilldown);
24034
24106
  const palette = Array.isArray(dd.colors) ? dd.colors : null;
24035
24107
  node.children = dd.data.map(
24036
- (c, j2) => toNode(w, c, j2, palette, node._key, nextSeen, opts)
24108
+ (c, j2) => toNode(w, c, j2, palette, node._key, nextSeen, opts, kids)
24037
24109
  );
24038
24110
  }
24039
24111
  }
@@ -24046,10 +24118,12 @@ function buildSeriesRoots(w, series, opts = {}) {
24046
24118
  series || w.config.series
24047
24119
  );
24048
24120
  if (!Array.isArray(cfgSeries)) return [];
24121
+ const seen = /* @__PURE__ */ new Map();
24049
24122
  return cfgSeries.map((s2, i2) => {
24050
24123
  var _a, _b;
24051
24124
  const data = s2 && Array.isArray(s2.data) ? s2.data : [];
24052
- const key = `${i2}:${(_a = s2 == null ? void 0 : s2.name) != null ? _a : ""}`;
24125
+ const key = segment((_a = s2 == null ? void 0 : s2.name) != null ? _a : "", seen);
24126
+ const kids = /* @__PURE__ */ new Map();
24053
24127
  const root = {
24054
24128
  name: String((_b = s2 == null ? void 0 : s2.name) != null ? _b : ""),
24055
24129
  value: null,
@@ -24057,7 +24131,7 @@ function buildSeriesRoots(w, series, opts = {}) {
24057
24131
  _key: key,
24058
24132
  _seriesIndex: i2,
24059
24133
  children: data.map(
24060
- (d, j2) => toNode(w, d, j2, null, key, null, opts)
24134
+ (d, j2) => toNode(w, d, j2, null, key, null, opts, kids)
24061
24135
  )
24062
24136
  };
24063
24137
  return root;
@@ -24207,7 +24281,7 @@ function subtreeTotal(d) {
24207
24281
  var _a;
24208
24282
  if (!d || typeof d !== "object") return Utils$1.parseNumber(d) || 0;
24209
24283
  const v = (_a = d.y) != null ? _a : d.value;
24210
- if (v != null) return Utils$1.parseNumber(v) || 0;
24284
+ if (v != null && v !== "") return Utils$1.parseNumber(v) || 0;
24211
24285
  if (!Array.isArray(d.children)) return 0;
24212
24286
  return d.children.reduce(
24213
24287
  (s2, c) => s2 + Math.max(0, subtreeTotal(c)),
@@ -24933,13 +25007,18 @@ class Data {
24933
25007
  }
24934
25008
  });
24935
25009
  this.coreUtils.setSeriesYAxisMappings();
24936
- const buckets = [];
24937
- const groups = [
24938
- ...new Set(cnf.series.map((s2) => s2.group))
24939
- ];
24940
- this.w.labelData.seriesGroupIndex = cnf.series.map(
25010
+ const rev = this.w.globals.seriesYAxisReverseMap;
25011
+ const keys = cnf.series.map(
24941
25012
  (s2, i2) => {
24942
- const index = groups.indexOf(s2.group);
25013
+ var _a2;
25014
+ return (_a2 = s2.group) != null ? _a2 : "apexcharts-axis-" + rev[i2];
25015
+ }
25016
+ );
25017
+ const buckets = [];
25018
+ const groups = [...new Set(keys)];
25019
+ this.w.labelData.seriesGroupIndex = keys.map(
25020
+ (k2, i2) => {
25021
+ const index = groups.indexOf(k2);
24943
25022
  if (!buckets[index]) buckets[index] = [];
24944
25023
  buckets[index].push(this.w.seriesData.seriesNames[i2]);
24945
25024
  return index;
@@ -25222,12 +25301,12 @@ class Data {
25222
25301
  if (rootColors && x2 !== void 0) {
25223
25302
  rootColors[labels.length] = dataPoint.color;
25224
25303
  }
25225
- if (x2 !== void 0 && y !== void 0) {
25226
- labels.push(String(x2));
25227
- values.push(Utils$1.parseNumber(y));
25228
- } else if (x2 !== void 0 && Array.isArray(dataPoint.children)) {
25304
+ if (x2 !== void 0 && Array.isArray(dataPoint.children)) {
25229
25305
  labels.push(String(x2));
25230
25306
  values.push(subtreeTotal(dataPoint));
25307
+ } else if (x2 !== void 0 && y !== void 0) {
25308
+ labels.push(String(x2));
25309
+ values.push(Utils$1.parseNumber(y));
25231
25310
  } else {
25232
25311
  console.warn(
25233
25312
  "ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",
@@ -27164,6 +27243,13 @@ class Utils2 {
27164
27243
  const markers = this.getElMarkers(capturedSeries);
27165
27244
  return markers.length > 0;
27166
27245
  }
27246
+ /**
27247
+ * Whether any visible series has a marker node, its points' or its hover
27248
+ * dot's.
27249
+ */
27250
+ hasVisibleMarkers() {
27251
+ return this.getAllMarkers(true).some(Boolean);
27252
+ }
27167
27253
  /**
27168
27254
  * @param {any} point
27169
27255
  * @param {number} size
@@ -27610,11 +27696,11 @@ class Position {
27610
27696
  */
27611
27697
  placeAroundCell(cell, plot, {
27612
27698
  el = null,
27613
- ttWidth = ((_a) => (_a = this.ttCtx.tooltipRect) == null ? void 0 : _a.ttWidth)() || 0,
27614
- ttHeight = ((_b) => (_b = this.ttCtx.tooltipRect) == null ? void 0 : _b.ttHeight)() || 0
27699
+ ttWidth = ((_b) => (_b = this.ttCtx.tooltipRect) == null ? void 0 : _b.ttWidth)() || 0,
27700
+ ttHeight = ((_c) => (_c = this.ttCtx.tooltipRect) == null ? void 0 : _c.ttHeight)() || 0
27615
27701
  } = {}) {
27616
- var _a2;
27617
- if (!((_a2 = el == null ? void 0 : el.closest) == null ? void 0 : _a2.call(el, '[clip-path*="heatmapHexMask"]'))) {
27702
+ var _a;
27703
+ if (!((_a = el == null ? void 0 : el.closest) == null ? void 0 : _a.call(el, '[clip-path*="heatmapHexMask"]'))) {
27618
27704
  cell = this._visiblePart(cell, plot);
27619
27705
  }
27620
27706
  return this._placeAround(placeAroundCell, cell, plot, {
@@ -27685,11 +27771,11 @@ class Position {
27685
27771
  * @param {{ ttWidth?: number, ttHeight?: number, side?: 'left'|'right'|null, beside?: boolean }} [opts]
27686
27772
  * @returns {import('./placement').CellPlacement}
27687
27773
  */
27688
- _placeAround(decide, mark, plot, _e = {}) {
27689
- var _f = _e, {
27690
- ttWidth = ((_c) => (_c = this.ttCtx.tooltipRect) == null ? void 0 : _c.ttWidth)() || 0,
27691
- ttHeight = ((_d) => (_d = this.ttCtx.tooltipRect) == null ? void 0 : _d.ttHeight)() || 0
27692
- } = _f, rest = __objRest(_f, [
27774
+ _placeAround(decide, mark, plot, _f = {}) {
27775
+ var _g = _f, {
27776
+ ttWidth = ((_d) => (_d = this.ttCtx.tooltipRect) == null ? void 0 : _d.ttWidth)() || 0,
27777
+ ttHeight = ((_e) => (_e = this.ttCtx.tooltipRect) == null ? void 0 : _e.ttHeight)() || 0
27778
+ } = _g, rest = __objRest(_g, [
27693
27779
  "ttWidth",
27694
27780
  "ttHeight"
27695
27781
  ]);
@@ -31873,16 +31959,22 @@ class Tooltip {
31873
31959
  ttCtx.tooltipLabels.drawSeriesTexts(__spreadProps(__spreadValues({}, commonSeriesTextsParams), {
31874
31960
  shared: this.showOnIntersect ? false : this.tConfig.shared
31875
31961
  }));
31876
- if (hasMarkers || dynamicPoints) {
31962
+ const capturedPoints = hasMarkers || dynamicPoints;
31963
+ if (capturedPoints || w.globals.comboCharts && !canvasMode && this.tooltipUtil.hasVisibleMarkers()) {
31877
31964
  handlePoints();
31878
- } else if (this.tooltipUtil.hasBars()) {
31965
+ }
31966
+ if (this.tooltipUtil.hasBars()) {
31879
31967
  if (canvasMode) {
31880
- ttCtx.tooltipPosition.moveStickyTooltipOverBars(j2, capturedSeries);
31968
+ if (!capturedPoints) {
31969
+ ttCtx.tooltipPosition.moveStickyTooltipOverBars(j2, capturedSeries);
31970
+ }
31881
31971
  } else if ([...bars].some((b) => b.querySelector("path"))) {
31882
31972
  const graphics = new Graphics(this.w, this.ctx);
31883
31973
  const paths = w.dom.Paper.find(`.apexcharts-bar-area[j='${j2}']`);
31884
31974
  this.deactivateHoverFilter();
31885
- ttCtx.tooltipPosition.moveStickyTooltipOverBars(j2, capturedSeries);
31975
+ if (!capturedPoints) {
31976
+ ttCtx.tooltipPosition.moveStickyTooltipOverBars(j2, capturedSeries);
31977
+ }
31886
31978
  for (let b = 0; b < paths.length; b++) {
31887
31979
  graphics.pathMouseEnter(
31888
31980
  /** @type {any} */
@@ -32083,7 +32175,8 @@ class RendererController {
32083
32175
  this._activate(desired, this._instances[desired]);
32084
32176
  return this._activeKind;
32085
32177
  }
32086
- if (mode === desired) {
32178
+ if (mode === desired && !this._warned) {
32179
+ this._warned = 1;
32087
32180
  warnMissingFeature(
32088
32181
  `\`chart.renderer: '${desired}'\``,
32089
32182
  `renderer-${desired}`,
@@ -32092,11 +32185,17 @@ class RendererController {
32092
32185
  }
32093
32186
  );
32094
32187
  }
32095
- } else if (mode === "canvas" && hasCanvasUnsupportedFeature(this.w)) {
32188
+ } else if (mode === "canvas" && !this._warned && hasCanvasUnsupportedFeature(this.w)) {
32189
+ this._warned = 1;
32096
32190
  console.warn(
32097
32191
  `[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.`
32098
32192
  );
32099
32193
  }
32194
+ const prev = this._instances[this._activeKind];
32195
+ if (prev) {
32196
+ prev.destroy();
32197
+ delete this._instances[this._activeKind];
32198
+ }
32100
32199
  this._activate("svg", this.svg);
32101
32200
  return this._activeKind;
32102
32201
  }
@@ -33347,7 +33446,7 @@ class Destroy {
33347
33446
  if (isUpdating) {
33348
33447
  this.ctx._zoomPanSelection = null;
33349
33448
  this.ctx._toolbar = null;
33350
- (_e = this.ctx._keyboardNavigation) == null ? void 0 : _e.destroy();
33449
+ (_e = this.ctx._keyboardNavigation) == null ? void 0 : _e.destroy(true);
33351
33450
  this.ctx._keyboardNavigation = null;
33352
33451
  } else {
33353
33452
  (_f = this.ctx.perspectives) == null ? void 0 : _f.teardown();
@@ -33636,7 +33735,7 @@ function removeResizeListener(el, fn) {
33636
33735
  ros.delete(fn);
33637
33736
  }
33638
33737
  }
33639
- const apexCSS = '@keyframes opaque{0%{opacity:0}to{opacity:1}}.apexcharts-canvas{position:relative;direction:ltr!important;user-select:none;--apexcharts-focus-color: #008FFB}.apexcharts-canvas .apexcharts-theme-dark,.apexcharts-theme-dark.apexcharts-canvas{--apexcharts-focus-color: #FFD500}.apexcharts-canvas.apexcharts-high-contrast,.apexcharts-high-contrast.apexcharts-canvas{--apexcharts-focus-color: #FFFF00}.apexcharts-sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:before,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.apexcharts-canvas ::-webkit-scrollbar{-webkit-appearance:none;width:6px}.apexcharts-canvas ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#00000080;box-shadow:0 0 1px #ffffff80;-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}.apexcharts-inner{position:relative}.apexcharts-text tspan{font-family:inherit}rect.legend-mouseover-inactive,.legend-mouseover-inactive rect,.legend-mouseover-inactive path,.legend-mouseover-inactive circle,.legend-mouseover-inactive line,.legend-mouseover-inactive text.apexcharts-yaxis-title-text,.legend-mouseover-inactive text.apexcharts-yaxis-label{transition:.15s ease all;opacity:.2}.apexcharts-crossfilter-dimmed{transition:opacity .25s ease;opacity:var(--apx-cf-dim, .2)}.apexcharts-cf-table{border-collapse:collapse;width:100%;font-size:13px}.apexcharts-cf-table caption{caption-side:bottom;text-align:right;padding:6px 2px;font-size:12px;opacity:.7}.apexcharts-cf-table th,.apexcharts-cf-table td{padding:6px 10px;text-align:left;border-bottom:1px solid rgba(0,0,0,.08)}.apexcharts-cf-table th{font-weight:600;border-bottom-width:2px}.apexcharts-cf-table tbody tr:hover{background:#6366f10f}.apexcharts-canvas{--apx-measure-up: #16a34a;--apx-measure-down: #dc2626;--apx-measure-neutral: #64748b;--apx-measure-guide: #94a3b8}.apexcharts-measure-capture{cursor:crosshair}.apexcharts-canvas{--apx-menu-bg: #ffffff;--apx-menu-fg: #1e293b;--apx-menu-border: #e2e8f0;--apx-menu-hover: #f1f5f9;--apx-menu-shadow: rgba(15, 23, 42, .18)}.apexcharts-context-menu{min-width:168px;padding:4px;border-radius:8px;background:var(--apx-menu-bg);border:1px solid var(--apx-menu-border);box-shadow:0 6px 22px var(--apx-menu-shadow);font-family:Helvetica,Arial,sans-serif;font-size:13px;z-index:20;user-select:none}.apexcharts-context-menu-item{display:block;width:100%;box-sizing:border-box;text-align:left;padding:7px 12px;border:0;border-radius:5px;background:transparent;color:var(--apx-menu-fg);font:inherit;cursor:pointer}.apexcharts-context-menu-item:hover,.apexcharts-context-menu-item--active{background:var(--apx-menu-hover)}.apexcharts-context-menu-item:focus{outline:none}.apexcharts-canvas{--apx-ink-card-bg: #ffffff;--apx-ink-card-fg: #1e293b;--apx-ink-card-border: #e2e8f0;--apx-ink-card-hover: #f1f5f9;--apx-ink-card-accent: #6366f1;--apx-ink-card-shadow: rgba(15, 23, 42, .18)}.apexcharts-ink-card{position:absolute;z-index:25;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:8px;background:var(--apx-ink-card-bg);border:1px solid var(--apx-ink-card-border);box-shadow:0 6px 22px var(--apx-ink-card-shadow);font-family:Helvetica,Arial,sans-serif;font-size:12px;color:var(--apx-ink-card-fg);user-select:none}.apexcharts-ink-card-row{display:flex;align-items:center;gap:4px}.apexcharts-ink-card input.apexcharts-ink-editor{flex:1 1 auto;width:150px;min-width:0;box-sizing:border-box;padding:4px 6px;font:inherit;color:inherit;background:transparent;border:1px solid var(--apx-ink-card-border);border-radius:5px}.apexcharts-ink-card input.apexcharts-ink-editor:focus{outline:none;border-color:var(--apx-ink-card-accent)}.apexcharts-ink-btn{flex:0 0 auto;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:12px;line-height:1;cursor:pointer}.apexcharts-ink-btn:hover,.apexcharts-ink-btn--active{background:var(--apx-ink-card-hover)}.apexcharts-ink-btn:focus-visible,.apexcharts-ink-swatch:focus-visible{outline:2px solid var(--apx-ink-card-accent);outline-offset:1px}.apexcharts-ink-btn--bold{font-weight:700}.apexcharts-ink-btn--delete:hover{color:#dc2626}.apexcharts-ink-swatch{flex:0 0 auto;width:16px;height:16px;padding:0;border:1px solid rgba(100,116,139,.45);border-radius:50%;cursor:pointer}.apexcharts-ink-swatch--active{box-shadow:0 0 0 2px var(--apx-ink-card-bg),0 0 0 4px var(--apx-ink-card-accent)}.apexcharts-ink-sep{flex:0 0 auto;width:1px;height:16px;margin:0 2px;background:var(--apx-ink-card-border)}.apexcharts-ink-cardlabel{flex:0 0 auto;font-size:10px;letter-spacing:.4px;text-transform:uppercase;opacity:.65;margin-right:2px}.apexcharts-ink-marker-size{flex:0 0 auto;min-width:16px;text-align:center;font-variant-numeric:tabular-nums}.apexcharts-legend-text{padding-left:15px;margin-left:-15px}.apexcharts-legend-series[role=button]:focus{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-legend-series[role=button]:focus:not(:focus-visible){outline:none}.apexcharts-legend-series[role=button]:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-series-collapsed{opacity:0}.apexcharts-series-collapsed.apexcharts-series-collapsing{opacity:1}.apexcharts-datalabels.apexcharts-series-collapsing{animation:apexcharts-datalabels-exit var(--apexcharts-dl-exit, .4s) ease-in forwards}@keyframes apexcharts-datalabels-exit{0%{opacity:1}to{opacity:0}}.apexcharts-canvas svg:focus:not(:focus-visible){outline:none}.apexcharts-bar-area.apexcharts-keyboard-focused,.apexcharts-candlestick-area.apexcharts-keyboard-focused,.apexcharts-boxPlot-area.apexcharts-keyboard-focused,.apexcharts-violin-area.apexcharts-keyboard-focused,.apexcharts-rangebar-area.apexcharts-keyboard-focused,.apexcharts-pie-area.apexcharts-keyboard-focused,.apexcharts-heatmap-rect.apexcharts-keyboard-focused,.apexcharts-treemap-rect.apexcharts-keyboard-focused,.apexcharts-keyboard-focus-ring{stroke:var(--apexcharts-focus-color, #008FFB);stroke-width:2;stroke-opacity:1}.apexcharts-keyboard-focus-ring{fill:none;pointer-events:none}.apexcharts-tooltip{--apx-tt-bg: #ffffff;--apx-tt-border: rgba(15, 23, 42, .12);--apx-tt-shadow-dir: 1;--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, .06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, .1), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, .14);--apx-tt-arrow-bg: var(--apx-tt-bg);--apx-tt-color: #0f172a;--apx-tt-color-muted: rgba(15, 23, 42, .55);border-radius:8px;background:var(--apx-tt-bg);border:1px solid var(--apx-tt-border);box-shadow:var(--apx-tt-shadow);color:var(--apx-tt-color);cursor:default;font-size:13px;left:0;top:0;opacity:0;pointer-events:none;position:absolute;display:flex;flex-direction:column;padding:2px 0;white-space:nowrap;z-index:12;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-active{opacity:1;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-tooltip-interactive.apexcharts-active{pointer-events:auto}.apexcharts-tooltip.apexcharts-active[data-positioned=true]{transition:opacity .12s ease,left .16s ease-out,top .16s ease-out}.apexcharts-tooltip.apexcharts-theme-dark{--apx-tt-bg: #1c1c1f;--apx-tt-border: rgba(255, 255, 255, .16);--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, .24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, .3), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, .38);--apx-tt-color: #f3f4f6;--apx-tt-color-muted: rgba(243, 244, 246, .55)}.apexcharts-tooltip *{font-family:inherit}.apexcharts-tooltip.apexcharts-annotation-tooltip{padding:6px 10px;max-width:240px;white-space:normal;line-height:1.4;pointer-events:none;z-index:13}.apexcharts-tooltip-title{padding:8px 12px 4px;font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--apx-tt-color-muted);background:transparent;border-bottom:none;margin-bottom:0}.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title{background:transparent;border-bottom:none}.apexcharts-tooltip.apexcharts-tooltip-fill-series{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;padding:0;overflow:hidden;color:#fff}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title{background:#00000038;color:#fff;opacity:1;padding:6px 12px}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group{color:#fff}.apexcharts-tooltip-arrow{position:absolute;box-sizing:border-box;width:10px;height:10px;background:var(--apx-tt-arrow-bg);transform:rotate(45deg);pointer-events:none;top:calc(var(--apx-tt-arrow-y, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=right] .apexcharts-tooltip-arrow{left:-6px;border-left:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=left] .apexcharts-tooltip-arrow{right:-6px;border-top:1px solid var(--apx-tt-border);border-right:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow,.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:auto;left:calc(var(--apx-tt-arrow-x, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow{bottom:-6px;border-right:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:-6px;border-top:1px solid var(--apx-tt-border);border-left:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom]{--apx-tt-shadow-dir: -1 }.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value{display:inline-block;margin-left:5px;font-weight:600}.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty{display:none}.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{padding:6px 0 5px}.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{display:flex}.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty){margin-top:-6px}.apexcharts-tooltip-marker{display:inline-flex;align-items:center;justify-content:center;position:relative;width:12px;height:12px;margin-right:6px;vertical-align:middle;color:inherit}.apexcharts-tooltip-marker svg{width:100%;height:100%;display:block}.apexcharts-tooltip-series-group{padding:4px 12px;display:none;gap:8px;text-align:left;justify-content:left;align-items:center}.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker{opacity:1}.apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-series-group:last-child{padding-bottom:8px}.apexcharts-tooltip-y-group{padding:6px 0 5px}.apexcharts-tooltip.apexcharts-tooltip-compact{padding:3px 8px;font-size:11px;line-height:1.35}.apexcharts-tooltip-compact .apexcharts-tooltip-title{padding:0;font-size:11px;white-space:nowrap}.apexcharts-tooltip-compact .apexcharts-tooltip-series-group,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group:last-child{padding:0;gap:5px}.apexcharts-tooltip-compact .apexcharts-tooltip-y-group{padding:0}.apexcharts-tooltip-compact .apexcharts-tooltip-marker{width:8px;height:8px}.apexcharts-tooltip.apexcharts-tooltip-compact.apexcharts-tooltip-value-only{flex-direction:row;align-items:baseline;gap:6px}.apexcharts-tooltip-value-only .apexcharts-tooltip-marker,.apexcharts-tooltip-value-only .apexcharts-tooltip-text-y-label{display:none}.apexcharts-custom-tooltip,.apexcharts-tooltip-box{padding:4px 8px}.apexcharts-tooltip-boxPlot{display:flex;flex-direction:column-reverse}.apexcharts-tooltip-box>div{margin:4px 0}.apexcharts-tooltip-box span.value{font-weight:700}.apexcharts-tooltip-rangebar{padding:5px 8px}.apexcharts-tooltip-rangebar .category{font-weight:600;color:#777}.apexcharts-tooltip-rangebar .series-name{font-weight:700;display:block;margin-bottom:5px}.apexcharts-tooltip-stream{padding:5px 8px}.apexcharts-tooltip-stream .apexcharts-tooltip-title{background:transparent;border:0;padding:0 0 4px;margin:0;font-weight:700}.apexcharts-tooltip-stream-band{display:flex;align-items:center;gap:5px;line-height:1.6;opacity:.72}.apexcharts-tooltip-stream-band.apexcharts-active{opacity:1;font-weight:700}.apexcharts-tooltip-stream-band .series-name{flex:1 1 auto;margin-right:8px}.apexcharts-tooltip-stream-band .value{font-weight:700;margin-left:auto}.apexcharts-tooltip-stream-total{display:flex;align-items:center;margin-top:4px;padding-top:4px;border-top:1px solid var(--apx-tt-border, rgba(15, 23, 42, .12))}.apexcharts-tooltip-stream-total .series-name{flex:1 1 auto;font-weight:600}.apexcharts-tooltip-stream-total .value{font-weight:700;margin-left:auto}.apexcharts-streamgraph-label{pointer-events:none}.apexcharts-xaxistooltip,.apexcharts-yaxistooltip{--apx-axt-bg: #ffffff;--apx-axt-border: rgba(15, 23, 42, .08);--apx-axt-color: #0f172a;--apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, .18), 0 1px 3px -1px rgba(15, 23, 42, .12);opacity:0;pointer-events:none;color:var(--apx-axt-color);font-size:12px;font-weight:500;text-align:center;border-radius:6px;position:absolute;z-index:10;background:var(--apx-axt-bg);border:1px solid var(--apx-axt-border);box-shadow:var(--apx-axt-shadow)}.apexcharts-xaxistooltip.apexcharts-theme-dark,.apexcharts-yaxistooltip.apexcharts-theme-dark{--apx-axt-bg: #1c1c1f;--apx-axt-border: rgba(255, 255, 255, .1);--apx-axt-color: #f3f4f6;--apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, .55), 0 1px 3px -1px rgba(0, 0, 0, .45) }.apexcharts-xaxistooltip{padding:4px 8px;transition:.15s ease all}.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before{left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-xaxistooltip:after{border-color:transparent;border-width:5px;margin-left:-5px}.apexcharts-xaxistooltip:before{border-color:transparent;border-width:6px;margin-left:-6px}.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before{bottom:100%}.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before{top:100%}.apexcharts-xaxistooltip-bottom:after{border-bottom-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-bottom:before{border-bottom-color:var(--apx-axt-border)}.apexcharts-xaxistooltip-top:after{border-top-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-top:before{border-top-color:var(--apx-axt-border)}.apexcharts-xaxistooltip.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-yaxistooltip{padding:3px 8px}.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before{top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-yaxistooltip:after{border-color:transparent;border-width:5px;margin-top:-5px}.apexcharts-yaxistooltip:before{border-color:transparent;border-width:6px;margin-top:-6px}.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before{left:100%}.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before{right:100%}.apexcharts-yaxistooltip-left:after{border-left-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-left:before{border-left-color:var(--apx-axt-border)}.apexcharts-yaxistooltip-right:after{border-right-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-right:before{border-right-color:var(--apx-axt-border)}.apexcharts-yaxistooltip.apexcharts-active{opacity:1}.apexcharts-yaxistooltip-hidden{display:none}.apexcharts-xcrosshairs,.apexcharts-ycrosshairs{pointer-events:none;opacity:0;transition:.15s ease all}.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-ycrosshairs-hidden{opacity:0}.apexcharts-selection-rect{cursor:move}.svg_select_shape{stroke-width:1;stroke-dasharray:10 10;stroke:#000;stroke-opacity:.1;pointer-events:none;fill:none}.svg_select_handle{stroke-width:3;stroke:#000;fill:none}.svg_select_handle_r{cursor:e-resize}.svg_select_handle_l{cursor:w-resize}.apexcharts-svg.apexcharts-zoomable.hovering-zoom{cursor:crosshair}.apexcharts-svg.apexcharts-zoomable.hovering-pan{cursor:move}.apexcharts-menu-icon,.apexcharts-measure-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon{cursor:pointer;width:26px;height:24px;line-height:24px;color:#6e8192;text-align:center;padding:0;margin:0;background:transparent;border:0;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;transition:background-color .12s ease,color .12s ease}.apexcharts-menu-icon svg,.apexcharts-measure-icon svg,.apexcharts-pan-icon svg,.apexcharts-reset-icon svg,.apexcharts-selection-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.apexcharts-theme-dark .apexcharts-menu-icon,.apexcharts-theme-dark .apexcharts-measure-icon,.apexcharts-theme-dark .apexcharts-pan-icon,.apexcharts-theme-dark .apexcharts-reset-icon,.apexcharts-theme-dark .apexcharts-selection-icon,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,.apexcharts-theme-dark .apexcharts-zoom-icon,.apexcharts-theme-dark .apexcharts-zoomin-icon,.apexcharts-theme-dark .apexcharts-zoomout-icon{color:#d4d6dc}.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected{background:#008ffb1f;color:#008ffb}.apexcharts-theme-light .apexcharts-menu-icon:hover,.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-reset-icon:hover,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoomin-icon:hover,.apexcharts-theme-light .apexcharts-zoomout-icon:hover{background:#0f172a0f;color:#1f2937}.apexcharts-theme-dark .apexcharts-menu-icon:hover,.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-reset-icon:hover,.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,.apexcharts-theme-dark .apexcharts-zoomout-icon:hover{background:#ffffff14;color:#fff}.apexcharts-menu-icon,.apexcharts-selection-icon{position:relative}.apexcharts-toolbar{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:1px;padding:3px;border-radius:8px;background:#ffffffd9;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.apexcharts-theme-dark .apexcharts-toolbar{background:#1c1c1fd1}.apexcharts-menu{background:#fffffff2;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);position:absolute;top:calc(100% + 4px);border:1px solid rgba(15,23,42,.08);border-radius:8px;padding:4px;right:0;opacity:0;min-width:120px;transition:opacity .15s ease,transform .15s ease;transform:translateY(-2px);pointer-events:none;box-shadow:0 4px 16px -4px #0f172a1f,0 2px 4px -1px #0f172a0f}.apexcharts-menu.apexcharts-menu-open{opacity:1;transform:translateY(0);pointer-events:all}.apexcharts-menu-item{padding:6px 9px;font-size:12px;border-radius:5px;cursor:pointer}.apexcharts-theme-light .apexcharts-menu-item:hover{background:#0f172a0f}.apexcharts-theme-dark .apexcharts-menu{background:#1c1c1feb;border-color:#ffffff14;color:#f3f4f6;box-shadow:0 4px 16px -4px #00000080,0 2px 4px -1px #0006}.apexcharts-theme-dark .apexcharts-menu-item:hover{background:#ffffff14}@media screen and (min-width:768px){.apexcharts-canvas:hover .apexcharts-toolbar{opacity:1}}.apexcharts-toolbar:focus-within{opacity:1}.apexcharts-menu-icon:focus-visible,.apexcharts-measure-icon:focus-visible,.apexcharts-pan-icon:focus-visible,.apexcharts-reset-icon:focus-visible,.apexcharts-selection-icon:focus-visible,.apexcharts-toolbar-custom-icon:focus-visible,.apexcharts-zoom-icon:focus-visible,.apexcharts-zoomin-icon:focus-visible,.apexcharts-zoomout-icon:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:1px;border-radius:5px}.apexcharts-menu-item:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:-2px;background:#eee}.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points{opacity:0}.apexcharts-hidden-element-shown{opacity:1;transition:.25s ease all}.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label,.apexcharts-pie-name-label,.apexcharts-pie-name-label-group,.apexcharts-pie-label-connector,.apexcharts-unit-outer-label,.apexcharts-unit-outer-label-group,.apexcharts-unit-label-connector{cursor:default;pointer-events:none}.apexcharts-pie-label-connector,.apexcharts-unit-label-connector{fill:none}.apexcharts-pie-label-delay,.apexcharts-unit-label-delay{opacity:0;animation-name:opaque;animation-duration:.3s;animation-fill-mode:forwards;animation-timing-function:ease}.apexcharts-unit-label-delay{animation-duration:.5s}.apexcharts-radialbar-label{cursor:pointer}.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-gridline,.apexcharts-line,.apexcharts-point-annotation-label,.apexcharts-radar-series path:not(.apexcharts-marker),.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect,.no-pointer-events{pointer-events:none}.apexcharts-tooltip-active .apexcharts-marker{transition:.15s ease all}.apexcharts-radar-series .apexcharts-yaxis,.apexcharts-bar-goals-markers,.apexcharts-bar-shadows,.apexcharts-rangebar-goals-markers{pointer-events:none}.apexcharts-drilldown-target{cursor:pointer}.apexcharts-breadcrumb{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:2px;font-size:12px;font-family:inherit;padding:2px 4px}.apexcharts-breadcrumb-item{background:transparent;border:none;padding:2px 6px;border-radius:3px;font:inherit;color:inherit;cursor:pointer;line-height:1.2}.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#00000014}.apexcharts-breadcrumb-arrow{margin-right:4px;font-weight:600;user-select:none}.apexcharts-breadcrumb-current{cursor:default;font-weight:600;opacity:.85}.apexcharts-breadcrumb-separator{opacity:.5;user-select:none}.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#ffffff1f}.apexcharts-drilldown-loading{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;font-family:inherit;color:inherit;background:#ffffff9e;cursor:progress}.apexcharts-drilldown-loading-spinner{width:26px;height:26px;border-radius:50%;border:2.5px solid rgba(0,0,0,.16);border-top-color:#0000008c;animation:apexcharts-drilldown-spin .7s linear infinite}.apexcharts-drilldown-loading-text{opacity:.8}.apexcharts-theme-dark .apexcharts-drilldown-loading{background:#1e1e1e9e}.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner{border-color:#ffffff38;border-top-color:#ffffffb3}@keyframes apexcharts-drilldown-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) .apexcharts-drilldown-loading-spinner{animation:apexcharts-drilldown-pulse 1.4s ease-in-out infinite!important}@keyframes apexcharts-drilldown-pulse{0%,to{opacity:.35}50%{opacity:1}}}.apexcharts-disable-transitions *{transition:none!important}.apexcharts-trellis{position:relative}.apexcharts-trellis-grid{display:grid}.apexcharts-trellis-cell{min-width:0;position:relative}.apexcharts-trellis-header{font-size:12px;font-weight:600;line-height:22px;height:22px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-title{font-size:14px;font-weight:700;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:0}.apexcharts-trellis-has-toolbar{padding-top:24px}.apexcharts-trellis-strip{font-size:12px;font-weight:600;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-strip-column{text-align:center;line-height:22px;height:22px;align-self:end}.apexcharts-trellis-strip-row{align-self:center;max-width:140px;padding-right:6px}.apexcharts-trellis-cell-empty{position:relative}.apexcharts-trellis-empty-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.45;pointer-events:none}.apexcharts-trellis-cell-hidden>*{visibility:hidden}.apexcharts-trellis-gradient-legend{margin:10px auto 0}.apexcharts-trellis-panel.apexcharts-trellis-skeleton{background:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.05;border-radius:4px}.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis-tooltip{position:absolute;top:0;left:0;z-index:14;pointer-events:none;opacity:0;transition:opacity .1s ease;background:var(--apx-bg, #fff);color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;font-size:12px;min-width:140px;max-width:320px}.apexcharts-trellis-tooltip-active{opacity:1}.apexcharts-trellis-tooltip .apexcharts-tooltip-title{padding:5px 10px;font-weight:600;background:#78787814;border-bottom:1px solid rgba(120,120,120,.18);margin-bottom:2px}.apexcharts-trellis-tooltip-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:2px 10px;line-height:1.6}.apexcharts-trellis-tooltip-row-active{background:#7878781a;font-weight:600}.apexcharts-trellis-tooltip-key{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-tooltip-vals{display:flex;gap:10px;white-space:nowrap}.apexcharts-trellis-tooltip-val{display:inline-flex;align-items:center;gap:5px}.apexcharts-trellis-tooltip-marker{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}.apexcharts-trellis-cell-promoted{grid-column:1 / -1}.apexcharts-trellis-cell-parked{display:none}.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:1}.apexcharts-trellis-header-clickable{cursor:pointer}.apexcharts-trellis-header-clickable:hover{text-decoration:underline;text-underline-offset:3px}.apexcharts-trellis-breadcrumb{display:flex;align-items:center;gap:6px;font-size:12px;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-breadcrumb-back{border:none;background:none;padding:0;font-size:12px;cursor:pointer;color:var(--apx-accent, #008ffb)}.apexcharts-trellis-breadcrumb-back:hover{text-decoration:underline}.apexcharts-trellis-breadcrumb-sep{opacity:.5}.apexcharts-trellis-breadcrumb-current{font-weight:600}.apexcharts-trellis-menu{position:absolute;top:26px;right:0;display:none;flex-direction:column;min-width:132px;background:var(--apx-bg, #fff);border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;padding:4px;z-index:15}.apexcharts-trellis-menu-open{display:flex}.apexcharts-trellis-menu-item{border:none;background:none;text-align:left;font-size:12px;padding:5px 8px;border-radius:3px;cursor:pointer;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-menu-item:hover{background:#7878781f}.apexcharts-trellis-toolbar{position:absolute;top:0;right:0;display:flex;gap:2px;z-index:12}.apexcharts-trellis-tool{border:0;background:transparent;padding:2px;cursor:pointer;border-radius:3px;color:#6e8192;line-height:0}.apexcharts-trellis-tool:hover{color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-tool.apexcharts-selected{color:var(--apx-accent, #008ffb)}.apexcharts-trellis-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;padding:8px 10px 2px}.apexcharts-trellis-legend-item{display:flex;align-items:center;gap:6px;cursor:pointer;line-height:1}.apexcharts-trellis-legend-item .apexcharts-legend-marker{width:12px;height:12px;border-radius:50%;display:inline-block}.apexcharts-trellis-legend-item .apexcharts-legend-text{font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-legend-item.apexcharts-inactive-legend{opacity:.45}@media print{.apexcharts-canvas.apexcharts-printing,.apexcharts-canvas.apexcharts-printing svg{max-width:100%!important}.apexcharts-canvas.apexcharts-printing svg{height:auto!important}.apexcharts-canvas.apexcharts-printing{height:auto!important}.apexcharts-toolbar{display:none!important}}';
33738
+ const apexCSS = '@keyframes opaque{0%{opacity:0}to{opacity:1}}.apexcharts-canvas{position:relative;direction:ltr!important;user-select:none;--apexcharts-focus-color: #008FFB}.apexcharts-canvas .apexcharts-theme-dark,.apexcharts-theme-dark.apexcharts-canvas{--apexcharts-focus-color: #FFD500}.apexcharts-canvas.apexcharts-high-contrast,.apexcharts-high-contrast.apexcharts-canvas{--apexcharts-focus-color: #FFFF00}.apexcharts-sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:before,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.apexcharts-canvas ::-webkit-scrollbar{-webkit-appearance:none;width:6px}.apexcharts-canvas ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#00000080;box-shadow:0 0 1px #ffffff80;-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}.apexcharts-inner{position:relative}.apexcharts-text tspan{font-family:inherit}rect.legend-mouseover-inactive,.legend-mouseover-inactive rect,.legend-mouseover-inactive path,.legend-mouseover-inactive circle,.legend-mouseover-inactive line,.legend-mouseover-inactive text.apexcharts-yaxis-title-text,.legend-mouseover-inactive text.apexcharts-yaxis-label{transition:.15s ease all;opacity:.2}.apexcharts-crossfilter-dimmed{transition:opacity .25s ease;opacity:var(--apx-cf-dim, .2)}.apexcharts-cf-table{border-collapse:collapse;width:100%;font-size:13px}.apexcharts-cf-table caption{caption-side:bottom;text-align:right;padding:6px 2px;font-size:12px;opacity:.7}.apexcharts-cf-table th,.apexcharts-cf-table td{padding:6px 10px;text-align:left;border-bottom:1px solid rgba(0,0,0,.08)}.apexcharts-cf-table th{font-weight:600;border-bottom-width:2px}.apexcharts-cf-table tbody tr:hover{background:#6366f10f}.apexcharts-canvas{--apx-measure-up: #16a34a;--apx-measure-down: #dc2626;--apx-measure-neutral: #64748b;--apx-measure-guide: #94a3b8}.apexcharts-measure-capture{cursor:crosshair}.apexcharts-canvas{--apx-menu-bg: #ffffff;--apx-menu-fg: #1e293b;--apx-menu-border: #e2e8f0;--apx-menu-hover: #f1f5f9;--apx-menu-shadow: rgba(15, 23, 42, .18)}.apexcharts-context-menu{min-width:168px;padding:4px;border-radius:8px;background:var(--apx-menu-bg);border:1px solid var(--apx-menu-border);box-shadow:0 6px 22px var(--apx-menu-shadow);font-family:Helvetica,Arial,sans-serif;font-size:13px;z-index:20;user-select:none}.apexcharts-context-menu-item{display:block;width:100%;box-sizing:border-box;text-align:left;padding:7px 12px;border:0;border-radius:5px;background:transparent;color:var(--apx-menu-fg);font:inherit;cursor:pointer}.apexcharts-context-menu-item:hover,.apexcharts-context-menu-item--active{background:var(--apx-menu-hover)}.apexcharts-context-menu-item:focus{outline:none}.apexcharts-canvas{--apx-ink-card-bg: #ffffff;--apx-ink-card-fg: #1e293b;--apx-ink-card-border: #e2e8f0;--apx-ink-card-hover: #f1f5f9;--apx-ink-card-accent: #6366f1;--apx-ink-card-shadow: rgba(15, 23, 42, .18)}.apexcharts-ink-card{position:absolute;z-index:25;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:8px;background:var(--apx-ink-card-bg);border:1px solid var(--apx-ink-card-border);box-shadow:0 6px 22px var(--apx-ink-card-shadow);font-family:Helvetica,Arial,sans-serif;font-size:12px;color:var(--apx-ink-card-fg);user-select:none}.apexcharts-ink-card-row{display:flex;align-items:center;gap:4px}.apexcharts-ink-card input.apexcharts-ink-editor{flex:1 1 auto;width:150px;min-width:0;box-sizing:border-box;padding:4px 6px;font:inherit;color:inherit;background:transparent;border:1px solid var(--apx-ink-card-border);border-radius:5px}.apexcharts-ink-card input.apexcharts-ink-editor:focus{outline:none;border-color:var(--apx-ink-card-accent)}.apexcharts-ink-btn{flex:0 0 auto;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:12px;line-height:1;cursor:pointer}.apexcharts-ink-btn:hover,.apexcharts-ink-btn--active{background:var(--apx-ink-card-hover)}.apexcharts-ink-btn:focus-visible,.apexcharts-ink-swatch:focus-visible{outline:2px solid var(--apx-ink-card-accent);outline-offset:1px}.apexcharts-ink-btn--bold{font-weight:700}.apexcharts-ink-btn--delete:hover{color:#dc2626}.apexcharts-ink-swatch{flex:0 0 auto;width:16px;height:16px;padding:0;border:1px solid rgba(100,116,139,.45);border-radius:50%;cursor:pointer}.apexcharts-ink-swatch--active{box-shadow:0 0 0 2px var(--apx-ink-card-bg),0 0 0 4px var(--apx-ink-card-accent)}.apexcharts-ink-sep{flex:0 0 auto;width:1px;height:16px;margin:0 2px;background:var(--apx-ink-card-border)}.apexcharts-ink-cardlabel{flex:0 0 auto;font-size:10px;letter-spacing:.4px;text-transform:uppercase;opacity:.65;margin-right:2px}.apexcharts-ink-marker-size{flex:0 0 auto;min-width:16px;text-align:center;font-variant-numeric:tabular-nums}.apexcharts-legend-text{padding-left:15px;margin-left:-15px}.apexcharts-legend-series[role=button]:focus{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-legend-series[role=button]:focus:not(:focus-visible){outline:none}.apexcharts-legend-series[role=button]:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-series-collapsed{opacity:0}.apexcharts-series-collapsed.apexcharts-series-collapsing{opacity:1}.apexcharts-datalabels.apexcharts-series-collapsing{animation:apexcharts-datalabels-exit var(--apexcharts-dl-exit, .4s) ease-in forwards}@keyframes apexcharts-datalabels-exit{0%{opacity:1}to{opacity:0}}.apexcharts-canvas svg:focus:not(:focus-visible){outline:none}.apexcharts-bar-area.apexcharts-keyboard-focused,.apexcharts-candlestick-area.apexcharts-keyboard-focused,.apexcharts-boxPlot-area.apexcharts-keyboard-focused,.apexcharts-violin-area.apexcharts-keyboard-focused,.apexcharts-rangebar-area.apexcharts-keyboard-focused,.apexcharts-pie-area.apexcharts-keyboard-focused,.apexcharts-heatmap-rect.apexcharts-keyboard-focused,.apexcharts-treemap-rect.apexcharts-keyboard-focused,.apexcharts-keyboard-focus-ring{stroke:var(--apexcharts-focus-color, #008FFB);stroke-width:2;stroke-opacity:1}.apexcharts-keyboard-focus-ring{fill:none;pointer-events:none}.apexcharts-tooltip{--apx-tt-bg: #ffffff;--apx-tt-border: rgba(15, 23, 42, .12);--apx-tt-shadow-dir: 1;--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, .06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, .1), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, .14);--apx-tt-arrow-bg: var(--apx-tt-bg);--apx-tt-color: #0f172a;--apx-tt-color-muted: rgba(15, 23, 42, .55);border-radius:8px;background:var(--apx-tt-bg);border:1px solid var(--apx-tt-border);box-shadow:var(--apx-tt-shadow);color:var(--apx-tt-color);cursor:default;font-size:13px;left:0;top:0;opacity:0;pointer-events:none;position:absolute;display:flex;flex-direction:column;padding:2px 0;white-space:nowrap;z-index:12;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-active{opacity:1;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-tooltip-interactive.apexcharts-active{pointer-events:auto}.apexcharts-tooltip.apexcharts-active[data-positioned=true]{transition:opacity .12s ease,left .16s ease-out,top .16s ease-out}.apexcharts-tooltip.apexcharts-theme-dark{--apx-tt-bg: #1c1c1f;--apx-tt-border: rgba(255, 255, 255, .16);--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, .24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, .3), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, .38);--apx-tt-color: #f3f4f6;--apx-tt-color-muted: rgba(243, 244, 246, .55)}.apexcharts-tooltip *{font-family:inherit}.apexcharts-tooltip.apexcharts-annotation-tooltip{padding:6px 10px;max-width:240px;white-space:normal;line-height:1.4;pointer-events:none;z-index:13}.apexcharts-tooltip-title{padding:8px 12px 4px;font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--apx-tt-color-muted);background:transparent;border-bottom:none;margin-bottom:0}.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title{background:transparent;border-bottom:none}.apexcharts-tooltip.apexcharts-tooltip-fill-series{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;padding:0;overflow:hidden;color:#fff}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title{background:#00000038;color:#fff;opacity:1;padding:6px 12px}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group{color:#fff}.apexcharts-tooltip-arrow{position:absolute;box-sizing:border-box;width:10px;height:10px;background:var(--apx-tt-arrow-bg);transform:rotate(45deg);pointer-events:none;top:calc(var(--apx-tt-arrow-y, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=right] .apexcharts-tooltip-arrow{left:-6px;border-left:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=left] .apexcharts-tooltip-arrow{right:-6px;border-top:1px solid var(--apx-tt-border);border-right:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow,.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:auto;left:calc(var(--apx-tt-arrow-x, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow{bottom:-6px;border-right:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:-6px;border-top:1px solid var(--apx-tt-border);border-left:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom]{--apx-tt-shadow-dir: -1 }.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value{display:inline-block;margin-left:5px;font-weight:600}.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty{display:none}.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{padding:6px 0 5px}.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{display:flex}.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty){margin-top:-6px}.apexcharts-tooltip-marker{display:inline-flex;align-items:center;justify-content:center;position:relative;width:12px;height:12px;margin-right:6px;vertical-align:middle;color:inherit}.apexcharts-tooltip-marker svg{width:100%;height:100%;display:block}.apexcharts-tooltip-series-group{padding:4px 12px;display:none;gap:8px;text-align:left;justify-content:left;align-items:center}.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker{opacity:1}.apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-series-group:last-child{padding-bottom:8px}.apexcharts-tooltip-y-group{padding:6px 0 5px}.apexcharts-tooltip.apexcharts-tooltip-compact{padding:3px 8px;font-size:11px;line-height:1.35}.apexcharts-tooltip-compact .apexcharts-tooltip-title{padding:0;font-size:11px;white-space:nowrap}.apexcharts-tooltip-compact .apexcharts-tooltip-series-group,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group:last-child{padding:0;gap:5px}.apexcharts-tooltip-compact .apexcharts-tooltip-y-group{padding:0}.apexcharts-tooltip-compact .apexcharts-tooltip-marker{width:8px;height:8px}.apexcharts-tooltip.apexcharts-tooltip-compact.apexcharts-tooltip-value-only{flex-direction:row;align-items:baseline;gap:6px}.apexcharts-tooltip-value-only .apexcharts-tooltip-marker,.apexcharts-tooltip-value-only .apexcharts-tooltip-text-y-label{display:none}.apexcharts-custom-tooltip,.apexcharts-tooltip-box{padding:4px 8px}.apexcharts-tooltip-boxPlot{display:flex;flex-direction:column-reverse}.apexcharts-tooltip-box>div{margin:4px 0}.apexcharts-tooltip-box span.value{font-weight:700}.apexcharts-tooltip-rangebar{padding:5px 8px}.apexcharts-tooltip-rangebar .category{font-weight:600;color:#777}.apexcharts-tooltip-rangebar .series-name{font-weight:700;display:block;margin-bottom:5px}.apexcharts-tooltip-stream{padding:5px 8px}.apexcharts-tooltip-stream .apexcharts-tooltip-title{background:transparent;border:0;padding:0 0 4px;margin:0;font-weight:700}.apexcharts-tooltip-stream-band{display:flex;align-items:center;gap:5px;line-height:1.6;opacity:.72}.apexcharts-tooltip-stream-band.apexcharts-active{opacity:1;font-weight:700}.apexcharts-tooltip-stream-band .series-name{flex:1 1 auto;margin-right:8px}.apexcharts-tooltip-stream-band .value{font-weight:700;margin-left:auto}.apexcharts-tooltip-stream-total{display:flex;align-items:center;margin-top:4px;padding-top:4px;border-top:1px solid var(--apx-tt-border, rgba(15, 23, 42, .12))}.apexcharts-tooltip-stream-total .series-name{flex:1 1 auto;font-weight:600}.apexcharts-tooltip-stream-total .value{font-weight:700;margin-left:auto}.apexcharts-streamgraph-label{pointer-events:none}.apexcharts-xaxistooltip,.apexcharts-yaxistooltip{--apx-axt-bg: #ffffff;--apx-axt-border: rgba(15, 23, 42, .08);--apx-axt-color: #0f172a;--apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, .18), 0 1px 3px -1px rgba(15, 23, 42, .12);opacity:0;pointer-events:none;color:var(--apx-axt-color);font-size:12px;font-weight:500;text-align:center;border-radius:6px;position:absolute;z-index:10;background:var(--apx-axt-bg);border:1px solid var(--apx-axt-border);box-shadow:var(--apx-axt-shadow)}.apexcharts-xaxistooltip.apexcharts-theme-dark,.apexcharts-yaxistooltip.apexcharts-theme-dark{--apx-axt-bg: #1c1c1f;--apx-axt-border: rgba(255, 255, 255, .1);--apx-axt-color: #f3f4f6;--apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, .55), 0 1px 3px -1px rgba(0, 0, 0, .45) }.apexcharts-xaxistooltip{padding:4px 8px;transition:.15s ease all}.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before{left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-xaxistooltip:after{border-color:transparent;border-width:5px;margin-left:-5px}.apexcharts-xaxistooltip:before{border-color:transparent;border-width:6px;margin-left:-6px}.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before{bottom:100%}.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before{top:100%}.apexcharts-xaxistooltip-bottom:after{border-bottom-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-bottom:before{border-bottom-color:var(--apx-axt-border)}.apexcharts-xaxistooltip-top:after{border-top-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-top:before{border-top-color:var(--apx-axt-border)}.apexcharts-xaxistooltip.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-yaxistooltip{padding:3px 8px}.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before{top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-yaxistooltip:after{border-color:transparent;border-width:5px;margin-top:-5px}.apexcharts-yaxistooltip:before{border-color:transparent;border-width:6px;margin-top:-6px}.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before{left:100%}.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before{right:100%}.apexcharts-yaxistooltip-left:after{border-left-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-left:before{border-left-color:var(--apx-axt-border)}.apexcharts-yaxistooltip-right:after{border-right-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-right:before{border-right-color:var(--apx-axt-border)}.apexcharts-yaxistooltip.apexcharts-active{opacity:1}.apexcharts-yaxistooltip-hidden{display:none}.apexcharts-xcrosshairs,.apexcharts-ycrosshairs{pointer-events:none;opacity:0;transition:.15s ease all}.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-ycrosshairs-hidden{opacity:0}.apexcharts-selection-rect{cursor:move}.svg_select_shape{stroke-width:1;stroke-dasharray:10 10;stroke:#000;stroke-opacity:.1;pointer-events:none;fill:none}.svg_select_handle{stroke-width:3;stroke:#000;fill:none}.svg_select_handle_r{cursor:e-resize}.svg_select_handle_l{cursor:w-resize}.apexcharts-svg.apexcharts-zoomable.hovering-zoom{cursor:crosshair}.apexcharts-svg.apexcharts-zoomable.hovering-pan{cursor:move}.apexcharts-wheel-hint{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transition:opacity .2s ease}.apexcharts-wheel-hint-visible{opacity:1}.apexcharts-wheel-hint span{padding:6px 12px;border-radius:8px;font-size:13px;color:#fff;background:#1c1c1fd1}.apexcharts-theme-dark .apexcharts-wheel-hint span{color:#1c1c1f;background:#ffffffe6}@media(prefers-reduced-motion:reduce){.apexcharts-wheel-hint{transition:none}}.apexcharts-menu-icon,.apexcharts-measure-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon{cursor:pointer;width:26px;height:24px;line-height:24px;color:#6e8192;text-align:center;padding:0;margin:0;background:transparent;border:0;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;transition:background-color .12s ease,color .12s ease}.apexcharts-menu-icon svg,.apexcharts-measure-icon svg,.apexcharts-pan-icon svg,.apexcharts-reset-icon svg,.apexcharts-selection-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.apexcharts-theme-dark .apexcharts-menu-icon,.apexcharts-theme-dark .apexcharts-measure-icon,.apexcharts-theme-dark .apexcharts-pan-icon,.apexcharts-theme-dark .apexcharts-reset-icon,.apexcharts-theme-dark .apexcharts-selection-icon,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,.apexcharts-theme-dark .apexcharts-zoom-icon,.apexcharts-theme-dark .apexcharts-zoomin-icon,.apexcharts-theme-dark .apexcharts-zoomout-icon{color:#d4d6dc}.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected{background:#008ffb1f;color:#008ffb}.apexcharts-theme-light .apexcharts-menu-icon:hover,.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-reset-icon:hover,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoomin-icon:hover,.apexcharts-theme-light .apexcharts-zoomout-icon:hover{background:#0f172a0f;color:#1f2937}.apexcharts-theme-dark .apexcharts-menu-icon:hover,.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-reset-icon:hover,.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,.apexcharts-theme-dark .apexcharts-zoomout-icon:hover{background:#ffffff14;color:#fff}.apexcharts-menu-icon,.apexcharts-selection-icon{position:relative}.apexcharts-toolbar{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:1px;padding:3px;border-radius:8px;background:#ffffffd9;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.apexcharts-theme-dark .apexcharts-toolbar{background:#1c1c1fd1}.apexcharts-menu{background:#fffffff2;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);position:absolute;top:calc(100% + 4px);border:1px solid rgba(15,23,42,.08);border-radius:8px;padding:4px;right:0;opacity:0;min-width:120px;transition:opacity .15s ease,transform .15s ease;transform:translateY(-2px);pointer-events:none;box-shadow:0 4px 16px -4px #0f172a1f,0 2px 4px -1px #0f172a0f}.apexcharts-menu.apexcharts-menu-open{opacity:1;transform:translateY(0);pointer-events:all}.apexcharts-menu-item{padding:6px 9px;font-size:12px;border-radius:5px;cursor:pointer}.apexcharts-theme-light .apexcharts-menu-item:hover{background:#0f172a0f}.apexcharts-theme-dark .apexcharts-menu{background:#1c1c1feb;border-color:#ffffff14;color:#f3f4f6;box-shadow:0 4px 16px -4px #00000080,0 2px 4px -1px #0006}.apexcharts-theme-dark .apexcharts-menu-item:hover{background:#ffffff14}@media screen and (min-width:768px){.apexcharts-canvas:hover .apexcharts-toolbar{opacity:1}}.apexcharts-toolbar:focus-within{opacity:1}.apexcharts-menu-icon:focus-visible,.apexcharts-measure-icon:focus-visible,.apexcharts-pan-icon:focus-visible,.apexcharts-reset-icon:focus-visible,.apexcharts-selection-icon:focus-visible,.apexcharts-toolbar-custom-icon:focus-visible,.apexcharts-zoom-icon:focus-visible,.apexcharts-zoomin-icon:focus-visible,.apexcharts-zoomout-icon:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:1px;border-radius:5px}.apexcharts-menu-item:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:-2px;background:#eee}.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points{opacity:0}.apexcharts-hidden-element-shown{opacity:1;transition:.25s ease all}.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label,.apexcharts-pie-name-label,.apexcharts-pie-name-label-group,.apexcharts-pie-label-connector,.apexcharts-unit-outer-label,.apexcharts-unit-outer-label-group,.apexcharts-unit-label-connector{cursor:default;pointer-events:none}.apexcharts-pie-label-connector,.apexcharts-unit-label-connector{fill:none}.apexcharts-pie-label-delay,.apexcharts-unit-label-delay{opacity:0;animation-name:opaque;animation-duration:.3s;animation-fill-mode:forwards;animation-timing-function:ease}.apexcharts-unit-label-delay{animation-duration:.5s}.apexcharts-radialbar-label{cursor:pointer}.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-gridline,.apexcharts-line,.apexcharts-point-annotation-label,.apexcharts-radar-series path:not(.apexcharts-marker),.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect,.no-pointer-events{pointer-events:none}.apexcharts-tooltip-active .apexcharts-marker{transition:.15s ease all}.apexcharts-radar-series .apexcharts-yaxis,.apexcharts-bar-goals-markers,.apexcharts-bar-shadows,.apexcharts-rangebar-goals-markers{pointer-events:none}.apexcharts-drilldown-target{cursor:pointer}.apexcharts-breadcrumb{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:2px;font-size:12px;font-family:inherit;padding:2px 4px}.apexcharts-breadcrumb-item{background:transparent;border:none;padding:2px 6px;border-radius:3px;font:inherit;color:inherit;cursor:pointer;line-height:1.2}.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#00000014}.apexcharts-breadcrumb-arrow{margin-right:4px;font-weight:600;user-select:none}.apexcharts-breadcrumb-current{cursor:default;font-weight:600;opacity:.85}.apexcharts-breadcrumb-separator{opacity:.5;user-select:none}.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#ffffff1f}.apexcharts-drilldown-loading{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;font-family:inherit;color:inherit;background:#ffffff9e;cursor:progress}.apexcharts-drilldown-loading-spinner{width:26px;height:26px;border-radius:50%;border:2.5px solid rgba(0,0,0,.16);border-top-color:#0000008c;animation:apexcharts-drilldown-spin .7s linear infinite}.apexcharts-drilldown-loading-text{opacity:.8}.apexcharts-theme-dark .apexcharts-drilldown-loading{background:#1e1e1e9e}.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner{border-color:#ffffff38;border-top-color:#ffffffb3}@keyframes apexcharts-drilldown-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) .apexcharts-drilldown-loading-spinner{animation:apexcharts-drilldown-pulse 1.4s ease-in-out infinite!important}@keyframes apexcharts-drilldown-pulse{0%,to{opacity:.35}50%{opacity:1}}}.apexcharts-disable-transitions *{transition:none!important}.apexcharts-trellis{position:relative}.apexcharts-trellis-grid{display:grid}.apexcharts-trellis-cell{min-width:0;position:relative}.apexcharts-trellis-header{font-size:12px;font-weight:600;line-height:22px;height:22px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-title{font-size:14px;font-weight:700;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:0}.apexcharts-trellis-has-toolbar{padding-top:24px}.apexcharts-trellis-strip{font-size:12px;font-weight:600;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-strip-column{text-align:center;line-height:22px;height:22px;align-self:end}.apexcharts-trellis-strip-row{align-self:center;max-width:140px;padding-right:6px}.apexcharts-trellis-cell-empty{position:relative}.apexcharts-trellis-empty-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.45;pointer-events:none}.apexcharts-trellis-cell-hidden>*{visibility:hidden}.apexcharts-trellis-gradient-legend{margin:10px auto 0}.apexcharts-trellis-panel.apexcharts-trellis-skeleton{background:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.05;border-radius:4px}.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis-tooltip{position:absolute;top:0;left:0;z-index:14;pointer-events:none;opacity:0;transition:opacity .1s ease;background:var(--apx-bg, #fff);color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;font-size:12px;min-width:140px;max-width:320px}.apexcharts-trellis-tooltip-active{opacity:1}.apexcharts-trellis-tooltip .apexcharts-tooltip-title{padding:5px 10px;font-weight:600;background:#78787814;border-bottom:1px solid rgba(120,120,120,.18);margin-bottom:2px}.apexcharts-trellis-tooltip-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:2px 10px;line-height:1.6}.apexcharts-trellis-tooltip-row-active{background:#7878781a;font-weight:600}.apexcharts-trellis-tooltip-key{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-tooltip-vals{display:flex;gap:10px;white-space:nowrap}.apexcharts-trellis-tooltip-val{display:inline-flex;align-items:center;gap:5px}.apexcharts-trellis-tooltip-marker{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}.apexcharts-trellis-cell-promoted{grid-column:1 / -1}.apexcharts-trellis-cell-parked{display:none}.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:1}.apexcharts-trellis-header-clickable{cursor:pointer}.apexcharts-trellis-header-clickable:hover{text-decoration:underline;text-underline-offset:3px}.apexcharts-trellis-breadcrumb{display:flex;align-items:center;gap:6px;font-size:12px;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-breadcrumb-back{border:none;background:none;padding:0;font-size:12px;cursor:pointer;color:var(--apx-accent, #008ffb)}.apexcharts-trellis-breadcrumb-back:hover{text-decoration:underline}.apexcharts-trellis-breadcrumb-sep{opacity:.5}.apexcharts-trellis-breadcrumb-current{font-weight:600}.apexcharts-trellis-menu{position:absolute;top:26px;right:0;display:none;flex-direction:column;min-width:132px;background:var(--apx-bg, #fff);border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;padding:4px;z-index:15}.apexcharts-trellis-menu-open{display:flex}.apexcharts-trellis-menu-item{border:none;background:none;text-align:left;font-size:12px;padding:5px 8px;border-radius:3px;cursor:pointer;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-menu-item:hover{background:#7878781f}.apexcharts-trellis-toolbar{position:absolute;top:0;right:0;display:flex;gap:2px;z-index:12}.apexcharts-trellis-tool{border:0;background:transparent;padding:2px;cursor:pointer;border-radius:3px;color:#6e8192;line-height:0}.apexcharts-trellis-tool:hover{color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-tool.apexcharts-selected{color:var(--apx-accent, #008ffb)}.apexcharts-trellis-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;padding:8px 10px 2px}.apexcharts-trellis-legend-item{display:flex;align-items:center;gap:6px;cursor:pointer;line-height:1}.apexcharts-trellis-legend-item .apexcharts-legend-marker{width:12px;height:12px;border-radius:50%;display:inline-block}.apexcharts-trellis-legend-item .apexcharts-legend-text{font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-legend-item.apexcharts-inactive-legend{opacity:.45}@media print{.apexcharts-canvas.apexcharts-printing,.apexcharts-canvas.apexcharts-printing svg{max-width:100%!important}.apexcharts-canvas.apexcharts-printing svg{height:auto!important}.apexcharts-canvas.apexcharts-printing{height:auto!important}.apexcharts-toolbar{display:none!important}}';
33640
33739
  const e = globalThis.console;
33641
33740
  function t(t2, ...s2) {
33642
33741
  e.error(t2, ...s2);
@@ -34685,6 +34784,7 @@ class ApexCharts {
34685
34784
  if (w.config.chart.accessibility.enabled && w.config.chart.accessibility.keyboard.enabled && w.config.chart.accessibility.keyboard.navigation.enabled) {
34686
34785
  (_i = me.keyboardNavigation) == null ? void 0 : _i.init();
34687
34786
  }
34787
+ w.interact.keyNav = null;
34688
34788
  if (Environment.isBrowser() && w.globals.axisCharts && (w.axisFlags.isXNumeric || /** @type {Record<string,any>} */
34689
34789
  w.config.xaxis.convertedCatToNumeric || w.axisFlags.isRangeBar)) {
34690
34790
  if (w.config.chart.zoom.enabled || w.config.chart.selection && w.config.chart.selection.enabled || // @ts-ignore — chart.pan is an internal toolbar config property
@@ -35989,21 +36089,19 @@ class ApexCharts {
35989
36089
  * Returns the highest y value in the specified series.
35990
36090
  *
35991
36091
  * @param {number} [seriesIndex=0]
35992
- * @returns {number}
36092
+ * @returns {number | undefined}
35993
36093
  */
35994
36094
  getHighestValueInSeries(seriesIndex = 0) {
35995
- const range = new Range(this.w);
35996
- return range.getMinYMaxY(seriesIndex).highestY;
36095
+ return this.w.seriesData.series[seriesIndex] && new Range(this.w).getMinYMaxY(seriesIndex).highestY;
35997
36096
  }
35998
36097
  /**
35999
36098
  * Returns the lowest y value in the specified series.
36000
36099
  *
36001
36100
  * @param {number} [seriesIndex=0]
36002
- * @returns {number}
36101
+ * @returns {number | undefined}
36003
36102
  */
36004
36103
  getLowestValueInSeries(seriesIndex = 0) {
36005
- const range = new Range(this.w);
36006
- return range.getMinYMaxY(seriesIndex).lowestY;
36104
+ return this.w.seriesData.series[seriesIndex] && new Range(this.w).getMinYMaxY(seriesIndex).lowestY;
36007
36105
  }
36008
36106
  /**
36009
36107
  * Returns the sum of each series (the totals used for percentage calculations).
@@ -37430,6 +37528,7 @@ let Helpers$3 = class Helpers2 {
37430
37528
  toggleDataSeries(seriesCnt, isHidden) {
37431
37529
  var _a, _b, _c;
37432
37530
  const w = this.w;
37531
+ if (!w.dom.baseEl) return;
37433
37532
  if (w.globals.axisCharts || w.config.chart.type === "radialBar") {
37434
37533
  w.globals.resized = true;
37435
37534
  let seriesEl = null;
@@ -37899,9 +37998,11 @@ class HeatmapGradientLegend {
37899
37998
  this._min = 0;
37900
37999
  this._max = 0;
37901
38000
  this._geom = null;
38001
+ this._grad = null;
37902
38002
  this._bandHitEls = [];
37903
38003
  this._activeBandIndex = -1;
37904
38004
  this._targetEl = null;
38005
+ this.panelsW = null;
37905
38006
  this._onCellEnter = this._onCellEnter.bind(this);
37906
38007
  this._onCellLeave = this._onCellLeave.bind(this);
37907
38008
  this._onBandEnter = this._onBandEnter.bind(this);
@@ -38016,15 +38117,8 @@ class HeatmapGradientLegend {
38016
38117
  linearGrad.setAttribute("x2", "1");
38017
38118
  linearGrad.setAttribute("y2", "0");
38018
38119
  }
38019
- const { min, max, stops, bands } = this._computeStops();
38020
- this._min = min;
38021
- this._max = max;
38022
- stops.forEach((s2) => {
38023
- const stopEl = BrowserAPIs.createElementNS(SVG_NS, "stop");
38024
- stopEl.setAttribute("offset", `${(s2.percent * 100).toFixed(2)}%`);
38025
- stopEl.setAttribute("stop-color", s2.color);
38026
- linearGrad.appendChild(stopEl);
38027
- });
38120
+ this._grad = linearGrad;
38121
+ const { min, max, bands } = this._paintStops();
38028
38122
  defs.appendChild(linearGrad);
38029
38123
  svg.appendChild(defs);
38030
38124
  const rect = BrowserAPIs.createElementNS(SVG_NS, "rect");
@@ -38233,6 +38327,7 @@ class HeatmapGradientLegend {
38233
38327
  */
38234
38328
  repositionToPlot() {
38235
38329
  var _a, _b;
38330
+ if (this._grad) this._paintStops();
38236
38331
  if (!Environment.isBrowser()) return;
38237
38332
  if (this._targetEl) return;
38238
38333
  const w = this.w;
@@ -38367,14 +38462,25 @@ class HeatmapGradientLegend {
38367
38462
  if (idx < 0 || idx === this._activeBandIndex) return;
38368
38463
  this._activeBandIndex = idx;
38369
38464
  (_d = (_c = (_b = this.ctx) == null ? void 0 : _b.events) == null ? void 0 : _c.fireEvent) == null ? void 0 : _d.call(_c, "legendHover", [this.ctx, idx, w]);
38370
- new Series(w).highlightRangeInSeries(idx, "highlight");
38465
+ this._highlightRange(idx, "highlight");
38371
38466
  }
38372
38467
  /** Leaving a band clears the highlight. */
38373
38468
  _onBandLeave() {
38374
38469
  if (this._activeBandIndex < 0) return;
38375
38470
  const idx = this._activeBandIndex;
38376
38471
  this._activeBandIndex = -1;
38377
- new Series(this.w).highlightRangeInSeries(idx, "reset");
38472
+ this._highlightRange(idx, "reset");
38473
+ }
38474
+ /**
38475
+ * A shared trellis strip sets `panelsW` so a band reaches every panel.
38476
+ * @param {number} idx
38477
+ * @param {'highlight'|'reset'} action
38478
+ */
38479
+ _highlightRange(idx, action) {
38480
+ var _a;
38481
+ (((_a = this.panelsW) == null ? void 0 : _a.call(this)) || [this.w]).forEach(
38482
+ (w) => new Series(w).highlightRangeInSeries(idx, action)
38483
+ );
38378
38484
  }
38379
38485
  _attachHoverListeners() {
38380
38486
  var _a, _b;
@@ -38396,10 +38502,10 @@ class HeatmapGradientLegend {
38396
38502
  */
38397
38503
  _onCellEnter(...args) {
38398
38504
  var _a, _b, _c;
38399
- const w = this.w;
38400
38505
  if (!this.arrowEl) return;
38401
38506
  const opts = args[args.length - 1];
38402
38507
  if (!opts || typeof opts !== "object") return;
38508
+ const w = opts.w || this.w;
38403
38509
  const i2 = opts.seriesIndex;
38404
38510
  const j2 = opts.dataPointIndex;
38405
38511
  if (typeof i2 !== "number" || typeof j2 !== "number") return;
@@ -38511,6 +38617,21 @@ class HeatmapGradientLegend {
38511
38617
  polygon.setAttribute("pointer-events", "none");
38512
38618
  return polygon;
38513
38619
  }
38620
+ /** (Re)write the strip's stops; returns `_computeStops()`. */
38621
+ _paintStops() {
38622
+ const r2 = this._computeStops();
38623
+ const grad = this._grad;
38624
+ this._min = r2.min;
38625
+ this._max = r2.max;
38626
+ grad.innerHTML = "";
38627
+ r2.stops.forEach((s2) => {
38628
+ const stopEl = BrowserAPIs.createElementNS(SVG_NS, "stop");
38629
+ stopEl.setAttribute("offset", `${(s2.percent * 100).toFixed(2)}%`);
38630
+ stopEl.setAttribute("stop-color", s2.color);
38631
+ grad.appendChild(stopEl);
38632
+ });
38633
+ return r2;
38634
+ }
38514
38635
  /**
38515
38636
  * Build gradient stops + return effective min/max.
38516
38637
  * - If `colorScale.ranges` is set, stops are placed at each range boundary
@@ -38552,7 +38673,8 @@ class HeatmapGradientLegend {
38552
38673
  if (!Number.isFinite(dataMax)) dataMax = 0;
38553
38674
  let min = dataMin;
38554
38675
  let max = dataMax;
38555
- if (typeof cs.min !== "undefined" && typeof cs.max !== "undefined" && cs.max > cs.min) {
38676
+ const csWindow = typeof cs.min !== "undefined" && typeof cs.max !== "undefined" && cs.max > cs.min;
38677
+ if (csWindow) {
38556
38678
  min = cs.min;
38557
38679
  max = cs.max;
38558
38680
  } else {
@@ -38583,34 +38705,30 @@ class HeatmapGradientLegend {
38583
38705
  } else {
38584
38706
  const baseColor = w.globals.colors[0] || "#008FFB";
38585
38707
  const utils = new Utils$1();
38586
- const plot = w.config.plotOptions[w.config.chart.type] || {};
38708
+ const type = w.config.chart.type;
38709
+ const plot = w.config.plotOptions[type] || {};
38587
38710
  const shadeIntensity = (_b = plot.shadeIntensity) != null ? _b : 0.5;
38588
- const hasNegs = (
38711
+ const g = (
38589
38712
  /** @type {any} */
38590
- w.globals.hasNegs
38713
+ w.globals
38591
38714
  );
38715
+ const hasNegs = g.hasNegs;
38716
+ const yExt = type === "heatmap" && !plot.distributed && !csWindow && g.maxY >= g.minY;
38717
+ const hi = yExt ? g.maxY : max;
38718
+ const total = Math.abs(hi) + Math.abs(yExt ? cs.min < g.minY ? cs.min : g.minY : min);
38719
+ const k2 = shadeIntensity * 1.25;
38592
38720
  const n2 = Math.max(2, cfg.stops || 16);
38593
38721
  for (let s2 = 0; s2 < n2; s2++) {
38594
38722
  const t2 = s2 / (n2 - 1);
38595
- const v = min + t2 * (max - min);
38596
- const total = Math.abs(max) + Math.abs(min);
38597
- const percent_v = total === 0 ? 0 : 100 * v / total;
38598
- let colorShadePercent;
38599
- if (hasNegs) {
38600
- if (plot.reverseNegativeShade) {
38601
- colorShadePercent = percent_v < 0 ? percent_v / 100 * (shadeIntensity * 1.25) : (1 - percent_v / 100) * (shadeIntensity * 1.25);
38602
- } else {
38603
- colorShadePercent = percent_v <= 0 ? 1 - (1 + percent_v / 100) * shadeIntensity : (1 - percent_v / 100) * shadeIntensity;
38604
- }
38605
- } else {
38606
- colorShadePercent = 1 - percent_v / 100;
38607
- }
38608
- if (colorShadePercent > 1) colorShadePercent = 1;
38609
- if (colorShadePercent < -1) colorShadePercent = -1;
38610
- const shaded = plot.enableShades ? utils.shadeColor(
38611
- w.config.theme.mode === "dark" ? colorShadePercent * -1 : colorShadePercent,
38612
- baseColor
38613
- ) : baseColor;
38723
+ const p = total === 0 ? 0 : Math.min(min + t2 * (max - min), hi) / total;
38724
+ const c = Math.max(
38725
+ -1,
38726
+ Math.min(
38727
+ 1,
38728
+ hasNegs ? plot.reverseNegativeShade ? (p < 0 ? p : 1 - p) * k2 : p <= 0 ? 1 - (1 + p) * shadeIntensity : (1 - p) * shadeIntensity : (1 - p) * (type === "treemap" ? k2 : 1)
38729
+ )
38730
+ );
38731
+ const shaded = plot.enableShades ? utils.shadeColor(w.config.theme.mode === "dark" ? -c : c, baseColor) : baseColor;
38614
38732
  stops.push({ percent: t2, color: shaded });
38615
38733
  }
38616
38734
  }
@@ -38640,9 +38758,12 @@ class Legend {
38640
38758
  this.legendHelpers = new Helpers$3(this);
38641
38759
  }
38642
38760
  init() {
38761
+ var _a;
38643
38762
  const w = this.w;
38644
38763
  const gl = w.globals;
38645
38764
  const cnf = w.config;
38765
+ (_a = this.heatmapGradientLegend) == null ? void 0 : _a.destroy();
38766
+ this.heatmapGradientLegend = null;
38646
38767
  this.isBarsDistributed = cnf.chart.type === "bar" && cnf.plotOptions.bar.distributed && cnf.series.length === 1;
38647
38768
  const showLegendAlways = cnf.legend.showForSingleSeries && this.w.seriesData.series.length === 1 || this.isBarsDistributed || // Heatmap legends are colorScale-driven (discrete ranges or the
38648
38769
  // gradient strip), not series-driven, so they must render even for a
@@ -38660,10 +38781,6 @@ class Legend {
38660
38781
  while (elLegendWrap.firstChild) {
38661
38782
  elLegendWrap.removeChild(elLegendWrap.firstChild);
38662
38783
  }
38663
- if (this.heatmapGradientLegend) {
38664
- this.heatmapGradientLegend.destroy();
38665
- this.heatmapGradientLegend = null;
38666
- }
38667
38784
  if (HeatmapGradientLegend.isEnabled(w)) {
38668
38785
  this.heatmapGradientLegend = new HeatmapGradientLegend(w, this.ctx);
38669
38786
  this.heatmapGradientLegend.draw();
@@ -38841,7 +38958,7 @@ class Legend {
38841
38958
  }
38842
38959
  }
38843
38960
  const lg = legendGroups[w.labelData.seriesGroupIndex[i2]];
38844
- if (lg) elLegendWrap.appendChild(lg);
38961
+ if (lg && !lg.parentNode) elLegendWrap.appendChild(lg);
38845
38962
  (lg || elLegendWrap).appendChild(elLegend);
38846
38963
  elLegendWrap.classList.add(
38847
38964
  `apexcharts-align-${w.config.legend.horizontalAlign}`
@@ -38952,7 +39069,7 @@ class Legend {
38952
39069
  );
38953
39070
  const hoverOverLegend = isLegendItem(target);
38954
39071
  if (w.config.chart.type !== "heatmap" && !this.isBarsDistributed) {
38955
- if (!target.classList.contains("apexcharts-inactive-legend") && hoverOverLegend) {
39072
+ if (hoverOverLegend && !target.closest(".apexcharts-inactive-legend")) {
38956
39073
  const series = new Series(this.ctx.w);
38957
39074
  series.toggleSeriesOnHover(e2, target);
38958
39075
  }
@@ -38986,7 +39103,8 @@ class Legend {
38986
39103
  me.onLegendClick(e2);
38987
39104
  if (rel !== null && w.config.legend.onItemClick.toggleDataSeries) {
38988
39105
  requestAnimationFrame(() => {
38989
- const restored = w.dom.baseEl.querySelector(
39106
+ var _a;
39107
+ const restored = (_a = w.dom.baseEl) == null ? void 0 : _a.querySelector(
38990
39108
  `.apexcharts-legend-series[rel="${rel}"]`
38991
39109
  );
38992
39110
  if (restored) restored.focus();
@@ -40023,6 +40141,63 @@ class ZoomPanSelection extends Toolbar {
40023
40141
  const { zoom } = this.w.config.chart;
40024
40142
  return this._incidentalZoomEnabled(zoom && zoom.allowMouseWheelZoom);
40025
40143
  }
40144
+ /** An explicit `true` zooms on every wheel; 'auto' needs Ctrl/Cmd. */
40145
+ _wheelZoomGreedy() {
40146
+ return this.w.config.chart.zoom.allowMouseWheelZoom === true;
40147
+ }
40148
+ /**
40149
+ * Tell a viewer whose bare wheel just scrolled past the chart how to zoom it.
40150
+ * Shown over the chart while the scroll goes on and faded out shortly after
40151
+ * it stops. Only for a mostly vertical wheel: a sideways trackpad swipe is
40152
+ * not someone reaching for zoom.
40153
+ *
40154
+ * The node lives in elWrap and the timer on w.interact, since a re-render can
40155
+ * replace both this instance and the wrapper's contents while it is up.
40156
+ *
40157
+ * @param {any} e
40158
+ */
40159
+ _showWheelHint(e2) {
40160
+ const w = this.w;
40161
+ if (w.config.chart.zoom.wheelHint === false) return;
40162
+ if (Math.abs(e2.deltaY) <= Math.abs(e2.deltaX)) return;
40163
+ const wrap = w.dom.elWrap;
40164
+ if (!wrap) return;
40165
+ let el = wrap.querySelector(".apexcharts-wheel-hint");
40166
+ if (!el) {
40167
+ const win = BrowserAPIs.getWindow();
40168
+ const nav = win && win.navigator;
40169
+ const mac = !!nav && /Mac|iPhone|iPad/.test(nav.platform || nav.userAgent);
40170
+ const text = (w.globals.locale.toolbar.wheelZoomHint || "").replace(
40171
+ "{key}",
40172
+ mac ? "⌘" : "Ctrl"
40173
+ );
40174
+ el = BrowserAPIs.createElement("div");
40175
+ el.className = "apexcharts-wheel-hint";
40176
+ el.setAttribute("aria-hidden", "true");
40177
+ const label = BrowserAPIs.createElement("span");
40178
+ label.textContent = text;
40179
+ label.style.fontFamily = w.config.chart.fontFamily;
40180
+ el.appendChild(label);
40181
+ wrap.appendChild(el);
40182
+ void /** @type {HTMLElement} */
40183
+ el.offsetWidth;
40184
+ }
40185
+ el.classList.add("apexcharts-wheel-hint-visible");
40186
+ const it = w.interact;
40187
+ if (it.wheelHintTimer) clearTimeout(it.wheelHintTimer);
40188
+ it.wheelHintTimer = setTimeout(() => this._hideWheelHint(), 1200);
40189
+ }
40190
+ _hideWheelHint() {
40191
+ var _a;
40192
+ const w = this.w;
40193
+ const it = w.interact;
40194
+ if (it.wheelHintTimer) {
40195
+ clearTimeout(it.wheelHintTimer);
40196
+ it.wheelHintTimer = null;
40197
+ }
40198
+ const el = (_a = w.dom.elWrap) == null ? void 0 : _a.querySelector(".apexcharts-wheel-hint");
40199
+ if (el) el.classList.remove("apexcharts-wheel-hint-visible");
40200
+ }
40026
40201
  /**
40027
40202
  * Put keyboard focus on the chart, where the chart is focusable at all.
40028
40203
  *
@@ -40094,8 +40269,13 @@ class ZoomPanSelection extends Toolbar {
40094
40269
  * @param {any} e
40095
40270
  */
40096
40271
  mouseWheelEvent(e2) {
40097
- e2.preventDefault();
40098
40272
  const st = this._wheel();
40273
+ if (!this._wheelZoomGreedy() && !e2.ctrlKey && !e2.metaKey && st.endTimer == null) {
40274
+ this._showWheelHint(e2);
40275
+ return;
40276
+ }
40277
+ e2.preventDefault();
40278
+ this._hideWheelHint();
40099
40279
  let dy = e2.deltaY;
40100
40280
  if (e2.deltaMode === 1) dy *= 33;
40101
40281
  else if (e2.deltaMode === 2) dy *= 330;
@@ -40859,6 +41039,34 @@ class ZoomPanSelection extends Toolbar {
40859
41039
  w.config.chart.events.scrolled(this.ctx, args);
40860
41040
  this.ctx.events.fireEvent("scrolled", args);
40861
41041
  }
41042
+ /**
41043
+ * Pan a zoomed x-window by `fraction` of its width (keyboard Shift+Arrow),
41044
+ * clamped to the data as a drag pan is, and reported as one (`scrolled`).
41045
+ * @param {number} fraction
41046
+ */
41047
+ panBy(fraction) {
41048
+ const w = this.w;
41049
+ if (!w.interact.zoomed) return;
41050
+ const { min, max } = this._currentXWindow();
41051
+ let d = (max - min) * fraction;
41052
+ if (w.config.xaxis.convertedCatToNumeric) {
41053
+ d = d > 0 ? Math.ceil(d) : Math.floor(d);
41054
+ }
41055
+ if (w.axisFlags.isRangeBar) {
41056
+ const r2 = w.rangeData;
41057
+ let lo = Infinity;
41058
+ let hi = -Infinity;
41059
+ r2.seriesRangeStart.concat(r2.seriesRangeEnd).flat().forEach((y) => {
41060
+ if (y != null) {
41061
+ lo = Math.min(lo, y);
41062
+ hi = Math.max(hi, y);
41063
+ }
41064
+ });
41065
+ d = d > 0 ? Math.min(d, Math.max(0, hi - max)) : Math.max(d, Math.min(0, lo - min));
41066
+ if (!d) return;
41067
+ }
41068
+ if (this._applyXRange(min + d, max + d, false)) this._fireScrolled();
41069
+ }
40862
41070
  /** @param {number} x @param {number} t */
40863
41071
  _pushSample(x2, t2) {
40864
41072
  const s2 = this._m().samples;
@@ -42323,16 +42531,35 @@ class KeyboardNavigation {
42323
42531
  });
42324
42532
  svgEl.addEventListener("keydown", this._onKeyDown, { passive: false });
42325
42533
  this.ctx.events.addEventListener("legendClick", this._onLegendClick);
42534
+ const kept = w.interact.keyNav;
42535
+ const doc = svgEl.ownerDocument;
42536
+ w.interact.keyNav = null;
42537
+ if (kept && (!doc.activeElement || doc.activeElement === doc.body)) {
42538
+ [this.seriesIndex, this.dataPointIndex, , this._tooltipDismissed] = kept;
42539
+ if (!kept[2]) this.notePointerFocus();
42540
+ svgEl.focus({ preventScroll: true });
42541
+ }
42326
42542
  }
42327
42543
  /**
42328
- * Removes all event listeners. Called from chart.destroy().
42544
+ * Removes all event listeners. Called from chart.destroy(), and with
42545
+ * `updating` when an update is about to replace the SVG.
42546
+ * @param {boolean} [updating]
42329
42547
  */
42330
- destroy() {
42548
+ destroy(updating) {
42549
+ var _a;
42331
42550
  const w = this.w;
42332
42551
  const svgEl = w.dom.Paper && w.dom.Paper.node;
42333
42552
  this.ctx.events.removeEventListener("legendClick", this._onLegendClick);
42334
42553
  clearTimeout(this._announceTimer);
42335
42554
  if (!svgEl) return;
42555
+ if (updating && ((_a = svgEl.getRootNode) == null ? void 0 : _a.call(svgEl).activeElement) === svgEl) {
42556
+ w.interact.keyNav = [
42557
+ this.seriesIndex,
42558
+ this.dataPointIndex,
42559
+ this.active,
42560
+ this._tooltipDismissed
42561
+ ];
42562
+ }
42336
42563
  svgEl.removeEventListener("focus", this._onFocus);
42337
42564
  svgEl.removeEventListener("blur", this._onBlur);
42338
42565
  svgEl.removeEventListener("keydown", this._onKeyDown);
@@ -42384,7 +42611,7 @@ class KeyboardNavigation {
42384
42611
  this.active = true;
42385
42612
  this._clampCursor();
42386
42613
  this._snapToVisibleRange();
42387
- this._showCurrentPoint();
42614
+ if (!this._tooltipDismissed) this._showCurrentPoint();
42388
42615
  }
42389
42616
  _onBlur() {
42390
42617
  this.active = false;
@@ -42430,20 +42657,18 @@ class KeyboardNavigation {
42430
42657
  break;
42431
42658
  case "Home":
42432
42659
  e2.preventDefault();
42433
- this.dataPointIndex = 0;
42434
- this._skipNullForward();
42660
+ this._seek(0, 1);
42435
42661
  this._showCurrentPoint();
42436
42662
  break;
42437
42663
  case "End":
42438
42664
  e2.preventDefault();
42439
- this.dataPointIndex = this._getDataPointCount(this.seriesIndex) - 1;
42440
- this._skipNullBackward();
42665
+ this._seek(this._getDataPointCount(this.seriesIndex) - 1, -1);
42441
42666
  this._showCurrentPoint();
42442
42667
  break;
42443
42668
  case "Enter":
42444
42669
  case " ":
42445
42670
  e2.preventDefault();
42446
- this._fireClick();
42671
+ this._fireClick(e2);
42447
42672
  break;
42448
42673
  case "+":
42449
42674
  case "=":
@@ -42491,22 +42716,15 @@ class KeyboardNavigation {
42491
42716
  );
42492
42717
  }
42493
42718
  _canPan() {
42494
- return this._canZoom();
42719
+ return this._canZoom() && this.w.interact.zoomed;
42495
42720
  }
42496
42721
  /**
42497
- * Shift the visible x-range by ~10% in the given direction.
42722
+ * Shift the visible x-range by ~10% in the given direction, as a drag pan.
42498
42723
  * @param {number} direction +1 = right, -1 = left
42499
42724
  */
42500
42725
  _panBy(direction) {
42501
- const toolbar = this.ctx.toolbar;
42502
- if (!toolbar) return;
42503
- const r2 = toolbar._currentXRange();
42504
- const minX = Number(r2.minX);
42505
- const maxX = Number(r2.maxX);
42506
- if (!isFinite(minX) || !isFinite(maxX) || minX === maxX) return;
42507
- const span = maxX - minX;
42508
- const step = span * 0.1 * direction;
42509
- toolbar.zoomUpdateOptions(minX + step, maxX + step);
42726
+ var _a;
42727
+ (_a = this.ctx.zoomPanSelection) == null ? void 0 : _a.panBy(direction / 10);
42510
42728
  this._announce(direction > 0 ? "Panned right" : "Panned left");
42511
42729
  }
42512
42730
  // ─── Navigation ───────────────────────────────────────────────────────────
@@ -42521,8 +42739,8 @@ class KeyboardNavigation {
42521
42739
  if (dSeries !== 0) {
42522
42740
  const ttCtx = this.w.globals.tooltip;
42523
42741
  const type = w.config.chart.type;
42524
- const perCell = type === "heatmap" || type === "treemap";
42525
- if (!perCell && ttCtx && ttCtx.tConfig && ttCtx.tConfig.shared) {
42742
+ const perCell = type === "heatmap" || type === "treemap" || type === "radialBar";
42743
+ if (!perCell && (ttCtx == null ? void 0 : ttCtx.ttItems) && ttCtx.tConfig.shared) {
42526
42744
  const j2 = this.dataPointIndex;
42527
42745
  const isActuallyShared = ttCtx.tooltipUtil && ttCtx.tooltipUtil.isXoverlap(j2) && ttCtx.tooltipUtil.isInitialSeriesSameLen();
42528
42746
  if (isActuallyShared) return;
@@ -42548,59 +42766,43 @@ class KeyboardNavigation {
42548
42766
  }
42549
42767
  }
42550
42768
  if (dPoint !== 0) {
42551
- const dpCount = this._getDataPointCount(this.seriesIndex);
42552
- let di = this.dataPointIndex + dPoint;
42553
- if (di < 0) di = wrapAround ? dpCount - 1 : 0;
42554
- if (di >= dpCount) di = wrapAround ? 0 : dpCount - 1;
42555
- this.dataPointIndex = di;
42556
- if (dPoint > 0) {
42557
- this._skipNullForward();
42558
- } else {
42559
- this._skipNullBackward();
42560
- }
42769
+ this._seek(this.dataPointIndex + dPoint, dPoint);
42561
42770
  if (!this._isDataPointVisible(this.seriesIndex, this.dataPointIndex)) {
42562
42771
  this._snapToVisibleRangeInDirection(dPoint);
42563
42772
  }
42564
42773
  }
42565
42774
  this._showCurrentPoint();
42566
42775
  }
42567
- /** Advance dataPointIndex forward past any nulls */
42568
- _skipNullForward() {
42569
- const w = this.w;
42570
- const si = this.seriesIndex;
42571
- const dpCount = this._getDataPointCount(si);
42572
- let di = this.dataPointIndex;
42573
- let attempts = 0;
42574
- if (!Array.isArray(w.seriesData.series[si])) return;
42575
- while (attempts < dpCount && w.seriesData.series[si][di] === null) {
42576
- di = (di + 1) % dpCount;
42577
- attempts++;
42578
- }
42579
- this.dataPointIndex = di;
42580
- }
42581
- /** Retreat dataPointIndex backward past any nulls */
42582
- _skipNullBackward() {
42776
+ /**
42777
+ * Land on the first non-null point from `di` going `dir`. Past an edge it
42778
+ * wraps only with wrapAround; when no point lies ahead the cursor stays.
42779
+ * @param {number} di
42780
+ * @param {number} dir
42781
+ */
42782
+ _seek(di, dir) {
42583
42783
  const w = this.w;
42584
- const si = this.seriesIndex;
42585
- const dpCount = this._getDataPointCount(si);
42586
- let di = this.dataPointIndex;
42587
- let attempts = 0;
42588
- if (!Array.isArray(w.seriesData.series[si])) return;
42589
- while (attempts < dpCount && w.seriesData.series[si][di] === null) {
42590
- di = (di - 1 + dpCount) % dpCount;
42591
- attempts++;
42784
+ const row = w.seriesData.series[this.seriesIndex];
42785
+ const n2 = this._getDataPointCount(this.seriesIndex);
42786
+ for (let k2 = 0; k2 < n2; k2++, di += dir) {
42787
+ if (w.config.chart.accessibility.keyboard.navigation.wrapAround) {
42788
+ di = (di + n2) % n2;
42789
+ } else if (di < 0 || di >= n2) return;
42790
+ if (!Array.isArray(row) || row[di] !== null) {
42791
+ this.dataPointIndex = di;
42792
+ return;
42793
+ }
42592
42794
  }
42593
- this.dataPointIndex = di;
42594
42795
  }
42595
42796
  // ─── Display ──────────────────────────────────────────────────────────────
42596
42797
  _showCurrentPoint() {
42597
42798
  const { seriesIndex: i2, dataPointIndex: j2 } = this;
42598
42799
  const w = this.w;
42599
42800
  const ttCtx = w.globals.tooltip;
42600
- if (!ttCtx || !ttCtx.ttItems) return;
42801
+ this._tooltipDismissed = false;
42601
42802
  w.interact.capturedSeriesIndex = i2;
42602
42803
  w.interact.capturedDataPointIndex = j2;
42603
42804
  this._applyFocusClass(i2, j2);
42805
+ if (!(ttCtx == null ? void 0 : ttCtx.ttItems)) return this._announce(this._buildPointLabel(i2, j2));
42604
42806
  this._showTooltip(
42605
42807
  i2,
42606
42808
  j2,
@@ -42658,10 +42860,8 @@ class KeyboardNavigation {
42658
42860
  if (w.config.chart.accessibility.enabled && w.config.chart.accessibility.announcements.enabled) {
42659
42861
  tooltipEl.removeAttribute("aria-hidden");
42660
42862
  }
42661
- if (type === "pie" || type === "donut" || type === "polarArea") {
42863
+ if (type === "pie" || type === "donut" || type === "polarArea" || type === "radialBar") {
42662
42864
  this._showTooltipNonAxis(i2, j2, ttCtx, tooltipEl);
42663
- } else if (type === "radialBar") {
42664
- this._showTooltipRadialBar(i2, j2, ttCtx, tooltipEl);
42665
42865
  } else if (type === "heatmap" || type === "treemap") {
42666
42866
  this._showTooltipHeatTree(i2, j2, ttCtx, tooltipEl, type);
42667
42867
  } else if (this._isBarLikeSeries(i2)) {
@@ -43016,24 +43216,23 @@ class KeyboardNavigation {
43016
43216
  return true;
43017
43217
  }
43018
43218
  /**
43019
- * pie / donut / polarArea
43219
+ * pie / donut / polarArea (a slice per point, i is 0) and radialBar (a ring
43220
+ * per series, j is 0)
43020
43221
  * @param {number} i
43021
43222
  * @param {number} j
43022
43223
  * @param {import('../tooltip/Tooltip').default} ttCtx
43023
43224
  * @param {HTMLElement} tooltipEl
43024
43225
  */
43025
43226
  _showTooltipNonAxis(i2, j2, ttCtx, tooltipEl) {
43026
- const w = this.w;
43027
43227
  ttCtx.tooltipLabels.drawSeriesTexts({
43028
43228
  ttItems: ttCtx.ttItems,
43029
- i: j2,
43229
+ i: i2 + j2,
43030
43230
  shared: false
43031
43231
  });
43032
43232
  const tooltipBound = tooltipEl.getBoundingClientRect();
43033
43233
  const ttWidth = tooltipBound.width || ttCtx.tooltipRect.ttWidth || 0;
43034
43234
  const ttHeight = tooltipBound.height || ttCtx.tooltipRect.ttHeight || 0;
43035
- const sliceEl = w.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${j2}']`);
43036
- const anchor = ttCtx.getSliceAnchor(sliceEl);
43235
+ const anchor = ttCtx.getSliceAnchor(this._getFocusableElement(i2, j2));
43037
43236
  if (anchor) {
43038
43237
  const pos = ttCtx.tooltipPosition.placeOverAnchor(
43039
43238
  anchor.x,
@@ -43046,56 +43245,6 @@ class KeyboardNavigation {
43046
43245
  tooltipEl.style.top = pos.y + "px";
43047
43246
  }
43048
43247
  }
43049
- /**
43050
- * radialBar — one ring per series, single value each
43051
- * @param {number} i
43052
- * @param {any} _j
43053
- * @param {import('../tooltip/Tooltip').default} ttCtx
43054
- * @param {HTMLElement} tooltipEl
43055
- */
43056
- _showTooltipRadialBar(i2, _j, ttCtx, tooltipEl) {
43057
- var _a;
43058
- const w = this.w;
43059
- ttCtx.tooltipLabels.drawSeriesTexts({
43060
- ttItems: ttCtx.ttItems,
43061
- i: i2,
43062
- shared: false
43063
- });
43064
- const { ttWidth = 0, ttHeight = 0 } = ttCtx.getCachedDimensions();
43065
- const arcEl = w.dom.baseEl.querySelector(
43066
- `.apexcharts-radialbar-series[data\\:realIndex='${i2}'] path`
43067
- );
43068
- if (arcEl) {
43069
- const angle = parseFloat((_a = arcEl.getAttribute("data:angle")) != null ? _a : "") || 0;
43070
- const initialAngle = w.config.plotOptions.radialBar.startAngle || 0;
43071
- const midAngle = initialAngle + angle / 2;
43072
- const centerX = w.layout.gridWidth / 2;
43073
- const centerY = w.layout.gridHeight / 2;
43074
- const radialSize = w.globals.radialSize || Math.min(w.layout.gridWidth, w.layout.gridHeight) / 2;
43075
- const seriesCount = w.seriesData.series.length;
43076
- const trackSize = radialSize / Math.max(seriesCount, 1);
43077
- const outerRadius = radialSize - i2 * trackSize;
43078
- const innerRadius = outerRadius - trackSize;
43079
- const ringRadius = (outerRadius + innerRadius) / 2;
43080
- const centroid = Utils$1.polarToCartesian(
43081
- centerX,
43082
- centerY,
43083
- ringRadius,
43084
- midAngle
43085
- );
43086
- const x2 = centroid.x + (w.layout.translateX || 0);
43087
- const y = centroid.y + (w.layout.translateY || 0);
43088
- const pos = ttCtx.tooltipPosition.placeOverAnchor(
43089
- x2,
43090
- y,
43091
- ttWidth,
43092
- ttHeight,
43093
- 10
43094
- );
43095
- tooltipEl.style.left = pos.x + "px";
43096
- tooltipEl.style.top = pos.y + "px";
43097
- }
43098
- }
43099
43248
  /**
43100
43249
  * heatmap / treemap — position tooltip using element bounding rect
43101
43250
  * @param {number} i
@@ -43355,9 +43504,7 @@ class KeyboardNavigation {
43355
43504
  const mark = this._canvasMark(i2, j2);
43356
43505
  if (!mark) return this._drawCanvasMarkerFocusRing(i2, j2);
43357
43506
  const w = this.w;
43358
- const host = Array.from(
43359
- w.dom.baseEl.querySelectorAll(".apexcharts-series")
43360
- ).find((g) => g.getAttribute("data:realIndex") === String(i2));
43507
+ const host = this._seriesGroup(i2);
43361
43508
  if (!host) return null;
43362
43509
  const ring = new Graphics(w, this.ctx).drawPath({
43363
43510
  d: mark.d,
@@ -43381,9 +43528,7 @@ class KeyboardNavigation {
43381
43528
  const marker = this._canvasMarker(i2, j2);
43382
43529
  if (!marker) return null;
43383
43530
  const w = this.w;
43384
- const host = Array.from(
43385
- w.dom.baseEl.querySelectorAll(".apexcharts-series")
43386
- ).find((g) => g.getAttribute("data:realIndex") === String(i2));
43531
+ const host = this._seriesGroup(i2);
43387
43532
  if (!host) return null;
43388
43533
  const ring = new Graphics(w, this.ctx).drawPath({
43389
43534
  d: marker.d,
@@ -43477,6 +43622,7 @@ class KeyboardNavigation {
43477
43622
  * @param {number} j
43478
43623
  */
43479
43624
  _getFocusableElement(i2, j2) {
43625
+ var _a, _b;
43480
43626
  const w = this.w;
43481
43627
  const type = w.config.chart.type;
43482
43628
  const baseEl = w.dom.baseEl;
@@ -43494,32 +43640,47 @@ class KeyboardNavigation {
43494
43640
  );
43495
43641
  }
43496
43642
  if (type === "radialBar") {
43497
- return baseEl.querySelector(
43498
- `.apexcharts-radialbar-series[data\\:realIndex='${i2}'] path`
43499
- );
43643
+ return baseEl.querySelector(`.apexcharts-radialbar-slice-${i2}`);
43500
43644
  }
43501
43645
  if (this._isBarLikeSeries(i2)) {
43502
43646
  if (this._canvasMark(i2, j2)) return null;
43503
- return baseEl.querySelector(
43504
- `.apexcharts-series[data\\:realIndex='${i2}'] path[j='${j2}']`
43505
- );
43647
+ return (_a = this._seriesGroup(i2)) == null ? void 0 : _a.querySelector(`path[j='${j2}']`);
43506
43648
  }
43507
- const marker = baseEl.querySelector(
43508
- `.apexcharts-series[data\\:realIndex='${i2}'] .apexcharts-marker[rel='${j2}']`
43509
- );
43510
- return marker || null;
43649
+ return (_b = this._seriesGroup(i2)) == null ? void 0 : _b.querySelector(`.apexcharts-marker[rel='${j2}']`);
43650
+ }
43651
+ /**
43652
+ * The series' own group, by realIndex (`rel` counts within a type's groups,
43653
+ * which a combo has several of). Matched in script: not every selector
43654
+ * engine takes the escaped `data\:realIndex` attribute.
43655
+ * @param {number} i
43656
+ * @returns {Element | undefined}
43657
+ */
43658
+ _seriesGroup(i2) {
43659
+ return Array.from(
43660
+ this.w.dom.baseEl.querySelectorAll(".apexcharts-series")
43661
+ ).find((g) => g.getAttribute("data:realIndex") === String(i2));
43511
43662
  }
43512
43663
  // ─── Click / Enter ────────────────────────────────────────────────────────
43513
- _fireClick() {
43514
- const w = this.w;
43515
- const ttCtx = w.globals.tooltip;
43516
- if (!ttCtx) return;
43517
- const syntheticEvent = {
43518
- type: "mouseup",
43519
- clientX: 0,
43520
- clientY: 0
43521
- };
43522
- ttCtx.markerClick(syntheticEvent, this.seriesIndex, this.dataPointIndex);
43664
+ /**
43665
+ * What a click on the focused mark does: its mousedown selects it
43666
+ * (dataPointSelection), its mouseup slides a pie slice out and fires
43667
+ * markerClick.
43668
+ * @param {KeyboardEvent} e
43669
+ */
43670
+ _fireClick(e2) {
43671
+ var _a, _b;
43672
+ const el = (
43673
+ /** @type {any} */
43674
+ (_a = this._focusedEl) == null ? void 0 : _a.instance
43675
+ );
43676
+ const pie = this.ctx.pie;
43677
+ if (el) new Graphics(this.w, this.ctx).pathMouseDown(el, e2);
43678
+ if (pie && pie.getExpandOffset() > 0) pie.pieClicked(this.dataPointIndex);
43679
+ (_b = this.w.globals.tooltip) == null ? void 0 : _b.markerClick(
43680
+ e2,
43681
+ this.seriesIndex,
43682
+ this.dataPointIndex
43683
+ );
43523
43684
  }
43524
43685
  // ─── Helpers ──────────────────────────────────────────────────────────────
43525
43686
  _isNavEnabled() {
@@ -43543,8 +43704,8 @@ class KeyboardNavigation {
43543
43704
  if (type === "pie" || type === "donut" || type === "polarArea") {
43544
43705
  return w.seriesData.series.length;
43545
43706
  }
43546
- const series = w.seriesData.series;
43547
- return series[si] && Array.isArray(series[si]) ? series[si].length : 0;
43707
+ const s2 = w.seriesData.series[si];
43708
+ return Array.isArray(s2) ? s2.length : 1;
43548
43709
  }
43549
43710
  _clampCursor() {
43550
43711
  const seriesCount = this._getSeriesCount();
@@ -47726,7 +47887,8 @@ class BarDataLabels {
47726
47887
  barXPosition,
47727
47888
  barYPosition,
47728
47889
  visibleSeries,
47729
- hl
47890
+ hl,
47891
+ noLabel
47730
47892
  } = opts;
47731
47893
  const w = this.w;
47732
47894
  const graphics = new Graphics(this.barCtx.w);
@@ -47840,7 +48002,7 @@ class BarDataLabels {
47840
48002
  dataLabelsPos.dataLabelsX = (box.levelStart + box.levelEnd) / 2 + offX;
47841
48003
  }
47842
48004
  }
47843
- dataLabels = this.drawCalculatedDataLabels({
48005
+ dataLabels = noLabel ? null : this.drawCalculatedDataLabels({
47844
48006
  x: dataLabelsPos.dataLabelsX,
47845
48007
  y: dataLabelsPos.dataLabelsY,
47846
48008
  neg: params.neg,
@@ -47926,8 +48088,8 @@ class BarDataLabels {
47926
48088
  return ctx && byGroups && byGroups[ctx.groupIndex] ? byGroups[ctx.groupIndex][j2] : this.barCtx.stackedSeriesTotals[j2];
47927
48089
  }
47928
48090
  /**
47929
- * The running stack at this column's x (BarStacked `tops`, columns only) on
47930
- * a numeric axis, where columns stack by x rather than by index.
48091
+ * The running stack at this bar's x (BarStacked `tops`) on a numeric axis,
48092
+ * where bars stack by x rather than by index.
47931
48093
  * @param {number} realIndex @param {number} j
47932
48094
  */
47933
48095
  xStackTop(realIndex, j2) {
@@ -47936,6 +48098,21 @@ class BarDataLabels {
47936
48098
  return w.axisFlags.isXNumeric && /** @type {any} */
47937
48099
  ((_b = (_a = this.barCtx.stacks) == null ? void 0 : _a[w.labelData.seriesGroupIndex[realIndex]]) == null ? void 0 : _b.tops.get(w.seriesData.seriesX[realIndex][j2]));
47938
48100
  }
48101
+ /**
48102
+ * The stacked total's text box, measured in the total's own font.
48103
+ * @param {number} realIndex @param {number} j
48104
+ */
48105
+ totalRects(realIndex, j2) {
48106
+ const s2 = this.barCtx.barOptions.dataLabels.total.style;
48107
+ return new Graphics(this.w).getTextRects(
48108
+ this.getStackedTotalDataLabel({ realIndex, j: j2 }),
48109
+ s2.fontSize,
48110
+ s2.fontFamily,
48111
+ void 0,
48112
+ true,
48113
+ s2.fontWeight
48114
+ );
48115
+ }
47939
48116
  /** @param {{realIndex: any, j: any}} opts */
47940
48117
  getStackedTotalDataLabel({ realIndex, j: j2 }) {
47941
48118
  const w = this.w;
@@ -47956,7 +48133,6 @@ class BarDataLabels {
47956
48133
  var _a;
47957
48134
  const w = this.w;
47958
48135
  let {
47959
- i: i2,
47960
48136
  j: j2,
47961
48137
  realIndex,
47962
48138
  y,
@@ -47966,7 +48142,6 @@ class BarDataLabels {
47966
48142
  textRects,
47967
48143
  dataLabelsX,
47968
48144
  dataLabelsY,
47969
- dataLabelsConfig,
47970
48145
  barDataLabelsConfig,
47971
48146
  barTotalDataLabelsConfig,
47972
48147
  strokeWidth,
@@ -47980,7 +48155,7 @@ class BarDataLabels {
47980
48155
  barHeight = Math.abs(barHeight);
47981
48156
  const vertical = w.config.plotOptions.bar.dataLabels.orientation === "vertical";
47982
48157
  const { zeroEncounters } = this.barCtx.barHelpers.getZeroValueEncounters({
47983
- i: i2,
48158
+ i: realIndex,
47984
48159
  j: j2
47985
48160
  });
47986
48161
  bcx = bcx - strokeWidth / 2;
@@ -48001,7 +48176,7 @@ class BarDataLabels {
48001
48176
  const offsetDLX = 2;
48002
48177
  dataLabelsX = dataLabelsX + textRects.height / 2 - strokeWidth / 2 - offsetDLX;
48003
48178
  }
48004
- const valIsNegative = (_a = opts.neg) != null ? _a : w.seriesData.series[i2][j2] < 0;
48179
+ const valIsNegative = (_a = opts.neg) != null ? _a : w.seriesData.series[realIndex][j2] < 0;
48005
48180
  let newY = y;
48006
48181
  if (this.barCtx.isReversed) {
48007
48182
  newY = y + (valIsNegative ? barHeight : -barHeight);
@@ -48075,16 +48250,11 @@ class BarDataLabels {
48075
48250
  });
48076
48251
  if (this.hlt) lowestPrevY = this.hlt.edge;
48077
48252
  if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {
48078
- const ADDITIONAL_OFFY = 18;
48079
- const graphics = new Graphics(this.barCtx.w);
48080
- const totalLabeltextRects = graphics.getTextRects(
48081
- this.getStackedTotalDataLabel({ realIndex, j: j2 }),
48082
- dataLabelsConfig.fontSize
48083
- );
48253
+ const h = this.totalRects(realIndex, j2).height;
48084
48254
  if (valIsNegative) {
48085
- totalDataLabelsY = lowestPrevY - totalLabeltextRects.height / 2 - offY - barTotalDataLabelsConfig.offsetY + ADDITIONAL_OFFY;
48255
+ totalDataLabelsY = lowestPrevY + h * 0.77 - offY - barTotalDataLabelsConfig.offsetY;
48086
48256
  } else {
48087
- totalDataLabelsY = lowestPrevY + totalLabeltextRects.height + offY + barTotalDataLabelsConfig.offsetY - ADDITIONAL_OFFY;
48257
+ totalDataLabelsY = lowestPrevY - h * 0.3 + offY + barTotalDataLabelsConfig.offsetY;
48088
48258
  }
48089
48259
  const xDivision = dataPointsDividedWidth;
48090
48260
  totalDataLabelsX = totalDataLabelsBcx + (w.axisFlags.isXNumeric ? -barWidth / 2 : barWidth / 2 - xDivision) + barTotalDataLabelsConfig.offsetX;
@@ -48114,7 +48284,6 @@ class BarDataLabels {
48114
48284
  const w = this.w;
48115
48285
  let {
48116
48286
  x: x2,
48117
- i: i2,
48118
48287
  j: j2,
48119
48288
  realIndex,
48120
48289
  bcy,
@@ -48131,7 +48300,7 @@ class BarDataLabels {
48131
48300
  } = opts;
48132
48301
  const dataPointsDividedHeight = w.layout.gridHeight / w.globals.dataPoints;
48133
48302
  const { zeroEncounters } = this.barCtx.barHelpers.getZeroValueEncounters({
48134
- i: i2,
48303
+ i: realIndex,
48135
48304
  j: j2
48136
48305
  });
48137
48306
  barWidth = Math.abs(barWidth);
@@ -48148,7 +48317,7 @@ class BarDataLabels {
48148
48317
  let totalDataLabelsX;
48149
48318
  let totalDataLabelsY;
48150
48319
  let totalDataLabelsAnchor = "start";
48151
- const valIsNegative = (_b = opts.neg) != null ? _b : w.seriesData.series[i2][j2] < 0;
48320
+ const valIsNegative = (_b = opts.neg) != null ? _b : w.seriesData.series[realIndex][j2] < 0;
48152
48321
  let newX = x2;
48153
48322
  if (this.barCtx.isReversed) {
48154
48323
  newX = x2 + (valIsNegative ? -barWidth : barWidth);
@@ -48183,10 +48352,14 @@ class BarDataLabels {
48183
48352
  }
48184
48353
  let lowestPrevX = newX;
48185
48354
  const totalGroupCtx = this.getTotalGroupContext(realIndex);
48186
- const stacks = (
48355
+ const top = this.xStackTop(realIndex, j2);
48356
+ const stacks = top ? [] : (
48187
48357
  /** @type {any} */
48188
48358
  this.barCtx.stacks || []
48189
48359
  );
48360
+ if (top) {
48361
+ lowestPrevX = valIsNegative ? Math.min(newX, top[4]) : Math.max(newX, top[5]);
48362
+ }
48190
48363
  stacks.forEach((g, gi) => {
48191
48364
  if (totalGroupCtx && gi !== totalGroupCtx.groupIndex) return;
48192
48365
  g.prevX.forEach((arr) => {
@@ -48199,11 +48372,7 @@ class BarDataLabels {
48199
48372
  });
48200
48373
  if (this.hlt) lowestPrevX = this.hlt.edge;
48201
48374
  if (this.drawsStackedTotal(realIndex) && barTotalDataLabelsConfig.enabled) {
48202
- const graphics = new Graphics(this.barCtx.w);
48203
- const totalLabeltextRects = graphics.getTextRects(
48204
- this.getStackedTotalDataLabel({ realIndex, j: j2 }),
48205
- dataLabelsConfig.fontSize
48206
- );
48375
+ const totalLabeltextRects = this.totalRects(realIndex, j2);
48207
48376
  if (valIsNegative) {
48208
48377
  totalDataLabelsX = lowestPrevX - strokeWidth - offX - barTotalDataLabelsConfig.offsetX;
48209
48378
  totalDataLabelsAnchor = "end";
@@ -48272,8 +48441,9 @@ class BarDataLabels {
48272
48441
  let elDataLabelsWrap = null;
48273
48442
  const isSeriesCollapsed = w.globals.collapsedSeriesIndices.indexOf(i2) > -1;
48274
48443
  const isSeriesCollapsing = (w.globals.collapsingSeriesIndices || []).indexOf(i2) > -1;
48444
+ const dlKey = `${i2}::${this.barCtx._keys(i2)[j2]}`;
48275
48445
  if (isSeriesCollapsing) {
48276
- const prev = (_a = w.globals.prevDataLabels) == null ? void 0 : _a.get(`${i2}::${datumKey(w, i2, j2)}`);
48446
+ const prev = (_a = w.globals.prevDataLabels) == null ? void 0 : _a.get(dlKey);
48277
48447
  if (prev && isFinite(prev.val)) {
48278
48448
  val = prev.val;
48279
48449
  text = void 0;
@@ -48286,10 +48456,7 @@ class BarDataLabels {
48286
48456
  });
48287
48457
  const dlCfg = w.config.dataLabels;
48288
48458
  if (((_b = dlCfg.animate) == null ? void 0 : _b.enabled) || ((_c = dlCfg.countUp) == null ? void 0 : _c.enabled)) {
48289
- elDataLabelsWrap.node.setAttribute(
48290
- "data:dlKey",
48291
- `${i2}::${datumKey(w, i2, j2)}`
48292
- );
48459
+ elDataLabelsWrap.node.setAttribute("data:dlKey", dlKey);
48293
48460
  elDataLabelsWrap.node.setAttribute("data:dlJ", String(j2));
48294
48461
  if (typeof val === "number" && isFinite(val)) {
48295
48462
  elDataLabelsWrap.node.setAttribute("data:dlVal", String(val));
@@ -48307,29 +48474,12 @@ class BarDataLabels {
48307
48474
  if (!val && w.config.plotOptions.bar.hideZeroBarsWhenGrouped) {
48308
48475
  text = "";
48309
48476
  }
48310
- const valIsNegative = neg != null ? neg : w.seriesData.series[i2][j2] < 0;
48311
- const position = w.config.plotOptions.bar.dataLabels.position;
48477
+ let anchor = dataLabelsConfig.textAnchor;
48312
48478
  if (w.config.plotOptions.bar.dataLabels.orientation === "vertical") {
48313
- if (position === "top") {
48314
- if (valIsNegative) dataLabelsConfig.textAnchor = "end";
48315
- else dataLabelsConfig.textAnchor = "start";
48316
- }
48317
- if (position === "center") {
48318
- dataLabelsConfig.textAnchor = "middle";
48319
- }
48320
- if (position === "bottom") {
48321
- if (valIsNegative) dataLabelsConfig.textAnchor = "end";
48322
- else dataLabelsConfig.textAnchor = "start";
48323
- }
48479
+ anchor = w.config.plotOptions.bar.dataLabels.position === "center" ? "middle" : (neg != null ? neg : w.seriesData.series[i2][j2] < 0) ? "end" : "start";
48324
48480
  }
48325
- if (this.barCtx.isRangeBar && this.barCtx.barOptions.dataLabels.hideOverflowingLabels) {
48326
- const txRect = graphics.getTextRects(
48327
- text,
48328
- parseFloat(dataLabelsConfig.style.fontSize).toString()
48329
- );
48330
- if (barWidth < txRect.width) {
48331
- text = "";
48332
- }
48481
+ if (this.barCtx.isRangeBar && this.barCtx.barOptions.dataLabels.hideOverflowingLabels && barWidth < textRects.width) {
48482
+ text = "";
48333
48483
  }
48334
48484
  if (w.config.chart.stacked && this.barCtx.barOptions.dataLabels.hideOverflowingLabels && // A collapsing series is measured against its NEW extent, which is
48335
48485
  // already zero, so this would blank a label whose bar is still at full
@@ -48345,14 +48495,14 @@ class BarDataLabels {
48345
48495
  }
48346
48496
  }
48347
48497
  }
48348
- const modifiedDataLabelsConfig = __spreadValues({}, dataLabelsConfig);
48349
- if (this.barCtx.isHorizontal) {
48350
- if (val < 0) {
48351
- if (dataLabelsConfig.textAnchor === "start") {
48352
- modifiedDataLabelsConfig.textAnchor = "end";
48353
- } else if (dataLabelsConfig.textAnchor === "end") {
48354
- modifiedDataLabelsConfig.textAnchor = "start";
48355
- }
48498
+ const modifiedDataLabelsConfig = __spreadProps(__spreadValues({}, dataLabelsConfig), {
48499
+ textAnchor: anchor
48500
+ });
48501
+ if (this.barCtx.isHorizontal && val < 0) {
48502
+ if (anchor === "start") {
48503
+ modifiedDataLabelsConfig.textAnchor = "end";
48504
+ } else if (anchor === "end") {
48505
+ modifiedDataLabelsConfig.textAnchor = "start";
48356
48506
  }
48357
48507
  }
48358
48508
  dataLabels.plotDataLabelsText({
@@ -48404,7 +48554,7 @@ class BarDataLabels {
48404
48554
  const { groupIndex } = this.barCtx.barHelpers.getGroupIndex(realIndex);
48405
48555
  totalDataLabelText.node.setAttribute(
48406
48556
  "data:dlTotalKey",
48407
- `${groupIndex}::${datumKey(this.w, realIndex, j2)}`
48557
+ `${groupIndex}::${this.barCtx._keys(realIndex)[j2]}`
48408
48558
  );
48409
48559
  totalDataLabelText.node.setAttribute(
48410
48560
  "data:dlTotalSeries",
@@ -48434,9 +48584,11 @@ let Helpers$1 = class Helpers4 {
48434
48584
  }
48435
48585
  /**
48436
48586
  * @param {any[]} series
48587
+ * @param {any} [seriesIndex] a combo's real indices of `series`
48437
48588
  */
48438
- initVariables(series) {
48589
+ initVariables(series, seriesIndex) {
48439
48590
  const w = this.w;
48591
+ this.seriesIndex = seriesIndex;
48440
48592
  this.barCtx.series = series;
48441
48593
  this.barCtx.totalItems = 0;
48442
48594
  this.barCtx.seriesLen = 0;
@@ -48457,6 +48609,8 @@ let Helpers$1 = class Helpers4 {
48457
48609
  this.barCtx.visibleItems = w.globals.dataPoints;
48458
48610
  }
48459
48611
  }
48612
+ const labels = w.labelData.labels;
48613
+ this.rows = w.globals.isBarHorizontal && w.axisFlags.isXNumeric && !this.barCtx.isRangeBar && w.seriesData.seriesX.some((s2) => s2 == null ? void 0 : s2.some((x2, j2) => x2 !== labels[j2])) ? new Map(labels.map((x2, r2) => [x2, r2])) : null;
48460
48614
  this.arrBorderRadius = this.createBorderRadiusArr(w.seriesData.series);
48461
48615
  if (Utils$1.isSafari()) {
48462
48616
  this.arrBorderRadius = this.arrBorderRadius.map(
@@ -48521,15 +48675,19 @@ let Helpers$1 = class Helpers4 {
48521
48675
  * Collapsed series count too, exactly as they did for `minXDiff`. Skipping
48522
48676
  * them would widen every bar the moment someone hid the tightest-spaced
48523
48677
  * series from the legend, so bar geometry would depend on legend state.
48678
+ * In a combo only this renderer's own series count: a line's x values say
48679
+ * nothing about how wide a column may be.
48524
48680
  *
48525
48681
  * @returns {number}
48526
48682
  */
48527
48683
  _unionMinXGap() {
48528
48684
  const w = this.w;
48529
48685
  const seriesX = w.seriesData.seriesX || [];
48686
+ const own = this.seriesIndex;
48530
48687
  const arrays = [];
48531
48688
  for (let i2 = 0; i2 < seriesX.length; i2++) {
48532
48689
  const xs = seriesX[i2];
48690
+ if (own && own.indexOf(i2) < 0) continue;
48533
48691
  if (Array.isArray(xs) && xs.length > 0) {
48534
48692
  arrays.push(
48535
48693
  xs.some((v, n2) => v < xs[n2 - 1]) ? xs.filter((v) => v === +v).sort((a2, b) => a2 - b) : xs
@@ -48570,6 +48728,15 @@ let Helpers$1 = class Helpers4 {
48570
48728
  }
48571
48729
  return isFinite(min) ? min : 0;
48572
48730
  }
48731
+ /**
48732
+ * The band a horizontal bar is drawn in: its x's band when the series do
48733
+ * not line up by index (see initVariables), else its index.
48734
+ * @param {number} realIndex @param {number} j
48735
+ */
48736
+ barRow(realIndex, j2) {
48737
+ var _a, _b, _c;
48738
+ return (_c = (_b = this.rows) == null ? void 0 : _b.get((_a = this.w.seriesData.seriesX[realIndex]) == null ? void 0 : _a[j2])) != null ? _c : j2;
48739
+ }
48573
48740
  /**
48574
48741
  * @param {number} realIndex
48575
48742
  */
@@ -48692,7 +48859,7 @@ let Helpers$1 = class Helpers4 {
48692
48859
  });
48693
48860
  }
48694
48861
  const connectorFill = this.getDumbbellConnectorFill(i2, j2);
48695
- const datumFill = connectorFill || ((_a = w.config.series[i2].data[j2]) == null ? void 0 : _a.fill);
48862
+ const datumFill = connectorFill || ((_a = w.config.series[realIndex].data[j2]) == null ? void 0 : _a.fill);
48696
48863
  const connector = this.barCtx.barOptions.isDumbbell ? w.config.plotOptions.bar.dumbbell.connector : null;
48697
48864
  let connectorOpacity;
48698
48865
  if (connector && connector.color) {
@@ -48845,11 +49012,10 @@ let Helpers$1 = class Helpers4 {
48845
49012
  * @returns {string[][]}
48846
49013
  */
48847
49014
  createBorderRadiusArr(series) {
48848
- var _a;
48849
49015
  const w = this.w;
48850
49016
  const alwaysApplyRadius = !this.w.config.chart.stacked || w.config.plotOptions.bar.borderRadius <= 0;
48851
49017
  const numSeries = series.length;
48852
- const numColumns = ((_a = series[0]) == null ? void 0 : _a.length) | 0;
49018
+ const numColumns = Math.max(0, ...series.map((s2) => (s2 == null ? void 0 : s2.length) | 0));
48853
49019
  const output = Array.from(
48854
49020
  { length: numSeries },
48855
49021
  () => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
@@ -49005,7 +49171,7 @@ let Helpers$1 = class Helpers4 {
49005
49171
  j: j2,
49006
49172
  w
49007
49173
  }) {
49008
- var _a, _b;
49174
+ var _a, _b, _c;
49009
49175
  const r2 = this.barRect({
49010
49176
  a: barXPosition,
49011
49177
  len: barWidth,
@@ -49036,7 +49202,7 @@ let Helpers$1 = class Helpers4 {
49036
49202
  const _ctx = this.barCtx.groupCtx;
49037
49203
  _ctx.yArrj.push(y2 - strokeCenter * direction);
49038
49204
  _ctx.yArrjF.push(Math.abs(y1 - y2 + r2.strokeWidth * direction));
49039
- _ctx.yArrjVal.push(this.barCtx.series[i2][j2]);
49205
+ _ctx.yArrjVal.push((_c = this.barCtx.series[i2][j2]) != null ? _c : null);
49040
49206
  }
49041
49207
  return {
49042
49208
  pathTo,
@@ -49226,7 +49392,7 @@ let Helpers$1 = class Helpers4 {
49226
49392
  j: j2,
49227
49393
  w
49228
49394
  }) {
49229
- var _a, _b;
49395
+ var _a, _b, _c;
49230
49396
  const graphics = new Graphics(this.barCtx.w);
49231
49397
  const r2 = this.barRect({
49232
49398
  a: barYPosition,
@@ -49262,7 +49428,7 @@ let Helpers$1 = class Helpers4 {
49262
49428
  const _ctx = this.barCtx.groupCtx;
49263
49429
  _ctx.xArrj.push(x2 + strokeCenter * direction);
49264
49430
  _ctx.xArrjF.push(Math.abs(x1 - x2 - r2.strokeWidth * direction));
49265
- _ctx.xArrjVal.push(this.barCtx.series[i2][j2]);
49431
+ _ctx.xArrjVal.push((_c = this.barCtx.series[i2][j2]) != null ? _c : null);
49266
49432
  }
49267
49433
  return {
49268
49434
  pathTo,
@@ -49307,6 +49473,9 @@ let Helpers$1 = class Helpers4 {
49307
49473
  const w = this.w;
49308
49474
  const goals = [];
49309
49475
  const pushGoal = (value, attrs) => {
49476
+ if (!w.globals.invalidLogScale) {
49477
+ value = new CoreUtils(w).getLogValAtSeriesIndex(value, i2);
49478
+ }
49310
49479
  goals.push({
49311
49480
  [type]: type === "x" ? this.getXForValue(value, zeroW, false) : this.getYForValue(value, zeroH, translationsIndex, false),
49312
49481
  attrs
@@ -49561,11 +49730,11 @@ let Helpers$1 = class Helpers4 {
49561
49730
  let zeroEncounters = 0;
49562
49731
  const seriesIndices = w.config.plotOptions.bar.horizontal ? w.seriesData.series.map((_, _i) => _i) : ((_a = w.globals.columnSeries) == null ? void 0 : _a.i.map((_i) => _i)) || [];
49563
49732
  seriesIndices.forEach((_si) => {
49564
- const val = w.globals.seriesPercent[_si][j2];
49733
+ const val = w.seriesData.series[_si][j2];
49565
49734
  if (val) {
49566
49735
  nonZeroColumns++;
49567
49736
  }
49568
- if (_si < i2 && val === 0) {
49737
+ if (_si < i2 && !val) {
49569
49738
  zeroEncounters++;
49570
49739
  }
49571
49740
  });
@@ -49668,15 +49837,17 @@ class Bar {
49668
49837
  /**
49669
49838
  * Point the per-series axis state at this series' y axis. Every bar-family
49670
49839
  * renderer calls it before initialPositions, which reads the baseline by
49671
- * this.translationsIndex.
49840
+ * this.translationsIndex and flips it for a reversed axis.
49672
49841
  * @param {number} realIndex
49673
49842
  * @return {number} translationsIndex
49674
49843
  */
49675
49844
  setSeriesAxis(realIndex) {
49845
+ var _a;
49676
49846
  if (this.yRatio.length > 1) {
49677
49847
  this.yaxisIndex = this.w.globals.seriesYAxisReverseMap[realIndex];
49678
49848
  this.translationsIndex = realIndex;
49679
49849
  }
49850
+ this.isReversed = (_a = this.w.config.yaxis[this.yaxisIndex]) == null ? void 0 : _a.reversed;
49680
49851
  return this.translationsIndex;
49681
49852
  }
49682
49853
  /** primary draw method which is called on bar object
@@ -49693,7 +49864,7 @@ class Bar {
49693
49864
  series = coreUtils.getLogSeries(series);
49694
49865
  this.series = series;
49695
49866
  this.yRatio = coreUtils.getLogYRatios(this.yRatio);
49696
- this.barHelpers.initVariables(series);
49867
+ this.barHelpers.initVariables(series, seriesIndex);
49697
49868
  const ret = graphics.group({
49698
49869
  class: "apexcharts-bar-series apexcharts-plot-series"
49699
49870
  });
@@ -49725,7 +49896,6 @@ class Bar {
49725
49896
  this.visibleI = this.visibleI + 1;
49726
49897
  }
49727
49898
  const translationsIndex = this.setSeriesAxis(realIndex);
49728
- this.isReversed = w.config.yaxis[this.yaxisIndex] && w.config.yaxis[this.yaxisIndex].reversed;
49729
49899
  if (this.isPyramid) {
49730
49900
  this.pyramidLayout = this.barHelpers.computePyramidLayout(series[i2]);
49731
49901
  }
@@ -49803,7 +49973,9 @@ class Bar {
49803
49973
  elSeries
49804
49974
  };
49805
49975
  if (this.isHorizontal) {
49806
- paths = this.drawBarPaths(__spreadProps(__spreadValues({}, pathsParams), {
49976
+ paths = this.drawBarPaths(__spreadProps(__spreadValues(__spreadValues({}, pathsParams), this.barHelpers.rows && {
49977
+ y: initY + this.barHelpers.barRow(realIndex, j2) * yDivision
49978
+ }), {
49807
49979
  barHeight,
49808
49980
  zeroW,
49809
49981
  yDivision
@@ -49885,6 +50057,7 @@ class Bar {
49885
50057
  series,
49886
50058
  barHeight: Math.abs(paths.barHeight ? paths.barHeight : barHeight),
49887
50059
  barWidth: Math.abs(paths.barWidth ? paths.barWidth : barWidth),
50060
+ barXPosition: paths.barXPosition,
49888
50061
  elDataLabelsWrap,
49889
50062
  elGoalsMarkers,
49890
50063
  elBarShadows,
@@ -49895,15 +50068,11 @@ class Bar {
49895
50068
  w.globals.seriesXvalues[realIndex] = xArrj;
49896
50069
  w.globals.seriesYvalues[realIndex] = yArrj;
49897
50070
  if (w.globals.previousPaths.length > 0) {
49898
- const newKeys = [];
49899
- for (let j2 = 0; j2 < series[i2].length; j2++) {
49900
- newKeys.push(datumKey(w, realIndex, j2));
49901
- }
49902
50071
  renderBarExitGhosts({
49903
50072
  w,
49904
50073
  elSeries,
49905
50074
  record: this._prevRecord(realIndex),
49906
- newKeys,
50075
+ newKeys: this._keys(realIndex),
49907
50076
  isHorizontal: this.isHorizontal,
49908
50077
  speed: w.config.chart.animations.dynamicAnimation.speed
49909
50078
  });
@@ -49912,7 +50081,7 @@ class Bar {
49912
50081
  }
49913
50082
  return ret;
49914
50083
  }
49915
- /** @param {{ hl?: any, realIndex?: any, pathFill?: any, lineFill?: any, j?: any, i?: any, columnGroupIndex?: any, pathFrom?: any, pathTo?: any, strokeWidth?: any, elSeries?: any, x?: any, y?: any, y1?: any, y2?: any, series?: any, barHeight?: any, barWidth?: any, barXPosition?: any, barYPosition?: any, elDataLabelsWrap?: any, elGoalsMarkers?: any, elBarShadows?: any, visibleSeries?: any, type?: any, classes?: any, fadeReveal?: boolean }} opts */
50084
+ /** @param {{ hl?: any, realIndex?: any, pathFill?: any, lineFill?: any, j?: any, i?: any, columnGroupIndex?: any, pathFrom?: any, pathTo?: any, strokeWidth?: any, elSeries?: any, x?: any, y?: any, y1?: any, y2?: any, series?: any, barHeight?: any, barWidth?: any, barXPosition?: any, barYPosition?: any, elDataLabelsWrap?: any, elGoalsMarkers?: any, elBarShadows?: any, visibleSeries?: any, type?: any, classes?: any, fadeReveal?: boolean, noLabel?: boolean }} opts */
49916
50085
  renderSeries({
49917
50086
  hl,
49918
50087
  realIndex,
@@ -49944,7 +50113,9 @@ class Bar {
49944
50113
  visibleSeries,
49945
50114
  type,
49946
50115
  classes,
49947
- fadeReveal = false
50116
+ fadeReveal = false,
50117
+ noLabel
50118
+ // a datum's extra paths (box halves, box lane) label nothing
49948
50119
  }) {
49949
50120
  var _a, _b, _c, _d, _e, _f, _g;
49950
50121
  const w = this.w;
@@ -50018,7 +50189,8 @@ class Bar {
50018
50189
  barXPosition,
50019
50190
  barYPosition,
50020
50191
  visibleSeries,
50021
- hl: hl == null ? void 0 : hl.label
50192
+ hl: hl == null ? void 0 : hl.label,
50193
+ noLabel
50022
50194
  })
50023
50195
  );
50024
50196
  if (delayMs > 0) {
@@ -50034,19 +50206,18 @@ class Bar {
50034
50206
  }
50035
50207
  let leaving = false;
50036
50208
  if (!w.globals.isBarHorizontal) {
50037
- if (dataLabelsObj.dataLabelsPos.dataLabelsX + Math.max(barWidth, w.globals.barPadForNumericAxis) < 0 || dataLabelsObj.dataLabelsPos.dataLabelsX - Math.max(barWidth, w.globals.barPadForNumericAxis) > w.layout.gridWidth) {
50209
+ const cx = barXPosition === void 0 ? dataLabelsObj.dataLabelsPos.dataLabelsX : barXPosition + barWidth / 2;
50210
+ const pad = Math.max(barWidth, w.globals.barPadForNumericAxis);
50211
+ if (cx + pad < 0 || cx - pad > w.layout.gridWidth) {
50038
50212
  if (this._wasOnScreen(realIndex, j2)) leaving = true;
50039
50213
  else skipDrawing = true;
50040
50214
  }
50041
50215
  }
50042
- if (
50043
- /** @type {Record<string,any>} */
50044
- w.config.series[i2].data[j2] && /** @type {Record<string,any>} */
50045
- w.config.series[i2].data[j2].strokeColor
50046
- ) {
50047
- lineFill = /** @type {Record<string,any>} */
50048
- w.config.series[i2].data[j2].strokeColor;
50049
- }
50216
+ const datum = (
50217
+ /** @type {any} */
50218
+ w.config.series[realIndex].data[j2]
50219
+ );
50220
+ if (datum && datum.strokeColor) lineFill = datum.strokeColor;
50050
50221
  const fill = pathFill;
50051
50222
  if (this.isNullValue && w.globals.collapsingSeriesIndices.indexOf(realIndex) === -1) {
50052
50223
  pathFill = "none";
@@ -50069,7 +50240,7 @@ class Bar {
50069
50240
  pathTo,
50070
50241
  stroke: lineFill,
50071
50242
  strokeWidth,
50072
- strokeLineCap: w.config.stroke.lineCap,
50243
+ strokeLinecap: w.config.stroke.lineCap,
50073
50244
  fill: pathFill,
50074
50245
  pathToInterp,
50075
50246
  animationDelay: delay,
@@ -50121,12 +50292,12 @@ class Bar {
50121
50292
  cy: dataLabelsObj.dataLabelsPos.bcy,
50122
50293
  cx: dataLabelsObj.dataLabelsPos.bcx,
50123
50294
  j: j2,
50124
- val: w.seriesData.series[i2][j2],
50295
+ val: w.seriesData.series[realIndex][j2],
50125
50296
  barHeight,
50126
50297
  barWidth,
50127
50298
  // Datum identity for the next update's keyed join (see
50128
50299
  // LengthTransition): survivors match by key, not array position.
50129
- "data:pathKey": datumKey(w, realIndex, j2)
50300
+ "data:pathKey": this._keys(realIndex)[j2]
50130
50301
  });
50131
50302
  hl == null ? void 0 : hl.paint(renderedPath, {
50132
50303
  delay,
@@ -50202,7 +50373,10 @@ class Bar {
50202
50373
  const j2 = indexes.j;
50203
50374
  let barYPosition;
50204
50375
  if (w.config.plotOptions.bar.hideZeroBarsWhenGrouped) {
50205
- const { nonZeroColumns, zeroEncounters } = this.barHelpers.getZeroValueEncounters({ i: i2, j: j2 });
50376
+ const { nonZeroColumns, zeroEncounters } = this.barHelpers.getZeroValueEncounters({
50377
+ i: indexes.realIndex,
50378
+ j: j2
50379
+ });
50206
50380
  if (nonZeroColumns > 0) {
50207
50381
  barHeight = this.seriesLen * barHeight / nonZeroColumns;
50208
50382
  }
@@ -50341,7 +50515,7 @@ class Bar {
50341
50515
  barXPosition = xForNumericX.barXPosition;
50342
50516
  } else {
50343
50517
  if (w.config.plotOptions.bar.hideZeroBarsWhenGrouped) {
50344
- const { nonZeroColumns, zeroEncounters } = this.barHelpers.getZeroValueEncounters({ i: i2, j: j2 });
50518
+ const { nonZeroColumns, zeroEncounters } = this.barHelpers.getZeroValueEncounters({ i: realIndex, j: j2 });
50345
50519
  if (nonZeroColumns > 0) {
50346
50520
  barWidth = this.seriesLen * barWidth / nonZeroColumns;
50347
50521
  }
@@ -50405,15 +50579,16 @@ class Bar {
50405
50579
  /** @param {{x: any, barWidth: any, realIndex: any, j: any}} opts */
50406
50580
  getBarXForNumericXAxis({ x: x2, barWidth, realIndex, j: j2 }) {
50407
50581
  const w = this.w;
50582
+ const overlay = isHistogramOverlay(w);
50408
50583
  let sxI = realIndex;
50409
50584
  if (!w.seriesData.seriesX[realIndex].length) {
50410
50585
  sxI = w.globals.maxValsInArrayIndex;
50411
50586
  }
50412
50587
  if (Utils$1.isNumber(w.seriesData.seriesX[sxI][j2])) {
50413
- x2 = AxisMapping.dataXToPx(w, w.seriesData.seriesX[sxI][j2]) - barWidth * this.seriesLen / 2;
50588
+ x2 = AxisMapping.dataXToPx(w, w.seriesData.seriesX[sxI][j2]) - barWidth * (overlay ? 1 : this.seriesLen) / 2;
50414
50589
  }
50415
50590
  return {
50416
- barXPosition: x2 + (isHistogramOverlay(w) ? 0 : barWidth * this.visibleI),
50591
+ barXPosition: x2 + (overlay ? 0 : barWidth * this.visibleI),
50417
50592
  x: x2
50418
50593
  };
50419
50594
  }
@@ -50434,7 +50609,20 @@ class Bar {
50434
50609
  _wasOnScreen(realIndex, j2) {
50435
50610
  if (!lengthTransitionEnabled(this.w)) return false;
50436
50611
  const keyed = this._prevKeyedPaths(realIndex);
50437
- return !!keyed && keyed.has(datumKey(this.w, realIndex, j2));
50612
+ return !!keyed && keyed.has(this._keys(realIndex)[j2]);
50613
+ }
50614
+ /**
50615
+ * This render's datum keys for a series (see seriesKeys), as stamped on
50616
+ * each bar and looked up in the previous render's.
50617
+ * @param {number} realIndex
50618
+ * @returns {string[]}
50619
+ */
50620
+ _keys(realIndex) {
50621
+ const c = (
50622
+ /** @type {any} */
50623
+ this._keyCache || (this._keyCache = {})
50624
+ );
50625
+ return c[realIndex] || (c[realIndex] = seriesKeys(this.w, realIndex));
50438
50626
  }
50439
50627
  /**
50440
50628
  * The captured previous-render record for a series (last match wins, same
@@ -50490,7 +50678,7 @@ class Bar {
50490
50678
  * @returns {boolean}
50491
50679
  */
50492
50680
  isLengthTransition(realIndex) {
50493
- var _a, _b;
50681
+ var _a, _b, _c, _d, _e, _f;
50494
50682
  if (!this._ltCache) this._ltCache = {};
50495
50683
  if (this._ltCache[realIndex] !== void 0) return this._ltCache[realIndex];
50496
50684
  const w = this.w;
@@ -50498,20 +50686,14 @@ class Bar {
50498
50686
  if (lengthTransitionEnabled(w) && w.globals.previousPaths.length > 0) {
50499
50687
  const record = this._prevRecord(realIndex);
50500
50688
  const dataLen = (_b = (_a = w.seriesData.series[realIndex]) == null ? void 0 : _a.length) != null ? _b : 0;
50689
+ const keyed = record && this._prevKeyedPaths(realIndex);
50501
50690
  if (!record) {
50502
50691
  result = dataLen > 0;
50503
- } else if (record.paths.length !== dataLen) {
50504
- result = true;
50692
+ } else if (keyed) {
50693
+ const now = new Set(this._keys(realIndex));
50694
+ result = ((_f = (_e = (_d = (_c = w.globals.prevStreamFrame) == null ? void 0 : _c.seriesY) == null ? void 0 : _d[realIndex]) == null ? void 0 : _e.length) != null ? _f : dataLen) !== dataLen || [...keyed.keys()].some((k2) => !now.has(k2));
50505
50695
  } else {
50506
- const keyed = this._prevKeyedPaths(realIndex);
50507
- if (keyed) {
50508
- for (let j2 = 0; j2 < dataLen; j2++) {
50509
- if (!keyed.has(datumKey(w, realIndex, j2))) {
50510
- result = true;
50511
- break;
50512
- }
50513
- }
50514
- }
50696
+ result = record.paths.length !== dataLen;
50515
50697
  }
50516
50698
  }
50517
50699
  this._ltCache[realIndex] = result;
@@ -50571,7 +50753,7 @@ class Bar {
50571
50753
  let isNewDatum = false;
50572
50754
  const keyed = this._prevKeyedPaths(realIndex);
50573
50755
  if (keyed) {
50574
- const prev = keyed.get(datumKey(w, realIndex, j2));
50756
+ const prev = keyed.get(this._keys(realIndex)[j2]);
50575
50757
  if (prev) {
50576
50758
  oldD = prev.d;
50577
50759
  } else {
@@ -50714,11 +50896,10 @@ class Bar {
50714
50896
  * @returns {boolean | null} null when there is no previous record to consult
50715
50897
  */
50716
50898
  getPreviousFlip(realIndex, j2) {
50717
- const w = this.w;
50718
50899
  const record = this._prevRecord(realIndex);
50719
50900
  if (!record) return null;
50720
50901
  const keyed = this._prevKeyedPaths(realIndex);
50721
- const prev = keyed ? keyed.get(datumKey(w, realIndex, j2)) : record.paths[j2];
50902
+ const prev = keyed ? keyed.get(this._keys(realIndex)[j2]) : record.paths[j2];
50722
50903
  return prev ? !!prev.flip : null;
50723
50904
  }
50724
50905
  /**
@@ -50745,7 +50926,7 @@ class BarStacked extends Bar {
50745
50926
  const coreUtils = new CoreUtils(this.w);
50746
50927
  series = coreUtils.getLogSeries(series);
50747
50928
  this.yRatio = coreUtils.getLogYRatios(this.yRatio);
50748
- this.barHelpers.initVariables(series);
50929
+ this.barHelpers.initVariables(series, seriesIndex);
50749
50930
  if (w.config.chart.stackType === "100%") {
50750
50931
  series = w.globals.comboCharts ? (
50751
50932
  /** @type {any} */
@@ -50776,7 +50957,6 @@ class BarStacked extends Bar {
50776
50957
  const xArrValues = [];
50777
50958
  const yArrValues = [];
50778
50959
  const translationsIndex = this.setSeriesAxis(realIndex);
50779
- this.isReversed = w.config.yaxis[this.yaxisIndex] && w.config.yaxis[this.yaxisIndex].reversed;
50780
50960
  let elSeries = this.graphics.group({
50781
50961
  class: `apexcharts-series`,
50782
50962
  seriesName: Utils$1.escapeString(w.seriesData.seriesNames[realIndex]),
@@ -50846,7 +51026,9 @@ class BarStacked extends Bar {
50846
51026
  null
50847
51027
  );
50848
51028
  if (this.isHorizontal) {
50849
- paths = this.drawStackedBarPaths(__spreadProps(__spreadValues({}, commonPathOpts), {
51029
+ paths = this.drawStackedBarPaths(__spreadProps(__spreadValues(__spreadValues({}, commonPathOpts), this.barHelpers.rows && {
51030
+ y: initPositions.y + this.barHelpers.barRow(realIndex, j2) * yDivision
51031
+ }), {
50850
51032
  zeroW,
50851
51033
  barHeight,
50852
51034
  yDivision
@@ -50920,6 +51102,7 @@ class BarStacked extends Bar {
50920
51102
  series,
50921
51103
  barHeight,
50922
51104
  barWidth,
51105
+ barXPosition: paths.barXPosition,
50923
51106
  elDataLabelsWrap,
50924
51107
  elGoalsMarkers,
50925
51108
  type: "bar",
@@ -50937,7 +51120,7 @@ class BarStacked extends Bar {
50937
51120
  this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal);
50938
51121
  ret.add(elSeries);
50939
51122
  }
50940
- if (heldMirrors) this.settleHeldMirrors();
51123
+ if (heldMirrors) this.settleHeldMirrors(ret);
50941
51124
  return ret;
50942
51125
  }
50943
51126
  /**
@@ -50958,15 +51141,21 @@ class BarStacked extends Bar {
50958
51141
  * 'bottom' → 'top', where the endpoint really is rounded at the other end;
50959
51142
  * everywhere else the mirror is an exact identity on the settled shape, so
50960
51143
  * removing it changes nothing on screen.
51144
+ *
51145
+ * The marks are collected now, not when the timer fires: a query then also
51146
+ * stripped the mirrors a LATER update was still holding mid-tween.
51147
+ * @param {any} [ret] this draw's series group (default: the whole chart)
50961
51148
  */
50962
- settleHeldMirrors() {
51149
+ settleHeldMirrors(ret) {
50963
51150
  const w = this.w;
50964
51151
  if (!Environment.isBrowser()) return;
50965
51152
  const anim = w.config.chart.animations;
50966
51153
  const hold = (anim.dynamicAnimation.speed || 0) + (anim.speed || 0) + 100;
51154
+ const held = (ret ? ret.node : w.dom.baseEl).querySelectorAll(
51155
+ ".apexcharts-flip-held"
51156
+ );
50967
51157
  setTimeout(() => {
50968
- if (w.globals.isDestroyed || !Utils$1.elementExists(w.dom.baseEl)) return;
50969
- w.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach((el) => {
51158
+ held.forEach((el) => {
50970
51159
  el.classList.remove(
50971
51160
  "apexcharts-flip-held",
50972
51161
  "apexcharts-flip-y",
@@ -51042,7 +51231,7 @@ class BarStacked extends Bar {
51042
51231
  yDivision,
51043
51232
  elSeries
51044
51233
  }) {
51045
- var _a, _b, _c, _d, _e;
51234
+ var _a, _b;
51046
51235
  const w = this.w;
51047
51236
  const barYPosition = y + columnGroupIndex * barHeight;
51048
51237
  let barXPosition;
@@ -51050,36 +51239,21 @@ class BarStacked extends Bar {
51050
51239
  const j2 = indexes.j;
51051
51240
  const realIndex = indexes.realIndex;
51052
51241
  const translationsIndex = indexes.translationsIndex;
51053
- let prevBarW = 0;
51054
- for (let k2 = 0; k2 < this.groupCtx.prevXF.length; k2++) {
51055
- prevBarW = prevBarW + this.groupCtx.prevXF[k2][j2];
51056
- }
51057
- const gsi = this.groupCtx.prevX.length;
51058
- if (gsi > 0) {
51059
- let bXP = zeroW;
51060
- if (this.groupCtx.prevXVal[gsi - 1][j2] < 0) {
51061
- bXP = /** @type {any} */
51062
- ((_a = this.series[i2]) == null ? void 0 : _a[j2]) >= 0 ? this.groupCtx.prevX[gsi - 1][j2] + prevBarW - (this.isReversed ? prevBarW : 0) * 2 : this.groupCtx.prevX[gsi - 1][j2];
51063
- } else if (this.groupCtx.prevXVal[gsi - 1][j2] >= 0) {
51064
- bXP = /** @type {any} */
51065
- ((_b = this.series[i2]) == null ? void 0 : _b[j2]) >= 0 ? this.groupCtx.prevX[gsi - 1][j2] : this.groupCtx.prevX[gsi - 1][j2] - prevBarW + (this.isReversed ? prevBarW : 0) * 2;
51066
- }
51067
- barXPosition = bXP;
51068
- } else {
51069
- barXPosition = zeroW;
51070
- }
51071
- if (
51242
+ const v = (
51072
51243
  /** @type {any} */
51073
- ((_c = this.series[i2]) == null ? void 0 : _c[j2]) === null
51074
- ) {
51075
- x2 = barXPosition;
51244
+ (_b = (_a = this.series[i2]) == null ? void 0 : _a[j2]) != null ? _b : null
51245
+ );
51246
+ const g = this.groupCtx;
51247
+ const key = w.axisFlags.isXNumeric ? w.seriesData.seriesX[realIndex][j2] : j2;
51248
+ const top = g.tops.get(key);
51249
+ if (top) {
51250
+ const [prevX, prevVal, prevBarW] = top;
51251
+ const flip = (this.isReversed ? prevBarW : 0) * 2;
51252
+ barXPosition = prevVal < 0 ? v >= 0 ? prevX + prevBarW - flip : prevX : v >= 0 ? prevX : prevX - prevBarW + flip;
51076
51253
  } else {
51077
- x2 = barXPosition + /** @type {any} */
51078
- ((_d = this.series[i2]) == null ? void 0 : _d[j2]) / this.invertedYRatio - (this.isReversed ? (
51079
- /** @type {any} */
51080
- ((_e = this.series[i2]) == null ? void 0 : _e[j2]) / this.invertedYRatio
51081
- ) : 0) * 2;
51254
+ barXPosition = zeroW;
51082
51255
  }
51256
+ x2 = barXPosition + v / this.invertedYRatio * (this.isReversed ? -1 : 1);
51083
51257
  const paths = this.barHelpers.getBarpaths({
51084
51258
  barYPosition,
51085
51259
  barHeight,
@@ -51093,6 +51267,7 @@ class BarStacked extends Bar {
51093
51267
  j: j2,
51094
51268
  w
51095
51269
  });
51270
+ this._setTop(key, top, g.xArrj[j2], g.xArrjVal[j2], g.xArrjF[j2], realIndex, j2);
51096
51271
  this.barHelpers.barBackground({
51097
51272
  j: j2,
51098
51273
  i: i2,
@@ -51130,13 +51305,17 @@ class BarStacked extends Bar {
51130
51305
  columnGroupIndex,
51131
51306
  elSeries
51132
51307
  }) {
51133
- var _a, _b, _c, _d, _e, _f;
51308
+ var _a, _b, _c;
51134
51309
  const w = this.w;
51135
51310
  const i2 = indexes.i;
51136
51311
  const j2 = indexes.j;
51137
51312
  const bc = indexes.bc;
51138
51313
  const realIndex = indexes.realIndex;
51139
51314
  const translationsIndex = indexes.translationsIndex;
51315
+ const v = (
51316
+ /** @type {any} */
51317
+ (_b = (_a = this.series[i2]) == null ? void 0 : _a[j2]) != null ? _b : null
51318
+ );
51140
51319
  if (w.axisFlags.isXNumeric) {
51141
51320
  let seriesVal = w.seriesData.seriesX[realIndex][j2];
51142
51321
  if (!seriesVal) seriesVal = 0;
@@ -51151,11 +51330,9 @@ class BarStacked extends Bar {
51151
51330
  const [prevYValue, prevVal, prevBarH] = top;
51152
51331
  let bYP;
51153
51332
  if (prevVal < 0) {
51154
- bYP = /** @type {any} */
51155
- ((_a = this.series[i2]) == null ? void 0 : _a[j2]) >= 0 ? prevYValue - prevBarH + (this.isReversed ? prevBarH : 0) * 2 : prevYValue;
51333
+ bYP = v >= 0 ? prevYValue - prevBarH + (this.isReversed ? prevBarH : 0) * 2 : prevYValue;
51156
51334
  } else if (prevVal >= 0) {
51157
- bYP = /** @type {any} */
51158
- ((_b = this.series[i2]) == null ? void 0 : _b[j2]) >= 0 ? prevYValue : prevYValue + prevBarH - (this.isReversed ? prevBarH : 0) * 2;
51335
+ bYP = v >= 0 ? prevYValue : prevYValue + prevBarH - (this.isReversed ? prevBarH : 0) * 2;
51159
51336
  }
51160
51337
  if (typeof bYP === "undefined") bYP = w.layout.gridHeight;
51161
51338
  if (((_c = g.prevYF[0]) == null ? void 0 : _c.every((val) => val === 0)) && g.prevYF.slice(1).every(
@@ -51168,25 +51345,16 @@ class BarStacked extends Bar {
51168
51345
  } else {
51169
51346
  barYPosition = zeroH;
51170
51347
  }
51171
- if (
51172
- /** @type {any} */
51173
- (_d = this.series[i2]) == null ? void 0 : _d[j2]
51174
- ) {
51175
- y = barYPosition - /** @type {any} */
51176
- ((_e = this.series[i2]) == null ? void 0 : _e[j2]) / this.yRatio[translationsIndex] + (this.isReversed ? (
51177
- /** @type {any} */
51178
- ((_f = this.series[i2]) == null ? void 0 : _f[j2]) / this.yRatio[translationsIndex]
51179
- ) : 0) * 2;
51180
- } else {
51181
- y = barYPosition;
51182
- }
51348
+ y = barYPosition - v / this.yRatio[translationsIndex] * (this.isReversed ? -1 : 1);
51183
51349
  const paths = this.barHelpers.getColumnPaths({
51184
51350
  barXPosition,
51185
51351
  barWidth,
51186
51352
  y1: barYPosition,
51187
51353
  y2: y,
51188
51354
  yRatio: this.yRatio[translationsIndex],
51189
- strokeWidth: this.strokeWidth,
51355
+ // the series' width even for an empty segment, so a hidden layer keeps
51356
+ // its place, but no inset at all when no stroke is drawn
51357
+ strokeWidth: w.config.stroke.show ? this.strokeWidth : 0,
51190
51358
  isReversed: this.isReversed,
51191
51359
  series: this.series,
51192
51360
  realIndex: indexes.realIndex,
@@ -51194,17 +51362,7 @@ class BarStacked extends Bar {
51194
51362
  j: j2,
51195
51363
  w
51196
51364
  });
51197
- const t2 = g.yArrj[j2];
51198
- if (!isNaN(t2)) {
51199
- g.tops.set(key, [
51200
- t2,
51201
- g.yArrjVal[j2],
51202
- (top ? top[2] : 0) + g.yArrjF[j2],
51203
- (top ? top[3] : 0) + (w.seriesData.series[realIndex][j2] || 0),
51204
- top ? Math.min(top[0], top[4]) : 1 / 0,
51205
- top ? Math.max(top[0], top[5]) : -1 / 0
51206
- ]);
51207
- }
51365
+ this._setTop(key, top, g.yArrj[j2], g.yArrjVal[j2], g.yArrjF[j2], realIndex, j2);
51208
51366
  this.barHelpers.barBackground({
51209
51367
  bc,
51210
51368
  j: j2,
@@ -51223,17 +51381,47 @@ class BarStacked extends Bar {
51223
51381
  zeroH,
51224
51382
  realIndex,
51225
51383
  j2,
51226
- 0
51384
+ translationsIndex
51227
51385
  ),
51228
51386
  barXPosition,
51229
51387
  x: w.axisFlags.isXNumeric ? x2 : x2 + xDivision,
51230
51388
  y
51231
51389
  };
51232
51390
  }
51391
+ /**
51392
+ * Record the segment just drawn as the top of its stack. Per key it holds
51393
+ * the top and value of the last segment drawn there, the summed lengths and
51394
+ * raw values of every segment so far (the total label's value), and the
51395
+ * extreme tops below that segment (the total label's position).
51396
+ * @param {any} key @param {any} top @param {number} t @param {any} val
51397
+ * @param {number} len @param {number} realIndex @param {number} j
51398
+ */
51399
+ _setTop(key, top, t2, val, len, realIndex, j2) {
51400
+ if (isNaN(t2)) return;
51401
+ this.groupCtx.tops.set(key, [
51402
+ t2,
51403
+ val,
51404
+ (top ? top[2] : 0) + len,
51405
+ (top ? top[3] : 0) + (this.w.seriesData.series[realIndex][j2] || 0),
51406
+ top ? Math.min(top[0], top[4]) : 1 / 0,
51407
+ top ? Math.max(top[0], top[5]) : -1 / 0
51408
+ ]);
51409
+ }
51410
+ }
51411
+ function jitterExtent(pool, w) {
51412
+ let lo = Infinity;
51413
+ let hi = -Infinity;
51414
+ pool.slice(0, w.seriesData.series.length).flat(2).forEach((v) => {
51415
+ if (v === +v) {
51416
+ if (v < lo) lo = v;
51417
+ if (v > hi) hi = v;
51418
+ }
51419
+ });
51420
+ return [lo, hi];
51233
51421
  }
51234
51422
  function buildJitterGroups({
51235
- w,
51236
51423
  points,
51424
+ extent,
51237
51425
  seedA,
51238
51426
  seedB,
51239
51427
  center,
@@ -51244,6 +51432,7 @@ function buildJitterGroups({
51244
51432
  clampAt,
51245
51433
  sideSign
51246
51434
  }) {
51435
+ var _a, _b;
51247
51436
  const opts = options2;
51248
51437
  if (!opts || opts.show === false) return [];
51249
51438
  if (!points || !points.length) return [];
@@ -51257,8 +51446,8 @@ function buildJitterGroups({
51257
51446
  const scale = opts.colorScale;
51258
51447
  const useScale = scale && Array.isArray(scale.colors) && scale.colors.length > 0;
51259
51448
  const steps = useScale ? Math.max(2, scale.steps || 24) : 1;
51260
- const sMin = useScale && scale.min != null ? scale.min : w.globals.minY;
51261
- const sMax = useScale && scale.max != null ? scale.max : w.globals.maxY;
51449
+ const sMin = (_a = scale == null ? void 0 : scale.min) != null ? _a : extent[0];
51450
+ const sMax = (_b = scale == null ? void 0 : scale.max) != null ? _b : extent[1];
51262
51451
  const span = sMax - sMin || 1;
51263
51452
  const buckets = useScale ? new Array(steps).fill("") : [""];
51264
51453
  for (let k2 = 0; k2 < points.length; k2 += stride) {
@@ -51344,7 +51533,7 @@ function renderJitter({
51344
51533
  elSeries.add(elPointsWrap);
51345
51534
  }
51346
51535
  function darkenColor(color, amount) {
51347
- const rgb = Utils$1.parseHex(color);
51536
+ const rgb = Utils$1.parseColor(color) || Utils$1.parseColor(Utils$1.resolveColor(color));
51348
51537
  if (!rgb) return color;
51349
51538
  const f = Math.max(0, 1 - amount);
51350
51539
  return `rgb(${Math.round(rgb[0] * f)},${Math.round(rgb[1] * f)},${Math.round(rgb[2] * f)})`;
@@ -51409,7 +51598,7 @@ class BoxCandleStick extends Bar {
51409
51598
  if (!keyed || keyed.size === 0 || !row || row.length === 0) return false;
51410
51599
  let survivors = 0;
51411
51600
  for (let j2 = 0; j2 < row.length; j2++) {
51412
- if (keyed.has(datumKey(this.w, realIndex, j2))) survivors++;
51601
+ if (keyed.has(this._keys(realIndex)[j2])) survivors++;
51413
51602
  }
51414
51603
  return survivors / keyed.size < 0.5;
51415
51604
  }
@@ -51438,7 +51627,7 @@ class BoxCandleStick extends Bar {
51438
51627
  }
51439
51628
  this._prevHalves[realIndex] = map;
51440
51629
  }
51441
- const halves = map && map.get(datumKey(this.w, realIndex, j2));
51630
+ const halves = map && map.get(this._keys(realIndex)[j2]);
51442
51631
  return halves && halves.length === 2 ? halves[pi] : null;
51443
51632
  }
51444
51633
  /**
@@ -51448,7 +51637,7 @@ class BoxCandleStick extends Bar {
51448
51637
  */
51449
51638
  // @ts-ignore -- BoxCandleStick.draw has an extra ctype param compared to Bar.draw
51450
51639
  draw(series, ctype, seriesIndex) {
51451
- var _a;
51640
+ var _a, _b;
51452
51641
  const w = this.w;
51453
51642
  const graphics = new Graphics(this.w);
51454
51643
  const type = w.globals.comboCharts ? ctype : w.config.chart.type;
@@ -51456,16 +51645,17 @@ class BoxCandleStick extends Bar {
51456
51645
  this.candlestickOptions = this.w.config.plotOptions.candlestick;
51457
51646
  this.boxOptions = this.w.config.plotOptions.boxPlot;
51458
51647
  this.isHorizontal = w.config.plotOptions.bar.horizontal;
51459
- this.isOHLC = this.candlestickOptions && this.candlestickOptions.type === "ohlc";
51460
51648
  this.coreUtils = new CoreUtils(this.w);
51461
51649
  series = this.coreUtils.getLogSeries(series);
51462
51650
  this.series = series;
51463
51651
  this.yRatio = this.coreUtils.getLogYRatios(this.yRatio);
51464
- this.barHelpers.initVariables(series);
51652
+ this.barHelpers.initVariables(series, seriesIndex);
51465
51653
  const ret = graphics.group({
51466
51654
  class: `apexcharts-${type}-series apexcharts-plot-series`
51467
51655
  });
51468
51656
  this.isBoxPlot = type === "boxPlot";
51657
+ this.isOHLC = !this.isBoxPlot && ((_a = this.candlestickOptions) == null ? void 0 : _a.type) === "ohlc";
51658
+ const jx = jitterExtent(w.candleData.seriesBoxPoints, w);
51469
51659
  for (let i2 = 0; i2 < series.length; i2++) {
51470
51660
  let x2;
51471
51661
  let y;
@@ -51591,6 +51781,7 @@ class BoxCandleStick extends Bar {
51591
51781
  i: i2,
51592
51782
  pathFrom: (_a2 = this._prevBoxHalf(realIndex, j2, pi)) != null ? _a2 : paths.pathFrom,
51593
51783
  fadeReveal,
51784
+ noLabel: pi > 0,
51594
51785
  pathTo,
51595
51786
  strokeWidth,
51596
51787
  elSeries,
@@ -51612,7 +51803,7 @@ class BoxCandleStick extends Bar {
51612
51803
  }
51613
51804
  );
51614
51805
  if (boxPointsOpts && boxPointsOpts.show !== false) {
51615
- const pts = (_a = w.candleData.seriesBoxPoints[realIndex]) == null ? void 0 : _a[j2];
51806
+ const pts = (_b = w.candleData.seriesBoxPoints[realIndex]) == null ? void 0 : _b[j2];
51616
51807
  if (pts && pts.length) {
51617
51808
  const logVal = (v) => (
51618
51809
  /** @type {any} */
@@ -51623,14 +51814,14 @@ class BoxCandleStick extends Bar {
51623
51814
  );
51624
51815
  let center, halfExtent, alongFn;
51625
51816
  if (this.isHorizontal) {
51626
- const yRatio = this.invertedYRatio;
51817
+ const yRatio = this.invertedYRatio * (this.isReversed ? -1 : 1);
51627
51818
  const bh = barHeight != null ? barHeight : 0;
51628
51819
  const z = zeroW != null ? zeroW : 0;
51629
51820
  center = paths.barYPosition + bh / 2;
51630
51821
  halfExtent = bh / 2;
51631
51822
  alongFn = (v) => z + logVal(v) / yRatio;
51632
51823
  } else {
51633
- const yRatio = this.yRatio[translationsIndex];
51824
+ const yRatio = this.yRatio[translationsIndex] * (this.isReversed ? -1 : 1);
51634
51825
  const bw = barWidth != null ? barWidth : 0;
51635
51826
  const z = zeroH != null ? zeroH : 0;
51636
51827
  center = paths.barXPosition + bw / 2;
@@ -51638,8 +51829,8 @@ class BoxCandleStick extends Bar {
51638
51829
  alongFn = (v) => z - logVal(v) / yRatio;
51639
51830
  }
51640
51831
  const groups = buildJitterGroups({
51641
- w,
51642
51832
  points: pts,
51833
+ extent: jx,
51643
51834
  seedA: realIndex,
51644
51835
  seedB: j2,
51645
51836
  center,
@@ -51668,15 +51859,13 @@ class BoxCandleStick extends Bar {
51668
51859
  w.globals.seriesXvalues[realIndex] = xArrj;
51669
51860
  w.globals.seriesYvalues[realIndex] = yArrj;
51670
51861
  if (w.globals.previousPaths.length > 0 && !fadeReveal) {
51671
- const newKeys = [];
51672
- for (let j2 = 0; j2 < series[i2].length; j2++) {
51673
- newKeys.push(datumKey(w, realIndex, j2));
51674
- }
51675
51862
  renderBarExitGhosts({
51676
51863
  w,
51677
51864
  elSeries,
51678
51865
  record: this._prevRecord(realIndex),
51679
- newKeys,
51866
+ newKeys: this._keys(realIndex).filter(
51867
+ (_, j2) => series[i2][j2] != null
51868
+ ),
51680
51869
  isHorizontal: this.isHorizontal,
51681
51870
  speed: w.config.chart.animations.dynamicAnimation.speed
51682
51871
  });
@@ -51695,7 +51884,7 @@ class BoxCandleStick extends Bar {
51695
51884
  strokeWidth,
51696
51885
  cullBounds = null
51697
51886
  }) {
51698
- var _a, _b, _c, _d;
51887
+ var _a, _b, _c;
51699
51888
  const w = this.w;
51700
51889
  const graphics = new Graphics(this.w);
51701
51890
  const i2 = indexes.i;
@@ -51706,7 +51895,7 @@ class BoxCandleStick extends Bar {
51706
51895
  const getColor = (color2) => Array.isArray(color2) ? color2[realIndex] : color2;
51707
51896
  const colorPos = getColor(candleColors.upward);
51708
51897
  const colorNeg = getColor(candleColors.downward);
51709
- const yRatio = this.yRatio[indexes.translationsIndex];
51898
+ const yRatio = this.yRatio[indexes.translationsIndex] * (this.isReversed ? -1 : 1);
51710
51899
  const ohlc = this.getOHLCValue(realIndex, j2);
51711
51900
  let l1 = zeroH;
51712
51901
  let l2 = zeroH;
@@ -51723,9 +51912,11 @@ class BoxCandleStick extends Bar {
51723
51912
  x2 = pos.x;
51724
51913
  barXPosition = pos.barXPosition;
51725
51914
  }
51726
- if (typeof /** @type {any} */
51727
- ((_a = this.series[i2]) == null ? void 0 : _a[j2]) === "undefined" || /** @type {any} */
51728
- ((_b = this.series[i2]) == null ? void 0 : _b[j2]) === null) {
51915
+ const hole = (
51916
+ /** @type {any} */
51917
+ ((_a = this.series[i2]) == null ? void 0 : _a[j2]) == null
51918
+ );
51919
+ if (hole) {
51729
51920
  y1 = zeroH;
51730
51921
  y2 = zeroH;
51731
51922
  } else {
@@ -51735,7 +51926,7 @@ class BoxCandleStick extends Bar {
51735
51926
  l2 = zeroH - ohlc.l / yRatio;
51736
51927
  m = zeroH - ohlc.m / yRatio;
51737
51928
  }
51738
- if (cullBounds && (barXPosition + barWidth < cullBounds.lo || barXPosition > cullBounds.hi) && !this._wasOnScreen(realIndex, j2)) {
51929
+ if (hole || cullBounds && (barXPosition + barWidth < cullBounds.lo || barXPosition > cullBounds.hi) && !this._wasOnScreen(realIndex, j2)) {
51739
51930
  return {
51740
51931
  pathTo: null,
51741
51932
  pathFrom: null,
@@ -51765,7 +51956,7 @@ class BoxCandleStick extends Bar {
51765
51956
  ];
51766
51957
  }
51767
51958
  let pathFrom = null;
51768
- const morphFrom = (_d = (_c = this.ctx) == null ? void 0 : _c.morphTypeChange) == null ? void 0 : _d.getInitialPathFor(realIndex, j2);
51959
+ const morphFrom = (_c = (_b = this.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.getInitialPathFor(realIndex, j2);
51769
51960
  if (morphFrom) {
51770
51961
  pathFrom = morphFrom;
51771
51962
  } else if (w.globals.previousPaths.length > 0) {
@@ -51804,7 +51995,7 @@ class BoxCandleStick extends Bar {
51804
51995
  zeroW,
51805
51996
  strokeWidth
51806
51997
  }) {
51807
- var _a, _b, _c, _d;
51998
+ var _a, _b, _c;
51808
51999
  const w = this.w;
51809
52000
  const graphics = new Graphics(this.w);
51810
52001
  const i2 = indexes.i;
@@ -51813,7 +52004,7 @@ class BoxCandleStick extends Bar {
51813
52004
  const { colors: candleColors } = w.config.plotOptions.candlestick;
51814
52005
  const { colors: boxColors } = this.boxOptions;
51815
52006
  const getColor = (color2) => Array.isArray(color2) ? color2[realIndex] : color2;
51816
- const yRatio = this.invertedYRatio;
52007
+ const yRatio = this.invertedYRatio * (this.isReversed ? -1 : 1);
51817
52008
  const ohlc = this.getOHLCValue(realIndex, j2);
51818
52009
  let color = ohlc.o < ohlc.c ? [getColor(candleColors.upward)] : [getColor(candleColors.downward)];
51819
52010
  if (this.isBoxPlot) {
@@ -51825,9 +52016,11 @@ class BoxCandleStick extends Bar {
51825
52016
  let x2 = Math.max(ohlc.o, ohlc.c);
51826
52017
  let m = ohlc.m;
51827
52018
  const barYPosition = y + barHeight * this.visibleI;
51828
- if (typeof /** @type {any} */
51829
- ((_a = this.series[i2]) == null ? void 0 : _a[j2]) === "undefined" || /** @type {any} */
51830
- ((_b = this.series[i2]) == null ? void 0 : _b[j2]) === null) {
52019
+ const hole = (
52020
+ /** @type {any} */
52021
+ ((_a = this.series[i2]) == null ? void 0 : _a[j2]) == null
52022
+ );
52023
+ if (hole) {
51831
52024
  x1 = zeroW;
51832
52025
  x2 = zeroW;
51833
52026
  } else {
@@ -51842,7 +52035,7 @@ class BoxCandleStick extends Bar {
51842
52035
  graphics.move(m, barYPosition) + graphics.line(m, barYPosition + barHeight) + graphics.line(x2, barYPosition + barHeight) + graphics.line(x2, barYPosition + barHeight / 2) + graphics.line(l2, barYPosition + barHeight / 2) + graphics.line(l2, barYPosition + barHeight - barHeight / 4) + graphics.line(l2, barYPosition + barHeight / 4) + graphics.line(l2, barYPosition + barHeight / 2) + graphics.line(x2, barYPosition + barHeight / 2) + graphics.line(x2, barYPosition) + graphics.line(m, barYPosition) + "z"
51843
52036
  ];
51844
52037
  let pathFrom = null;
51845
- const morphFrom = (_d = (_c = this.ctx) == null ? void 0 : _c.morphTypeChange) == null ? void 0 : _d.getInitialPathFor(realIndex, j2);
52038
+ const morphFrom = (_c = (_b = this.ctx) == null ? void 0 : _b.morphTypeChange) == null ? void 0 : _c.getInitialPathFor(realIndex, j2);
51846
52039
  if (morphFrom) {
51847
52040
  pathFrom = morphFrom;
51848
52041
  } else if (w.globals.previousPaths.length > 0) {
@@ -51867,7 +52060,8 @@ class BoxCandleStick extends Bar {
51867
52060
  0
51868
52061
  ),
51869
52062
  barYPosition,
51870
- color
52063
+ color,
52064
+ culled: hole
51871
52065
  };
51872
52066
  }
51873
52067
  /**
@@ -52044,13 +52238,9 @@ class TreemapHelpers {
52044
52238
  elDataLabelsWrap = graphics.group({
52045
52239
  class: "apexcharts-data-labels"
52046
52240
  });
52047
- const offX = resolveDataLabelOffset(dataLabelsConfig.offsetX, w, i2, j2);
52048
- const offY = resolveDataLabelOffset(dataLabelsConfig.offsetY, w, i2, j2);
52049
- const dataLabelsX = x2 + offX;
52050
- const dataLabelsY = y + parseFloat(dataLabelsConfig.style.fontSize) / 3 + offY;
52051
52241
  dataLabels.plotDataLabelsText({
52052
- x: dataLabelsX,
52053
- y: dataLabelsY,
52242
+ x: x2,
52243
+ y: y + parseFloat(dataLabelsConfig.style.fontSize) / 3,
52054
52244
  text,
52055
52245
  i: i2,
52056
52246
  j: j2,
@@ -52514,18 +52704,16 @@ class Helpers5 {
52514
52704
  this.lineCtx = lineCtx;
52515
52705
  }
52516
52706
  /**
52517
- * @param {number} i
52707
+ * @param {number} i index into `series`, the rows this draw call renders
52518
52708
  * @param {any[]} series
52709
+ * @param {number} realIndex index into the config / fill options
52519
52710
  */
52520
- sameValueSeriesFix(i2, series) {
52711
+ sameValueSeriesFix(i2, series, realIndex) {
52521
52712
  const w = this.w;
52522
- if (w.config.fill.type === "gradient" || w.config.fill.type[i2] === "gradient") {
52523
- const coreUtils = new CoreUtils(this.lineCtx.w);
52524
- if (coreUtils.seriesHaveSameValues(i2)) {
52525
- const gSeries = series[i2].slice();
52526
- gSeries[gSeries.length - 1] = gSeries[gSeries.length - 1] + 1e-6;
52527
- series[i2] = gSeries;
52528
- }
52713
+ const s2 = series[i2];
52714
+ if ((w.config.fill.type === "gradient" || w.config.fill.type[realIndex] === "gradient") && s2.every((v) => v === s2[0])) {
52715
+ series[i2] = s2.slice();
52716
+ series[i2][s2.length - 1] += 1e-6;
52529
52717
  }
52530
52718
  return series;
52531
52719
  }
@@ -52814,13 +53002,27 @@ class Line {
52814
53002
  this.yRatio = coreUtils.getLogYRatios(this.yRatio);
52815
53003
  this.prevSeriesY = [];
52816
53004
  this.prevSeriesYByX = /* @__PURE__ */ new Map();
53005
+ this._stackXs = null;
53006
+ if (w.config.chart.stacked && w.axisFlags.isXNumeric) {
53007
+ const xs = series.map(
53008
+ (_, i2) => w.globals.comboCharts ? (
53009
+ /** @type {any} */
53010
+ seriesIndex[i2]
53011
+ ) : i2
53012
+ ).filter((ri) => !this._hidden(ri)).map((ri) => w.seriesData.seriesX[ri] || []);
53013
+ if (xs.some(
53014
+ (a2) => a2.length !== xs[0].length || a2.some((v, k2) => v !== xs[0][k2])
53015
+ )) {
53016
+ this._stackXs = [...new Set(xs.flat())].sort((a2, b) => a2 - b);
53017
+ }
53018
+ }
52817
53019
  const allSeries = [];
52818
53020
  for (let i2 = 0; i2 < series.length; i2++) {
52819
- series = this.lineHelpers.sameValueSeriesFix(i2, series);
52820
53021
  const realIndex = w.globals.comboCharts ? (
52821
53022
  /** @type {any} */
52822
53023
  seriesIndex[i2]
52823
53024
  ) : i2;
53025
+ series = this.lineHelpers.sameValueSeriesFix(i2, series, realIndex);
52824
53026
  const translationsIndex = this.yRatio.length > 1 ? realIndex : 0;
52825
53027
  const flat = this._collapsedBaselineRow(series, i2, realIndex);
52826
53028
  this._shapeOnly = !!flat;
@@ -53004,9 +53206,7 @@ class Line {
53004
53206
  const gl = w.globals;
53005
53207
  if (w.config.chart.stacked || this.pointsChart) return null;
53006
53208
  if (!Array.isArray(series[i2]) || series[i2].length !== 0) return null;
53007
- if (gl.collapsedSeriesIndices.indexOf(realIndex) === -1 && gl.ancillaryCollapsedSeriesIndices.indexOf(realIndex) === -1) {
53008
- return null;
53009
- }
53209
+ if (!this._hidden(realIndex)) return null;
53010
53210
  const n2 = w.axisFlags.isXNumeric ? (w.seriesData.seriesX[realIndex] || []).length : gl.dataPoints;
53011
53211
  if (!n2) return null;
53012
53212
  const lo = Utils$1.isNumber(gl.minYArr[realIndex]) ? gl.minYArr[realIndex] : gl.minY;
@@ -53135,6 +53335,11 @@ class Line {
53135
53335
  if (key === void 0 || key === null) return void 0;
53136
53336
  return this.prevSeriesYByX.get(key);
53137
53337
  }
53338
+ /** @param {number} ri */
53339
+ _hidden(ri) {
53340
+ const g = this.w.globals;
53341
+ return g.collapsedSeriesIndices.indexOf(ri) > -1 || g.ancillaryCollapsedSeriesIndices.indexOf(ri) > -1;
53342
+ }
53138
53343
  /**
53139
53344
  * Fold a drawn series into the running stack top, so the next series can find
53140
53345
  * its baseline by x (#4886).
@@ -53150,19 +53355,18 @@ class Line {
53150
53355
  * correct if that representation ever changes.
53151
53356
  * @param {number} realIndex
53152
53357
  * @param {any[]} yArrj
53358
+ * @param {any[]} [row] the drawn row, if not the series' own (a part)
53153
53359
  */
53154
- _recordStackTops(realIndex, yArrj) {
53360
+ _recordStackTops(realIndex, yArrj, row = this.w.seriesData.series[realIndex]) {
53155
53361
  const w = this.w;
53156
53362
  if (!w.config.chart.stacked) return;
53157
53363
  if (!Array.isArray(yArrj)) return;
53158
- if (w.globals.collapsedSeriesIndices.indexOf(realIndex) !== -1 || w.globals.ancillaryCollapsedSeriesIndices.indexOf(realIndex) !== -1) {
53159
- return;
53160
- }
53364
+ if (this._hidden(realIndex)) return;
53161
53365
  for (let j2 = 0; j2 < yArrj.length; j2++) {
53162
53366
  const key = this._stackKey(realIndex, j2);
53163
53367
  if (key === void 0 || key === null) continue;
53164
53368
  const y = yArrj[j2];
53165
- if (!Utils$1.isNumber(y)) continue;
53369
+ if (!Utils$1.isNumber(y) || (row == null ? void 0 : row[j2]) == null) continue;
53166
53370
  this.prevSeriesYByX.set(key, y);
53167
53371
  }
53168
53372
  }
@@ -53195,7 +53399,8 @@ class Line {
53195
53399
  w.globals.seriesYvalues[realIndex] = paths.yArrj;
53196
53400
  const forecast = w.config.forecastDataPoints;
53197
53401
  if (forecast.count > 0 && type !== "rangeArea") {
53198
- const forecastCutoff = w.globals.seriesXvalues[realIndex][w.globals.seriesXvalues[realIndex].length - forecast.count - 1];
53402
+ const ci = paths.xArrj.length - forecast.count - 1;
53403
+ const forecastCutoff = w.axisFlags.isXNumeric ? (w.seriesData.seriesX[realIndex][ci] - w.globals.minX) / this.xRatio : w.globals.padHorizontal + this.categoryAxisCorrection + ci * this.xDivision;
53199
53404
  const elForecastMask = graphics.drawRect(
53200
53405
  forecastCutoff,
53201
53406
  0,
@@ -53282,7 +53487,7 @@ class Line {
53282
53487
  scrollMorph: !!streamScroll,
53283
53488
  stroke: "none",
53284
53489
  strokeWidth: 0,
53285
- strokeLineCap: null,
53490
+ strokeLinecap: null,
53286
53491
  fill: pathFill
53287
53492
  }));
53288
53493
  this.elSeries.add(renderedPath);
@@ -53324,7 +53529,7 @@ class Line {
53324
53529
  scrollMorph: !!streamScroll,
53325
53530
  stroke: lineFill,
53326
53531
  strokeWidth: this.strokeWidth,
53327
- strokeLineCap: w.config.stroke.lineCap,
53532
+ strokeLinecap: w.config.stroke.lineCap,
53328
53533
  fill: type === "rangeArea" ? pathFill : "none"
53329
53534
  });
53330
53535
  const renderedPath = emit.renderPaths(linePathCommonOpts);
@@ -53378,7 +53583,7 @@ class Line {
53378
53583
  isRangeStart,
53379
53584
  seriesRangeEnd
53380
53585
  }) {
53381
- var _a, _b;
53586
+ var _a, _b, _c;
53382
53587
  const w = this.w;
53383
53588
  const graphics = new Graphics(this.w);
53384
53589
  const yRatio = this.yRatio;
@@ -53430,15 +53635,30 @@ class Line {
53430
53635
  });
53431
53636
  if (fast) return fast;
53432
53637
  }
53638
+ const ks = stackSeries ? this._stackXs : null;
53639
+ let kp = 0;
53640
+ const midsAt = [];
53433
53641
  for (let j2 = 0; j2 < iterations; j2++) {
53434
53642
  if (series[i2].length === 0) break;
53435
53643
  const isNull = typeof series[i2][j2 + 1] === "undefined" || series[i2][j2 + 1] === null;
53436
53644
  if (w.axisFlags.isXNumeric) {
53437
- let sX = w.seriesData.seriesX[realIndex][j2 + 1];
53438
- if (typeof w.seriesData.seriesX[realIndex][j2 + 1] === "undefined") {
53439
- sX = w.seriesData.seriesX[realIndex][iterations - 1];
53645
+ const sxs = w.seriesData.seriesX[realIndex];
53646
+ let sX = sxs[j2 + 1];
53647
+ if (typeof sX === "undefined") {
53648
+ sX = sxs[iterations - 1];
53440
53649
  }
53441
53650
  x2 = (sX - w.globals.minX) / this.xRatio;
53651
+ if (ks) {
53652
+ const m = [];
53653
+ while (ks[kp] <= sxs[j2]) kp++;
53654
+ while (ks[kp] < sX) {
53655
+ m.push([
53656
+ (ks[kp] - w.globals.minX) / this.xRatio,
53657
+ (_c = this.prevSeriesYByX.get(ks[kp++])) != null ? _c : this.zeroY
53658
+ ]);
53659
+ }
53660
+ if (m.length) midsAt[j2 + 1] = m;
53661
+ }
53442
53662
  } else {
53443
53663
  x2 = x2 + this.xDivision;
53444
53664
  }
@@ -53448,9 +53668,7 @@ class Line {
53448
53668
  var _a2;
53449
53669
  for (let pii = pi; pii >= 0; pii--) {
53450
53670
  const ri = (_a2 = seriesIndex == null ? void 0 : seriesIndex[pii]) != null ? _a2 : pii;
53451
- if (w.globals.collapsedSeriesIndices.indexOf(ri) === -1 && w.globals.ancillaryCollapsedSeriesIndices.indexOf(ri) === -1) {
53452
- return pii;
53453
- }
53671
+ if (!this._hidden(ri)) return pii;
53454
53672
  }
53455
53673
  return -1;
53456
53674
  };
@@ -53506,6 +53724,7 @@ class Line {
53506
53724
  j: j2,
53507
53725
  x: x2,
53508
53726
  y,
53727
+ midsAt,
53509
53728
  y2,
53510
53729
  xArrj,
53511
53730
  yArrj,
@@ -53746,7 +53965,7 @@ class Line {
53746
53965
  numericXY: nxs ? { xs: nxs, ys: nys, areaCloseY: bottomY } : void 0
53747
53966
  };
53748
53967
  }
53749
- /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */
53968
+ /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, midsAt: any[][], xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */
53750
53969
  _createPaths({
53751
53970
  type,
53752
53971
  series,
@@ -53754,6 +53973,7 @@ class Line {
53754
53973
  j: j2,
53755
53974
  x: x2,
53756
53975
  y,
53976
+ midsAt,
53757
53977
  xArrj,
53758
53978
  yArrj,
53759
53979
  y2,
@@ -53773,6 +53993,8 @@ class Line {
53773
53993
  const areaBottomY = this.areaBottomY;
53774
53994
  const rangeArea = type === "rangeArea";
53775
53995
  const isLowerRangeAreaPath = type === "rangeArea" && isRangeStart;
53996
+ const mids = midsAt[j2 + 1];
53997
+ const via = (f) => mids ? [...mids, [x2, y]].map(([bx, by], k2, a2) => f(...k2 ? a2[k2 - 1] : [pX, pY], bx, by)).join("") : f(pX, pY, x2, y);
53776
53998
  switch (curve) {
53777
53999
  case "monotoneCubic": {
53778
54000
  const yAj = isRangeStart ? yArrj : y2Arrj;
@@ -53818,8 +54040,19 @@ class Line {
53818
54040
  }
53819
54041
  // falls through
53820
54042
  case 2: {
53821
- const _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();
53822
- const _yAj = isRangeStart ? yAj : yAj.slice().reverse();
54043
+ let _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();
54044
+ let _yAj = isRangeStart ? yAj : yAj.slice().reverse();
54045
+ if (midsAt.length && !rangeArea) {
54046
+ const P = [];
54047
+ _xAj.forEach((v, k2) => {
54048
+ if (_yAj[k2] !== null && _yAj[k2 - 1] != null && midsAt[k2]) {
54049
+ P.push(...midsAt[k2]);
54050
+ }
54051
+ P.push([v, _yAj[k2]]);
54052
+ });
54053
+ _xAj = P.map((p) => p[0]);
54054
+ _yAj = P.map((p) => p[1]);
54055
+ }
53823
54056
  const smoothInputs = getSmoothInputs(_xAj, _yAj);
53824
54057
  const points = smoothInputs.length > 1 ? spline.points(smoothInputs) : smoothInputs;
53825
54058
  let smoothInputsLower = [];
@@ -53878,7 +54111,10 @@ class Line {
53878
54111
  break;
53879
54112
  }
53880
54113
  case "smooth": {
53881
- const length = (x2 - pX) * 0.35;
54114
+ const toPoint = (ax, ay, bx, by) => {
54115
+ const l2 = (bx - ax) * 0.35;
54116
+ return graphics.curve(ax + l2, ay, bx - l2, by, bx, by);
54117
+ };
53882
54118
  if (series[i2][j2] === null) {
53883
54119
  pathState = 0;
53884
54120
  } else {
@@ -53898,7 +54134,7 @@ class Line {
53898
54134
  }
53899
54135
  pathState = 1;
53900
54136
  if (j2 < series[i2].length - 2) {
53901
- const p = graphics.curve(pX + length, pY, x2 - length, y, x2, y);
54137
+ const p = via(toPoint);
53902
54138
  linePath += p;
53903
54139
  areaPath += p;
53904
54140
  break;
@@ -53916,7 +54152,7 @@ class Line {
53916
54152
  areaPaths.push(areaPath);
53917
54153
  pathState = -1;
53918
54154
  } else {
53919
- const p = graphics.curve(pX + length, pY, x2 - length, y, x2, y);
54155
+ const p = via(toPoint);
53920
54156
  linePath += p;
53921
54157
  areaPath += p;
53922
54158
  if (j2 >= series[i2].length - 2) {
@@ -53937,9 +54173,9 @@ class Line {
53937
54173
  break;
53938
54174
  }
53939
54175
  default: {
53940
- const pathToPoint = (curve2, x3, y3) => {
54176
+ const pathToPoint = (_ax, _ay, x3, y3) => {
53941
54177
  let path = "";
53942
- switch (curve2) {
54178
+ switch (curve) {
53943
54179
  case "stepline":
53944
54180
  path = graphics.line(x3, null, "H") + graphics.line(null, y3, "V");
53945
54181
  break;
@@ -53971,7 +54207,7 @@ class Line {
53971
54207
  }
53972
54208
  pathState = 1;
53973
54209
  if (j2 < series[i2].length - 2) {
53974
- const p = pathToPoint(curve, x2, y);
54210
+ const p = via(pathToPoint);
53975
54211
  linePath += p;
53976
54212
  areaPath += p;
53977
54213
  break;
@@ -53989,7 +54225,7 @@ class Line {
53989
54225
  areaPaths.push(areaPath);
53990
54226
  pathState = -1;
53991
54227
  } else {
53992
- const p = pathToPoint(curve, x2, y);
54228
+ const p = via(pathToPoint);
53993
54229
  linePath += p;
53994
54230
  areaPath += p;
53995
54231
  if (j2 >= series[i2].length - 2) {
@@ -55848,7 +56084,7 @@ class Radar {
55848
56084
  }
55849
56085
  s2.forEach((dv, j2) => {
55850
56086
  const range = Math.abs(this.maxValue - this.minValue);
55851
- dv = dv - this.minValue;
56087
+ dv = Math.max(0, dv - this.minValue);
55852
56088
  if (this.isLog) {
55853
56089
  dv = this.coreUtils.getLogVal(this.logBase, dv, 0);
55854
56090
  }
@@ -55885,7 +56121,7 @@ class Radar {
55885
56121
  shouldClipToGrid: false,
55886
56122
  bindEventsOnPaths: false,
55887
56123
  stroke: w.globals.stroke.colors[i2],
55888
- strokeLineCap: w.config.stroke.lineCap
56124
+ strokeLinecap: w.config.stroke.lineCap
55889
56125
  };
55890
56126
  let pathFrom = null;
55891
56127
  if (w.globals.previousPaths.length > 0) {
@@ -56062,6 +56298,7 @@ class Radar {
56062
56298
  drawXAxisTexts() {
56063
56299
  const w = this.w;
56064
56300
  const xaxisLabelsConfig = w.config.xaxis.labels;
56301
+ const lc = xaxisLabelsConfig.style.colors;
56065
56302
  const elXAxisWrap = this.graphics.group({
56066
56303
  class: "apexcharts-xaxis"
56067
56304
  });
@@ -56085,7 +56322,7 @@ class Radar {
56085
56322
  j: i2,
56086
56323
  parent: elXAxisWrap,
56087
56324
  className: "apexcharts-xaxis-label",
56088
- color: Array.isArray(xaxisLabelsConfig.style.colors) && xaxisLabelsConfig.style.colors[i2] ? xaxisLabelsConfig.style.colors[i2] : "#a8a8a8",
56325
+ color: (Array.isArray(lc) ? lc[i2] : lc) || "#a8a8a8",
56089
56326
  dataLabelsConfig: __spreadValues({
56090
56327
  textAnchor: textPos.textAnchor,
56091
56328
  dropShadow: { enabled: false }
@@ -57070,14 +57307,14 @@ class RangeBar extends Bar {
57070
57307
  * @param {number} seriesIndex
57071
57308
  */
57072
57309
  draw(series, seriesIndex) {
57073
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
57310
+ var _a, _b, _c, _d, _e, _f;
57074
57311
  const w = this.w;
57075
57312
  const graphics = new Graphics(this.w);
57076
57313
  this.rangeBarOptions = this.w.config.plotOptions.rangeBar;
57077
57314
  this.series = series;
57078
57315
  this.seriesRangeStart = w.rangeData.seriesRangeStart;
57079
57316
  this.seriesRangeEnd = w.rangeData.seriesRangeEnd;
57080
- this.barHelpers.initVariables(series);
57317
+ this.barHelpers.initVariables(series, seriesIndex);
57081
57318
  const ret = graphics.group({
57082
57319
  class: "apexcharts-rangebar-series apexcharts-plot-series"
57083
57320
  });
@@ -57099,6 +57336,9 @@ class RangeBar extends Bar {
57099
57336
  this.visibleI = this.visibleI + 1;
57100
57337
  }
57101
57338
  const translationsIndex = this.setSeriesAxis(realIndex);
57339
+ if (this.isHorizontal && w.labelData.timescaleLabels.length) {
57340
+ this.isReversed = false;
57341
+ }
57102
57342
  const initPositions = this.barHelpers.initialPositions(realIndex);
57103
57343
  const {
57104
57344
  y: initY,
@@ -57108,10 +57348,8 @@ class RangeBar extends Bar {
57108
57348
  zeroH
57109
57349
  // zeroH is the baseline where 0 meets y axis
57110
57350
  } = initPositions;
57111
- let barWidth = (_a = initPositions.barWidth) != null ? _a : 0;
57112
- let barHeight = (_b = initPositions.barHeight) != null ? _b : 0;
57113
- const yDivision = (_c = initPositions.yDivision) != null ? _c : 0;
57114
- const xDivision = (_d = initPositions.xDivision) != null ? _d : 0;
57351
+ const yDivision = (_a = initPositions.yDivision) != null ? _a : 0;
57352
+ const xDivision = (_b = initPositions.xDivision) != null ? _b : 0;
57115
57353
  y = initY;
57116
57354
  x2 = initX;
57117
57355
  const elDataLabelsWrap = graphics.group({
@@ -57121,10 +57359,16 @@ class RangeBar extends Bar {
57121
57359
  const elGoalsMarkers = graphics.group({
57122
57360
  class: "apexcharts-rangebar-goals-markers"
57123
57361
  });
57362
+ const data = (
57363
+ /** @type {any} */
57364
+ w.config.series[realIndex].data
57365
+ );
57124
57366
  for (let j2 = 0; j2 < w.globals.dataPoints; j2++) {
57125
57367
  const strokeWidth = this.barHelpers.getStrokeWidth(i2, j2, realIndex);
57126
- const y1 = this.seriesRangeStart[i2][j2];
57127
- const y2 = this.seriesRangeEnd[i2][j2];
57368
+ let barWidth = (_c = initPositions.barWidth) != null ? _c : 0;
57369
+ let barHeight = (_d = initPositions.barHeight) != null ? _d : 0;
57370
+ const y1 = this.seriesRangeStart[realIndex][j2];
57371
+ const y2 = this.seriesRangeEnd[realIndex][j2];
57128
57372
  let paths = (
57129
57373
  /** @type {any} */
57130
57374
  null
@@ -57136,20 +57380,16 @@ class RangeBar extends Bar {
57136
57380
  if (w.config.plotOptions.bar.rangeBarGroupRows) {
57137
57381
  seriesLen = 1;
57138
57382
  }
57139
- if (typeof /** @type {Record<string,any>} */
57140
- ((_e = w.config.series[i2].data) == null ? void 0 : _e[j2]) === "undefined") {
57383
+ if (typeof (data == null ? void 0 : data[j2]) === "undefined") {
57141
57384
  break;
57142
57385
  }
57143
57386
  if (this.isHorizontal) {
57144
57387
  barYPosition = y + barHeight * /** @type {any} */
57145
57388
  this.visibleI;
57146
57389
  const srty = (yDivision - barHeight * seriesLen) / 2;
57147
- if (
57148
- /** @type {Record<string,any>} */
57149
- (_g = (_f = w.config.series[i2].data) == null ? void 0 : _f[j2]) == null ? void 0 : _g.x
57150
- ) {
57390
+ if (((_e = data[j2]) == null ? void 0 : _e.x) != null) {
57151
57391
  const positions = this.detectOverlappingBars({
57152
- i: i2,
57392
+ i: realIndex,
57153
57393
  j: j2,
57154
57394
  barYPosition,
57155
57395
  srty,
@@ -57172,17 +57412,14 @@ class RangeBar extends Bar {
57172
57412
  barWidth = paths.barWidth;
57173
57413
  } else {
57174
57414
  if (w.axisFlags.isXNumeric) {
57175
- x2 = (w.seriesData.seriesX[i2][j2] - w.globals.minX) / this.xRatio - barWidth / 2;
57415
+ x2 = (w.seriesData.seriesX[realIndex][j2] - w.globals.minX) / this.xRatio - barWidth / 2;
57176
57416
  }
57177
57417
  barXPosition = x2 + barWidth * /** @type {any} */
57178
57418
  this.visibleI;
57179
57419
  const srtx = (xDivision - barWidth * seriesLen) / 2;
57180
- if (
57181
- /** @type {Record<string,any>} */
57182
- (_i = (_h = w.config.series[i2].data) == null ? void 0 : _h[j2]) == null ? void 0 : _i.x
57183
- ) {
57420
+ if (((_f = data[j2]) == null ? void 0 : _f.x) != null) {
57184
57421
  const positions = this.detectOverlappingBars({
57185
- i: i2,
57422
+ i: realIndex,
57186
57423
  j: j2,
57187
57424
  barXPosition,
57188
57425
  srtx,
@@ -57201,9 +57438,10 @@ class RangeBar extends Bar {
57201
57438
  xDivision
57202
57439
  }, params));
57203
57440
  barHeight = paths.barHeight;
57441
+ barXPosition = paths.barXPosition;
57204
57442
  }
57205
57443
  const barGoalLine = this.barHelpers.drawGoalLine({
57206
- barXPosition: paths.barXPosition,
57444
+ barXPosition,
57207
57445
  barYPosition,
57208
57446
  goalX: paths.goalX,
57209
57447
  goalY: paths.goalY,
@@ -57248,19 +57486,11 @@ class RangeBar extends Bar {
57248
57486
  });
57249
57487
  }
57250
57488
  if (w.globals.previousPaths.length > 0) {
57251
- const data = (
57252
- /** @type {Record<string,any>} */
57253
- w.config.series[i2].data || []
57254
- );
57255
- const newKeys = [];
57256
- for (let j2 = 0; j2 < data.length; j2++) {
57257
- newKeys.push(datumKey(w, realIndex, j2));
57258
- }
57259
57489
  renderBarExitGhosts({
57260
57490
  w,
57261
57491
  elSeries,
57262
57492
  record: this._prevRecord(realIndex),
57263
- newKeys,
57493
+ newKeys: this._keys(realIndex),
57264
57494
  isHorizontal: this.isHorizontal,
57265
57495
  speed: w.config.chart.animations.dynamicAnimation.speed
57266
57496
  });
@@ -57312,11 +57542,11 @@ class RangeBar extends Bar {
57312
57542
  );
57313
57543
  if (overlaps.indexOf(rangeName) > -1) {
57314
57544
  barHeight = initPositions.barHeight / overlaps.length;
57315
- barYPosition = barHeight * this.visibleI + yDivision * (100 - parseInt(this.barOptions.barHeight, 10)) / 100 / 2 + barHeight * (this.visibleI + overlaps.indexOf(rangeName)) + yDivision * rowIndex;
57545
+ barYPosition += barHeight * overlaps.indexOf(rangeName);
57316
57546
  }
57317
57547
  }
57318
57548
  } else {
57319
- if (rowIndex > -1 && !w.labelData.timescaleLabels.length) {
57549
+ if (rowIndex > -1 && !w.axisFlags.isXNumeric) {
57320
57550
  if (w.config.plotOptions.bar.rangeBarGroupRows) {
57321
57551
  barXPosition = srtx + xDivision * rowIndex;
57322
57552
  } else {
@@ -57330,7 +57560,7 @@ class RangeBar extends Bar {
57330
57560
  );
57331
57561
  if (overlaps.indexOf(rangeName) > -1) {
57332
57562
  barWidth = initPositions.barWidth / overlaps.length;
57333
- barXPosition = barWidth * this.visibleI + xDivision * (100 - parseInt(this.barOptions.barWidth, 10)) / 100 / 2 + barWidth * (this.visibleI + overlaps.indexOf(rangeName)) + xDivision * rowIndex;
57563
+ barXPosition += barWidth * overlaps.indexOf(rangeName);
57334
57564
  }
57335
57565
  }
57336
57566
  }
@@ -57353,7 +57583,7 @@ class RangeBar extends Bar {
57353
57583
  var _a, _b;
57354
57584
  const w = this.w;
57355
57585
  const { i: i2, j: j2, realIndex, translationsIndex } = indexes;
57356
- const yRatio = this.yRatio[translationsIndex];
57586
+ const yRatio = this.yRatio[translationsIndex] * (this.isReversed ? -1 : 1);
57357
57587
  const range = this.getRangeValue(realIndex, j2);
57358
57588
  let y1 = Math.min(range.start, range.end);
57359
57589
  let y2 = Math.max(range.start, range.end);
@@ -57361,7 +57591,7 @@ class RangeBar extends Bar {
57361
57591
  ((_a = this.series[i2]) == null ? void 0 : _a[j2]) === "undefined" || /** @type {any} */
57362
57592
  ((_b = this.series[i2]) == null ? void 0 : _b[j2]) === null);
57363
57593
  if (!hasValue) {
57364
- y1 = zeroH;
57594
+ y1 = y2 = zeroH;
57365
57595
  } else {
57366
57596
  y1 = zeroH - y1 / yRatio;
57367
57597
  y2 = zeroH - y2 / yRatio;
@@ -57422,6 +57652,30 @@ class RangeBar extends Bar {
57422
57652
  barXPosition
57423
57653
  };
57424
57654
  }
57655
+ /**
57656
+ * Timeline datums key by their own row, not by the j-th label: a row can
57657
+ * hold several bars, so labels[j] names some other datum's row.
57658
+ * @param {number} realIndex
57659
+ * @returns {string[]}
57660
+ */
57661
+ _keys(realIndex) {
57662
+ const c = (
57663
+ /** @type {any} */
57664
+ this._keyCache || (this._keyCache = {})
57665
+ );
57666
+ const data = (
57667
+ /** @type {any} */
57668
+ this.w.config.series[realIndex].data
57669
+ );
57670
+ return c[realIndex] || (c[realIndex] = uniquifyKeys(
57671
+ (data || []).map(
57672
+ (d, j2) => {
57673
+ var _a;
57674
+ return "c:" + ((_a = d == null ? void 0 : d.x) != null ? _a : j2);
57675
+ }
57676
+ )
57677
+ ));
57678
+ }
57425
57679
  /**
57426
57680
  * @param {number} val
57427
57681
  */
@@ -57448,8 +57702,9 @@ class RangeBar extends Bar {
57448
57702
  }) {
57449
57703
  const w = this.w;
57450
57704
  const { realIndex, j: j2 } = indexes;
57451
- const x1 = this.preventBarOverflow(zeroW + y1 / this.invertedYRatio);
57452
- const x2 = this.preventBarOverflow(zeroW + y2 / this.invertedYRatio);
57705
+ const ratio = this.invertedYRatio * (this.isReversed ? -1 : 1);
57706
+ const x1 = this.preventBarOverflow(zeroW + y1 / ratio);
57707
+ const x2 = this.preventBarOverflow(zeroW + y2 / ratio);
57453
57708
  const range = this.getRangeValue(realIndex, j2);
57454
57709
  const barWidth = Math.abs(x2 - x1);
57455
57710
  const paths = this.barHelpers.getBarpaths({
@@ -57782,7 +58037,7 @@ class TreemapChart {
57782
58037
  if (w.config.chart.dropShadow.enabled) {
57783
58038
  const shadow = w.config.chart.dropShadow;
57784
58039
  const filters = new Filters(this.w);
57785
- filters.dropShadow(ret, shadow, i2);
58040
+ filters.dropShadow(elSeries, shadow, i2);
57786
58041
  }
57787
58042
  const elDataLabelWrap = graphics.group({
57788
58043
  class: "apexcharts-data-labels"
@@ -57876,6 +58131,7 @@ class TreemapChart {
57876
58131
  });
57877
58132
  elRect.node.classList.add("apexcharts-treemap-rect");
57878
58133
  elRect.node.setAttribute("data:key", morphKey(leaf._key));
58134
+ let tileTween = null;
57879
58135
  let fromRect = {
57880
58136
  x: x1 + (x2 - x1) / 2,
57881
58137
  y: y1 + (y2 - y1) / 2,
@@ -57901,7 +58157,7 @@ class TreemapChart {
57901
58157
  if (w.globals.resized) {
57902
58158
  w.globals.animationEnded = true;
57903
58159
  } else {
57904
- this.animateTreemap(
58160
+ tileTween = this.animateTreemap(
57905
58161
  elRect,
57906
58162
  fromRect,
57907
58163
  toRect,
@@ -57912,7 +58168,6 @@ class TreemapChart {
57912
58168
  );
57913
58169
  }
57914
58170
  }
57915
- let tileTween = null;
57916
58171
  let labelFrom = null;
57917
58172
  let prevLook = null;
57918
58173
  if (w.globals.dataChanged) {
@@ -58294,7 +58549,7 @@ class TreemapChart {
58294
58549
  const elGroup = graphics.group({
58295
58550
  class: "apexcharts-treemap-parent",
58296
58551
  "data:depth": depth,
58297
- "data:name": Utils$1.escapeString(node.name)
58552
+ "data:name": node.name
58298
58553
  });
58299
58554
  const key = morphKey(node._key);
58300
58555
  const morphFrom = this._morphKeyed() ? this.ctx.morphTypeChange.getInitialPathForKey(key) : null;
@@ -58403,7 +58658,7 @@ class TreemapChart {
58403
58658
  if (typeof header.formatter === "function") {
58404
58659
  text = String(
58405
58660
  header.formatter(node.name, {
58406
- value: node.value,
58661
+ value: node._area,
58407
58662
  depth,
58408
58663
  seriesIndex: i2,
58409
58664
  node,
@@ -58411,7 +58666,7 @@ class TreemapChart {
58411
58666
  })
58412
58667
  );
58413
58668
  } else if (header.showValue) {
58414
- text = `${text} ${this._formatValue(node.value)}`;
58669
+ text = `${text} ${this._formatValue(node._area, node._si)}`;
58415
58670
  }
58416
58671
  headerText = text;
58417
58672
  const offsetX = Number(header.offsetX) || 0;
@@ -58422,7 +58677,9 @@ class TreemapChart {
58422
58677
  const clipped = graphics.getTextBasedOnMaxWidth({
58423
58678
  text,
58424
58679
  maxWidth,
58425
- fontSize
58680
+ fontSize,
58681
+ fontFamily: chrome.headerFontFamily,
58682
+ fontWeight: chrome.headerFontWeight
58426
58683
  });
58427
58684
  if (clipped) {
58428
58685
  let tx = x1 + pad + offsetX;
@@ -58497,7 +58754,7 @@ class TreemapChart {
58497
58754
  const total = this._drawnTotal();
58498
58755
  const pct = total > 0 ? (node._area / total * 100).toFixed(1) : "0";
58499
58756
  const n2 = this._countLeaves(node);
58500
- const lead = visibleText && String(visibleText).trim() ? String(visibleText).replace(/\s+/g, " ").trim() : `${node.name}, ${this._formatValue(node._area)}`;
58757
+ const lead = visibleText && String(visibleText).trim() ? String(visibleText).replace(/\s+/g, " ").trim() : `${node.name}, ${this._formatValue(node._area, node._si)}`;
58501
58758
  return `${lead}, ${n2} ${n2 === 1 ? "item" : "items"}, ${pct}% of total`;
58502
58759
  }
58503
58760
  /**
@@ -58516,15 +58773,18 @@ class TreemapChart {
58516
58773
  * @param {string} [visibleText] the header's rendered text, unclipped
58517
58774
  */
58518
58775
  _makeParentAccessible(el, node, chrome, elRect, visibleText) {
58776
+ const a11y = this.w.config.chart.accessibility;
58519
58777
  if (!el || !el.setAttribute) return;
58520
- if (!this._zoomEnabled()) return;
58778
+ if (!a11y.enabled || !a11y.keyboard.enabled || !this._zoomEnabled()) return;
58779
+ const open = this.w.globals.treemapFocusKey === node._key;
58780
+ el.tmKey = node._key;
58521
58781
  el.setAttribute("role", "button");
58522
58782
  el.setAttribute("tabindex", "0");
58523
58783
  el.setAttribute(
58524
58784
  "aria-label",
58525
- `${this._parentLabel(node, visibleText)}. Zoom in`
58785
+ `${this._parentLabel(node, visibleText)}. Zoom ${open ? "out" : "in"}`
58526
58786
  );
58527
- el.setAttribute("aria-expanded", "false");
58787
+ el.setAttribute("aria-expanded", open);
58528
58788
  if (!Environment.isBrowser() || !el.addEventListener) return;
58529
58789
  el.addEventListener("focus", () => {
58530
58790
  elRect.node.setAttribute("stroke", chrome.hoverColor);
@@ -58591,15 +58851,17 @@ class TreemapChart {
58591
58851
  * @returns {boolean}
58592
58852
  */
58593
58853
  _zoomEnabled() {
58854
+ var _a;
58594
58855
  const w = this.w;
58595
58856
  const z = w.config.plotOptions.treemap.zoom;
58596
58857
  if (!z || !z.enabled || !this.showParents) return false;
58597
58858
  const dd = w.config.drilldown;
58598
- if (this.ctx.drilldown && dd && dd.enabled && Array.isArray(dd.series) && dd.series.length) {
58599
- if (!this._warnedZoomConflict) {
58600
- this._warnedZoomConflict = true;
58859
+ const d = this.ctx.drilldown;
58860
+ if (d && dd && dd.enabled && (((_a = dd.series) == null ? void 0 : _a.length) || dd.onDrillDown)) {
58861
+ if (!d.zoomWarned) {
58862
+ d.zoomWarned = true;
58601
58863
  console.warn(
58602
- "ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead."
58864
+ "ApexCharts treemap: zoom is ignored while drilldown is active (plotOptions.treemap.zoom vs drilldown series or onDrillDown)."
58603
58865
  );
58604
58866
  }
58605
58867
  return false;
@@ -58609,8 +58871,8 @@ class TreemapChart {
58609
58871
  /**
58610
58872
  * The focused branch for this render, looked up by the key stashed on the
58611
58873
  * last click. Keys are rebuilt identically from the same data, so the focus
58612
- * survives a re-render; a key that no longer resolves (the data changed under
58613
- * it) simply falls back to the whole tree.
58874
+ * survives a re-render; a key that no longer resolves, or a branch left with
58875
+ * nothing to draw (the data changed under it), falls back to the whole tree.
58614
58876
  * @param {any[]} drawn
58615
58877
  * @returns {any}
58616
58878
  */
@@ -58627,7 +58889,11 @@ class TreemapChart {
58627
58889
  if (node.children) node.children.forEach(walk);
58628
58890
  };
58629
58891
  drawn.forEach(walk);
58630
- return found && found.children && found.children.length ? found : null;
58892
+ if (found && found.children && found.children.length && this._subtreeArea(found) > 0) {
58893
+ return found;
58894
+ }
58895
+ this.w.globals.treemapFocusKey = null;
58896
+ return null;
58631
58897
  }
58632
58898
  /**
58633
58899
  * @param {any} node
@@ -58640,28 +58906,7 @@ class TreemapChart {
58640
58906
  const w = this.w;
58641
58907
  if (!node || !node.children || !node.children.length) return;
58642
58908
  const next = w.globals.treemapFocusKey === node._key ? null : node._key;
58643
- const done = this._refocus(next);
58644
- if (!restoreFocus || !done || typeof done.then !== "function") return;
58645
- done.then(() => {
58646
- if (!Environment.isBrowser()) return;
58647
- const crumb = (
58648
- /** @type {any} */
58649
- w.dom.baseEl.querySelector(
58650
- ".apexcharts-breadcrumb .apexcharts-breadcrumb-item"
58651
- )
58652
- );
58653
- if (crumb && crumb.focus) {
58654
- crumb.focus();
58655
- return;
58656
- }
58657
- const header = (
58658
- /** @type {any} */
58659
- w.dom.baseEl.querySelector(
58660
- ".apexcharts-treemap-parent-header[tabindex]"
58661
- )
58662
- );
58663
- if (header && header.focus) header.focus();
58664
- });
58909
+ this._refocus(next, restoreFocus);
58665
58910
  }
58666
58911
  /**
58667
58912
  * Re-render focused on another branch (null: the whole tree).
@@ -58672,22 +58917,34 @@ class TreemapChart {
58672
58917
  * left, which replayed the mount animation (every tile growing from
58673
58918
  * nothing) or snapped, while the containers, headers and labels jumped.
58674
58919
  * @param {string | null} next
58675
- * @returns {any} the update's promise
58920
+ * @param {boolean} [restoreFocus] see _zoomTo
58676
58921
  */
58677
- _refocus(next) {
58678
- var _a;
58922
+ _refocus(next, restoreFocus) {
58679
58923
  const w = this.w;
58680
58924
  const gl = w.globals;
58925
+ const from = gl.treemapFocusKey;
58681
58926
  const anim = w.config.chart.animations;
58682
58927
  const animate = !!(anim.enabled && anim.dynamicAnimation.enabled);
58683
- gl.treemapZoom = animate && Environment.isBrowser() ? { from: (_a = gl.treemapFocusKey) != null ? _a : null, to: next } : null;
58928
+ gl.treemapZoom = animate && Environment.isBrowser() ? { from: from != null ? from : null, to: next } : null;
58684
58929
  gl.treemapFocusKey = next;
58685
58930
  this._hideParentTooltip();
58686
58931
  gl.shouldAnimate = animate;
58687
58932
  gl.resized = true;
58688
58933
  gl.dataChanged = true;
58689
58934
  if (gl.treemapZoom) this.ctx.series.getPreviousPaths();
58690
- return this.ctx.update();
58935
+ const done = this.ctx.update();
58936
+ if (restoreFocus) {
58937
+ done.then(() => {
58938
+ const b = w.dom.baseEl;
58939
+ const heads = (
58940
+ /** @type {any[]} */
58941
+ Array.from(
58942
+ b.querySelectorAll(".apexcharts-treemap-parent-header[tabindex]")
58943
+ )
58944
+ );
58945
+ (b.querySelector(".apexcharts-breadcrumb-item") || heads.find((h) => h.tmKey === from) || heads[0] || b).focus();
58946
+ });
58947
+ }
58691
58948
  }
58692
58949
  /**
58693
58950
  * A zoom reframes one tree, so it moves like a camera: one map takes the
@@ -58999,8 +59256,9 @@ class TreemapChart {
58999
59256
  crumbs: [{ label: "All", data: null }].concat(
59000
59257
  chain.map((n2) => ({ label: n2.name, data: n2 }))
59001
59258
  ),
59002
- onNavigate: (_i, crumb) => {
59003
- this._refocus(crumb.data ? crumb.data._key : null);
59259
+ // A keyboard click (detail 0) keeps focus in the chart.
59260
+ onNavigate: (_i, crumb, e2) => {
59261
+ this._refocus(crumb.data ? crumb.data._key : null, !e2.detail);
59004
59262
  }
59005
59263
  });
59006
59264
  if (!nav) return;
@@ -59049,7 +59307,7 @@ class TreemapChart {
59049
59307
  const t2 = this._tip();
59050
59308
  if (!t2) return;
59051
59309
  const total = this._drawnTotal();
59052
- const parentVal = node._parent ? node._parent._area : total;
59310
+ const parentVal = node._parent ? this._subtreeArea(node._parent) : total;
59053
59311
  const pctTotal = total > 0 ? (node._area / total * 100).toFixed(1) : "0.0";
59054
59312
  const pctParent = parentVal > 0 ? (node._area / parentVal * 100).toFixed(1) : pctTotal;
59055
59313
  const cfg = this.w.config.plotOptions.treemap.parents;
@@ -59070,10 +59328,9 @@ class TreemapChart {
59070
59328
  } else {
59071
59329
  const marker = this._parentChrome(node.depth || 0).headerBg;
59072
59330
  const groupBg = w.config.tooltip.fillSeriesColor ? `background-color:${marker};` : "";
59073
- html = `<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${groupBg}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${Utils$1.escapeString(
59074
- node.name
59075
- )}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(
59076
- node._area
59331
+ html = `<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${groupBg}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${String(node.name).replace(/&/g, "&amp;").replace(/</g, "&lt;")}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(
59332
+ node._area,
59333
+ node._si
59077
59334
  )}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${leafCount} items, </span><span class="apexcharts-tooltip-text-y-value">${pctParent}% of parent, ${pctTotal}% of total</span></div></div></div>`;
59078
59335
  }
59079
59336
  t2.innerHTML = html;
@@ -59169,17 +59426,21 @@ class TreemapChart {
59169
59426
  }
59170
59427
  /**
59171
59428
  * Format an aggregate the way the chart formats its own y values, so a
59172
- * parent's total reads like the tiles it contains.
59429
+ * parent's total reads like the tiles it contains. A branch is no data
59430
+ * point, so dataPointIndex is -1.
59173
59431
  * @param {number} v
59432
+ * @param {number} [si] the branch's series index
59174
59433
  * @returns {string}
59175
59434
  */
59176
- _formatValue(v) {
59435
+ _formatValue(v, si) {
59177
59436
  var _a, _b, _c, _d, _e;
59178
59437
  const w = this.w;
59179
59438
  const fmt = ((_b = (_a = w.config.tooltip) == null ? void 0 : _a.y) == null ? void 0 : _b.formatter) || ((_e = (_d = (_c = w.config.yaxis) == null ? void 0 : _c[0]) == null ? void 0 : _d.labels) == null ? void 0 : _e.formatter);
59180
59439
  if (typeof fmt === "function") {
59181
59440
  try {
59182
- return String(fmt(v, { seriesIndex: 0, dataPointIndex: 0, w }));
59441
+ return String(
59442
+ fmt(v, { seriesIndex: si || 0, dataPointIndex: -1, w })
59443
+ );
59183
59444
  } catch (_) {
59184
59445
  }
59185
59446
  }
@@ -59260,7 +59521,7 @@ class TreemapChart {
59260
59521
  */
59261
59522
  rotateToFitLabel(elText, fontSize, text, x1, y1, x2, y2) {
59262
59523
  const graphics = new Graphics(this.w);
59263
- const textRect = graphics.getTextRects(text, String(fontSize));
59524
+ const textRect = this._labelRect(graphics, text, fontSize);
59264
59525
  if (textRect.width + this.w.config.stroke.width + 5 > x2 - x1 && textRect.width <= y2 - y1) {
59265
59526
  const labelRotatingCenter = graphics.rotateAroundCenter(elText.node);
59266
59527
  elText.node.setAttribute(
@@ -59269,6 +59530,24 @@ class TreemapChart {
59269
59530
  );
59270
59531
  }
59271
59532
  }
59533
+ /**
59534
+ * A tile label's box, measured at the family and weight it is drawn at
59535
+ * (bold is wider than the default regular).
59536
+ * @param {Graphics} graphics
59537
+ * @param {string} text
59538
+ * @param {string | number} fontSize
59539
+ */
59540
+ _labelRect(graphics, text, fontSize) {
59541
+ const st = this.w.config.dataLabels.style;
59542
+ return graphics.getTextRects(
59543
+ text,
59544
+ String(fontSize),
59545
+ st.fontFamily,
59546
+ "",
59547
+ true,
59548
+ st.fontWeight
59549
+ );
59550
+ }
59272
59551
  // This is an alternative label formatting method that uses a
59273
59552
  // consistent font size, and trims the edge of long labels
59274
59553
  /**
@@ -59281,13 +59560,13 @@ class TreemapChart {
59281
59560
  */
59282
59561
  truncateLabels(text, fontSize, x1, y1, x2, y2) {
59283
59562
  const graphics = new Graphics(this.w);
59284
- const textRect = graphics.getTextRects(text, String(fontSize));
59563
+ const textRect = this._labelRect(graphics, text, fontSize);
59285
59564
  const labelMaxWidth = textRect.width + this.w.config.stroke.width + 5 > x2 - x1 && y2 - y1 > x2 - x1 ? y2 - y1 : x2 - x1;
59286
- const truncatedText = graphics.getTextBasedOnMaxWidth({
59565
+ const truncatedText = graphics.getTextBasedOnMaxWidth(__spreadProps(__spreadValues({}, this.w.config.dataLabels.style), {
59287
59566
  text,
59288
59567
  maxWidth: labelMaxWidth,
59289
59568
  fontSize
59290
- });
59569
+ }));
59291
59570
  if (text.length !== truncatedText.length && labelMaxWidth / fontSize < 5) {
59292
59571
  return "";
59293
59572
  } else {