apexcharts 7.2.0 → 7.4.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 (172) hide show
  1. package/LICENSE +30 -11
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +545 -463
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.esm.js +1149 -801
  6. package/dist/apexcharts.js +684 -254
  7. package/dist/apexcharts.min.js +2 -2
  8. package/dist/apexcharts.ssr.common.js +2 -2
  9. package/dist/apexcharts.ssr.esm.js +684 -254
  10. package/dist/area.common.js +1 -1
  11. package/dist/area.esm.js +1 -1
  12. package/dist/bar.common.js +2 -2
  13. package/dist/bar.esm.js +20 -10
  14. package/dist/bar.js +2 -2
  15. package/dist/boxPlot.common.js +2 -2
  16. package/dist/boxPlot.esm.js +20 -10
  17. package/dist/bubble.common.js +1 -1
  18. package/dist/bubble.esm.js +1 -1
  19. package/dist/candlestick.common.js +2 -2
  20. package/dist/candlestick.esm.js +20 -10
  21. package/dist/candlestick.js +2 -2
  22. package/dist/column.common.js +2 -2
  23. package/dist/column.esm.js +20 -10
  24. package/dist/core.common.js +2 -2
  25. package/dist/core.esm.js +545 -463
  26. package/dist/donut.common.js +1 -1
  27. package/dist/donut.esm.js +1 -1
  28. package/dist/dumbbell.common.js +2 -2
  29. package/dist/dumbbell.esm.js +20 -10
  30. package/dist/features/all.common.js +2 -2
  31. package/dist/features/all.esm.js +364 -26
  32. package/dist/features/annotations.common.js +1 -1
  33. package/dist/features/annotations.esm.js +1 -1
  34. package/dist/features/annotations.js +1 -1
  35. package/dist/features/context-menu.common.js +1 -1
  36. package/dist/features/context-menu.esm.js +1 -1
  37. package/dist/features/context-menu.js +1 -1
  38. package/dist/features/drilldown.common.js +1 -1
  39. package/dist/features/drilldown.esm.js +1 -1
  40. package/dist/features/drilldown.js +1 -1
  41. package/dist/features/dumbbell.common.js +1 -1
  42. package/dist/features/dumbbell.esm.js +1 -1
  43. package/dist/features/dumbbell.js +1 -1
  44. package/dist/features/exports.common.js +2 -2
  45. package/dist/features/exports.esm.js +12 -14
  46. package/dist/features/exports.js +2 -2
  47. package/dist/features/facet.common.js +1 -1
  48. package/dist/features/facet.esm.js +1 -1
  49. package/dist/features/facet.js +1 -1
  50. package/dist/features/history.common.js +1 -1
  51. package/dist/features/history.esm.js +1 -1
  52. package/dist/features/history.js +1 -1
  53. package/dist/features/ink.common.js +1 -1
  54. package/dist/features/ink.esm.js +1 -1
  55. package/dist/features/ink.js +1 -1
  56. package/dist/features/keyboard.common.js +2 -2
  57. package/dist/features/keyboard.esm.js +14 -1
  58. package/dist/features/keyboard.js +2 -2
  59. package/dist/features/legend.common.js +1 -1
  60. package/dist/features/legend.esm.js +1 -1
  61. package/dist/features/legend.js +1 -1
  62. package/dist/features/link.common.js +1 -1
  63. package/dist/features/link.esm.js +38 -38
  64. package/dist/features/link.js +1 -1
  65. package/dist/features/marks.common.js +1 -1
  66. package/dist/features/marks.esm.js +1 -1
  67. package/dist/features/marks.js +1 -1
  68. package/dist/features/measure.common.js +1 -1
  69. package/dist/features/measure.esm.js +1 -1
  70. package/dist/features/measure.js +1 -1
  71. package/dist/features/morph.common.js +1 -1
  72. package/dist/features/morph.esm.js +1 -1
  73. package/dist/features/morph.js +1 -1
  74. package/dist/features/perspectives.common.js +1 -1
  75. package/dist/features/perspectives.esm.js +11 -11
  76. package/dist/features/perspectives.js +1 -1
  77. package/dist/features/raincloud.common.js +1 -1
  78. package/dist/features/raincloud.esm.js +1 -1
  79. package/dist/features/raincloud.js +1 -1
  80. package/dist/features/renderer-canvas.common.js +1 -1
  81. package/dist/features/renderer-canvas.esm.js +1 -1
  82. package/dist/features/renderer-canvas.js +1 -1
  83. package/dist/features/stats.common.js +1 -1
  84. package/dist/features/stats.esm.js +1 -1
  85. package/dist/features/stats.js +1 -1
  86. package/dist/features/storyboard.common.js +1 -1
  87. package/dist/features/storyboard.esm.js +11 -11
  88. package/dist/features/storyboard.js +1 -1
  89. package/dist/features/streamgraph.common.js +1 -1
  90. package/dist/features/streamgraph.esm.js +1 -1
  91. package/dist/features/streamgraph.js +1 -1
  92. package/dist/features/toolbar.common.js +2 -2
  93. package/dist/features/toolbar.esm.js +172 -25
  94. package/dist/features/toolbar.js +2 -2
  95. package/dist/features/trellis.common.js +1 -1
  96. package/dist/features/trellis.esm.js +1 -1
  97. package/dist/features/trellis.js +1 -1
  98. package/dist/features/waterfall.common.js +1 -1
  99. package/dist/features/waterfall.esm.js +1 -1
  100. package/dist/features/waterfall.js +1 -1
  101. package/dist/features/weave.common.js +2 -2
  102. package/dist/features/weave.esm.js +180 -2
  103. package/dist/features/weave.js +2 -2
  104. package/dist/heatmap.common.js +1 -1
  105. package/dist/heatmap.esm.js +1 -1
  106. package/dist/heatmap.js +1 -1
  107. package/dist/histogram.common.js +2 -2
  108. package/dist/histogram.esm.js +20 -10
  109. package/dist/line.common.js +1 -1
  110. package/dist/line.esm.js +1 -1
  111. package/dist/line.js +1 -1
  112. package/dist/pictograms.common.js +1 -1
  113. package/dist/pictograms.esm.js +1 -1
  114. package/dist/pictograms.js +1 -1
  115. package/dist/pie.common.js +1 -1
  116. package/dist/pie.esm.js +1 -1
  117. package/dist/pie.js +1 -1
  118. package/dist/polarArea.common.js +1 -1
  119. package/dist/polarArea.esm.js +1 -1
  120. package/dist/radar.common.js +1 -1
  121. package/dist/radar.esm.js +1 -1
  122. package/dist/radar.js +1 -1
  123. package/dist/radialBar.common.js +1 -1
  124. package/dist/radialBar.esm.js +1 -1
  125. package/dist/radialBar.js +1 -1
  126. package/dist/raincloud.common.js +2 -2
  127. package/dist/raincloud.esm.js +20 -10
  128. package/dist/rangeArea.common.js +1 -1
  129. package/dist/rangeArea.esm.js +1 -1
  130. package/dist/rangeBar.common.js +2 -2
  131. package/dist/rangeBar.esm.js +20 -10
  132. package/dist/scatter.common.js +1 -1
  133. package/dist/scatter.esm.js +1 -1
  134. package/dist/streamgraph.common.js +1 -1
  135. package/dist/streamgraph.esm.js +1 -1
  136. package/dist/sunburst.common.js +1 -1
  137. package/dist/sunburst.esm.js +1 -1
  138. package/dist/sunburst.js +1 -1
  139. package/dist/treemap.common.js +1 -1
  140. package/dist/treemap.esm.js +1 -1
  141. package/dist/treemap.js +1 -1
  142. package/dist/unit-shapes.common.js +1 -1
  143. package/dist/unit-shapes.esm.js +1 -1
  144. package/dist/unit-shapes.js +1 -1
  145. package/dist/unit.common.js +1 -1
  146. package/dist/unit.esm.js +79 -79
  147. package/dist/unit.js +1 -1
  148. package/dist/violin.common.js +2 -2
  149. package/dist/violin.esm.js +20 -10
  150. package/dist/violin.js +2 -2
  151. package/dist/waterfall.common.js +2 -2
  152. package/dist/waterfall.esm.js +20 -10
  153. package/package.json +2 -2
  154. package/src/apexcharts.js +39 -15
  155. package/src/charts/common/bar/Helpers.js +31 -12
  156. package/src/modules/Data.js +8 -2
  157. package/src/modules/Exports.js +14 -12
  158. package/src/modules/Formatters.js +24 -1
  159. package/src/modules/Range.js +28 -1
  160. package/src/modules/Toolbar.js +112 -2
  161. package/src/modules/ZoomPanSelection.js +85 -7
  162. package/src/modules/accessibility/KeyboardNavigation.js +14 -0
  163. package/src/modules/axes/YAxis.js +12 -15
  164. package/src/modules/helpers/UpdateHelpers.js +25 -8
  165. package/src/modules/settings/Globals.js +5 -10
  166. package/src/modules/settings/Options.js +15 -0
  167. package/src/modules/weave/PluginAPI.js +57 -1
  168. package/src/modules/weave/WeaveHost.js +148 -0
  169. package/src/ssr/DOMShim.js +50 -0
  170. package/src/types/internal.d.ts +1 -1
  171. package/src/utils/Utils.js +6 -9
  172. package/types/apexcharts.d.ts +17 -0
@@ -39,7 +39,7 @@ var __async = (__this, __arguments, generator) => {
39
39
  });
40
40
  };
41
41
  /*!
42
- * ApexCharts v7.2.0
42
+ * ApexCharts v7.4.0
43
43
  * (c) 2018-2026 ApexCharts
44
44
  */
45
45
  class Environment {
@@ -78,6 +78,11 @@ class Environment {
78
78
  return {};
79
79
  }
80
80
  }
81
+ const CHAR_WIDTH_EM = 0.55;
82
+ const ASCENT_EM = 0.917;
83
+ const DESCENT_EM = 0.25;
84
+ const LINE_HEIGHT_EM = 1.1;
85
+ const DEFAULT_FONT_SIZE = 11;
81
86
  class SSRElement {
82
87
  /**
83
88
  * @param {string} nodeName
@@ -198,6 +203,43 @@ class SSRElement {
198
203
  y: 0
199
204
  };
200
205
  }
206
+ getBBox() {
207
+ if (this.nodeName !== "text" && this.nodeName !== "tspan") {
208
+ return { x: 0, y: 0, width: 0, height: 0 };
209
+ }
210
+ const lines = this._textLines();
211
+ const longest = lines.reduce((acc, line) => Math.max(acc, line.length), 0);
212
+ if (!longest) {
213
+ return { x: 0, y: 0, width: 0, height: 0 };
214
+ }
215
+ const fontSize = parseFloat(this.attributes.get("font-size")) || DEFAULT_FONT_SIZE;
216
+ const width = longest * fontSize * CHAR_WIDTH_EM;
217
+ const height = fontSize * (ASCENT_EM + DESCENT_EM) + (lines.length - 1) * fontSize * LINE_HEIGHT_EM;
218
+ const anchor = this.attributes.get("text-anchor");
219
+ const x = parseFloat(this.attributes.get("x")) || 0;
220
+ const y = parseFloat(this.attributes.get("y")) || 0;
221
+ return {
222
+ x: anchor === "middle" ? x - width / 2 : anchor === "end" ? x - width : x,
223
+ y: y - fontSize * ASCENT_EM,
224
+ width,
225
+ height
226
+ };
227
+ }
228
+ /**
229
+ * Text of this element, one entry per rendered line
230
+ * @returns {string[]}
231
+ */
232
+ _textLines() {
233
+ var _a;
234
+ const tspans = this.children.filter((child) => child.nodeName === "tspan");
235
+ if (tspans.length) {
236
+ return tspans.map((tspan) => {
237
+ var _a2;
238
+ return String((_a2 = tspan.textContent) != null ? _a2 : "");
239
+ });
240
+ }
241
+ return [String((_a = this.textContent) != null ? _a : "")];
242
+ }
201
243
  getRootNode() {
202
244
  let root = this;
203
245
  while (root.parentNode) {
@@ -687,15 +729,12 @@ let Utils$1 = class Utils {
687
729
  return output;
688
730
  }
689
731
  // A per-series shallow copy: the series OBJECTS are copied, their data arrays
690
- // are shared. Almost every internal "mutation" of a series' data is a
691
- // property REPLACEMENT (`series[i].data = []` on legend collapse,
692
- // `series[i] = 0` for non-axis charts), and those cannot reach a copy made
693
- // this way because the series object was copied at capture time. The
694
- // exception is appendData(), whose push loop grows the shared data array in
695
- // place, so a copy taken before it does see the appended points; see the
696
- // note above defineLazyInitialSeries(). This is the same cheap shape
697
- // `globals.initialSeries` captures, so snapshotting a config stays O(n)
698
- // instead of deep-cloning every point.
732
+ // are shared. Every internal "mutation" of a series' data is a property
733
+ // REPLACEMENT (`series[i].data = []` on legend collapse, `series[i] = 0` for
734
+ // non-axis charts, appendData's concat), and those cannot reach a copy made
735
+ // this way because the series object was copied at capture time. This is the
736
+ // same cheap shape `globals.initialSeries` captures, so snapshotting a config
737
+ // stays O(n) instead of deep-cloning every point.
699
738
  /**
700
739
  * @param {any} series
701
740
  */
@@ -1038,16 +1077,16 @@ let Utils$1 = class Utils {
1038
1077
  * @param {string} color
1039
1078
  */
1040
1079
  shadeRGBColor(percent, color) {
1041
- const f = color.split(","), t2 = percent < 0 ? 0 : 255, p = percent < 0 ? percent * -1 : percent, R2 = parseInt(f[0].slice(4), 10), G = parseInt(f[1], 10), B = parseInt(f[2], 10);
1042
- return "rgb(" + (Math.round((t2 - R2) * p) + R2) + "," + (Math.round((t2 - G) * p) + G) + "," + (Math.round((t2 - B) * p) + B) + ")";
1080
+ const f = color.split(","), t2 = percent < 0 ? 0 : 255, p = percent < 0 ? percent * -1 : percent, R = parseInt(f[0].slice(4), 10), G = parseInt(f[1], 10), B = parseInt(f[2], 10);
1081
+ return "rgb(" + (Math.round((t2 - R) * p) + R) + "," + (Math.round((t2 - G) * p) + G) + "," + (Math.round((t2 - B) * p) + B) + ")";
1043
1082
  }
1044
1083
  /**
1045
1084
  * @param {number} percent
1046
1085
  * @param {string} color
1047
1086
  */
1048
1087
  shadeHexColor(percent, color) {
1049
- const f = parseInt(color.slice(1), 16), t2 = percent < 0 ? 0 : 255, p = percent < 0 ? percent * -1 : percent, R2 = f >> 16, G = f >> 8 & 255, B = f & 255;
1050
- return "#" + (16777216 + (Math.round((t2 - R2) * p) + R2) * 65536 + (Math.round((t2 - G) * p) + G) * 256 + (Math.round((t2 - B) * p) + B)).toString(16).slice(1);
1088
+ const f = parseInt(color.slice(1), 16), t2 = percent < 0 ? 0 : 255, p = percent < 0 ? percent * -1 : percent, R = f >> 16, G = f >> 8 & 255, B = f & 255;
1089
+ return "#" + (16777216 + (Math.round((t2 - R) * p) + R) * 65536 + (Math.round((t2 - G) * p) + G) * 256 + (Math.round((t2 - B) * p) + B)).toString(16).slice(1);
1051
1090
  }
1052
1091
  // beautiful color shading blending code
1053
1092
  // http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors
@@ -1351,11 +1390,11 @@ class DateTime {
1351
1390
  format = format.replace(/(^|[^\\])yyyy+/g, "$1" + y);
1352
1391
  format = format.replace(/(^|[^\\])yy/g, "$1" + y.toString().substr(2, 2));
1353
1392
  format = format.replace(/(^|[^\\])y/g, "$1" + y);
1354
- const M2 = (utc ? date.getUTCMonth() : date.getMonth()) + 1;
1393
+ const M = (utc ? date.getUTCMonth() : date.getMonth()) + 1;
1355
1394
  format = format.replace(/(^|[^\\])MMMM+/g, "$1" + MMMM[0]);
1356
1395
  format = format.replace(/(^|[^\\])MMM/g, "$1" + MMM[0]);
1357
- format = format.replace(/(^|[^\\])MM/g, "$1" + ii(M2));
1358
- format = format.replace(/(^|[^\\])M/g, "$1" + M2);
1396
+ format = format.replace(/(^|[^\\])MM/g, "$1" + ii(M));
1397
+ format = format.replace(/(^|[^\\])M/g, "$1" + M);
1359
1398
  const d = utc ? date.getUTCDate() : date.getDate();
1360
1399
  format = format.replace(/(^|[^\\])dddd+/g, "$1" + dddd[0]);
1361
1400
  format = format.replace(/(^|[^\\])ddd/g, "$1" + ddd[0]);
@@ -1379,26 +1418,26 @@ class DateTime {
1379
1418
  format = format.replace(/(^|[^\\])ff/g, "$1" + ii(f));
1380
1419
  f = Math.round(f / 10);
1381
1420
  format = format.replace(/(^|[^\\])f/g, "$1" + f);
1382
- const T2 = H < 12 ? "AM" : "PM";
1383
- format = format.replace(/(^|[^\\])TT+/g, "$1" + T2);
1384
- format = format.replace(/(^|[^\\])T/g, "$1" + T2.charAt(0));
1385
- const t2 = T2.toLowerCase();
1421
+ const T = H < 12 ? "AM" : "PM";
1422
+ format = format.replace(/(^|[^\\])TT+/g, "$1" + T);
1423
+ format = format.replace(/(^|[^\\])T/g, "$1" + T.charAt(0));
1424
+ const t2 = T.toLowerCase();
1386
1425
  format = format.replace(/(^|[^\\])tt+/g, "$1" + t2);
1387
1426
  format = format.replace(/(^|[^\\])t/g, "$1" + t2.charAt(0));
1388
1427
  let tz = -date.getTimezoneOffset();
1389
- let K = utc || !tz ? "Z" : tz > 0 ? "+" : "-";
1428
+ let K2 = utc || !tz ? "Z" : tz > 0 ? "+" : "-";
1390
1429
  if (!utc) {
1391
1430
  tz = Math.abs(tz);
1392
1431
  const tzHrs = Math.floor(tz / 60);
1393
1432
  const tzMin = tz % 60;
1394
- K += ii(tzHrs) + ":" + ii(tzMin);
1433
+ K2 += ii(tzHrs) + ":" + ii(tzMin);
1395
1434
  }
1396
- format = format.replace(/(^|[^\\])K/g, "$1" + K);
1435
+ format = format.replace(/(^|[^\\])K/g, "$1" + K2);
1397
1436
  const day = (utc ? date.getUTCDay() : date.getDay()) + 1;
1398
1437
  format = format.replace(new RegExp(dddd[0], "g"), dddd[day]);
1399
1438
  format = format.replace(new RegExp(ddd[0], "g"), ddd[day]);
1400
- format = format.replace(new RegExp(MMMM[0], "g"), MMMM[M2]);
1401
- format = format.replace(new RegExp(MMM[0], "g"), MMM[M2]);
1439
+ format = format.replace(new RegExp(MMMM[0], "g"), MMMM[M]);
1440
+ format = format.replace(new RegExp(MMM[0], "g"), MMM[M]);
1402
1441
  format = format.replace(/\\(.)/g, "$1");
1403
1442
  return format;
1404
1443
  }
@@ -1866,6 +1905,7 @@ class Formatters {
1866
1905
  setLabelFormatters() {
1867
1906
  const w = this.w;
1868
1907
  const fmt = w.formatters;
1908
+ const inferredNumericX = w.axisFlags.isXNumeric && w.axisFlags.dataFormatXNumeric && w.config.xaxis.type !== "datetime" && !w.config.xaxis.convertedCatToNumeric && !w.globals.isBarHorizontal;
1869
1909
  fmt.xaxisTooltipFormatter = (val) => {
1870
1910
  return this.defaultGeneralFormatter(val);
1871
1911
  };
@@ -1882,8 +1922,13 @@ class Formatters {
1882
1922
  fmt.xLabelFormatter = w.config.xaxis.labels.formatter;
1883
1923
  } else {
1884
1924
  fmt.xLabelFormatter = (val) => {
1925
+ var _a;
1885
1926
  if (Utils$1.isNumber(val)) {
1886
- if (!w.config.xaxis.convertedCatToNumeric && w.config.xaxis.type === "numeric") {
1927
+ if (!w.config.xaxis.convertedCatToNumeric && (w.config.xaxis.type === "numeric" || inferredNumericX)) {
1928
+ const ticks = (_a = w.globals.xAxisScale) == null ? void 0 : _a.result;
1929
+ if (inferredNumericX && Array.isArray(ticks) && ticks.every(Number.isInteger)) {
1930
+ return val.toFixed(0);
1931
+ }
1887
1932
  if (Utils$1.isNumber(w.config.xaxis.decimalsInFloat)) {
1888
1933
  return val.toFixed(w.config.xaxis.decimalsInFloat);
1889
1934
  } else {
@@ -1909,6 +1954,12 @@ class Formatters {
1909
1954
  }
1910
1955
  if (typeof w.config.tooltip.x.formatter === "function") {
1911
1956
  fmt.ttKeyFormatter = w.config.tooltip.x.formatter;
1957
+ } else if (w.config.xaxis.labels.formatter === void 0 && inferredNumericX) {
1958
+ const xLabelFormatter = (
1959
+ /** @type {(val: any) => any} */
1960
+ fmt.xLabelFormatter
1961
+ );
1962
+ fmt.ttKeyFormatter = (val) => Number.isInteger(val) ? val.toFixed(0) : xLabelFormatter(val);
1912
1963
  } else {
1913
1964
  fmt.ttKeyFormatter = fmt.xLabelFormatter;
1914
1965
  }
@@ -2767,6 +2818,17 @@ class Options {
2767
2818
  // around the pinch centroid (matching the x-only wheel/toolbar zoom),
2768
2819
  // frame-by-frame rather than the 400ms wheel throttle.
2769
2820
  pinch: "auto",
2821
+ // Drag-to-zoom is deliberate, so it is not gated the way those two
2822
+ // are: it stays on with the toolbar hidden. The reset button that
2823
+ // undoes it does not, which leaves the viewer in a window with no
2824
+ // exit. So while the chart IS zoomed and nothing else on screen can
2825
+ // reset it, one reset control is drawn where the toolbar would have
2826
+ // been, and it goes when the range does. A chart nobody zooms is
2827
+ // untouched. Set false for a page that supplies its own reset (which
2828
+ // also turns off the Escape shortcut), or true to force the control
2829
+ // on whenever the chart is zoomed, even where `toolbar.tools.reset`
2830
+ // is off.
2831
+ resetControl: "auto",
2770
2832
  zoomedArea: {
2771
2833
  fill: {
2772
2834
  color: "#90CAF9",
@@ -2833,6 +2895,11 @@ class Options {
2833
2895
  borderRadius: 0,
2834
2896
  borderRadiusApplication: "around",
2835
2897
  // [around, end]
2898
+ // Which segments of a stack round. 'all' caps both ends of the
2899
+ // stack (baseline and far end); 'last' caps only the far end, so
2900
+ // the stack sits square on the baseline. Stacked charts only.
2901
+ borderRadiusWhenStacked: "all",
2902
+ // [all, last]
2836
2903
  rangeBarOverlap: true,
2837
2904
  rangeBarGroupRows: false,
2838
2905
  hideZeroBarsWhenGrouped: false,
@@ -7621,16 +7688,11 @@ class Globals {
7621
7688
  * which cannot reach the captured copies because each series object was
7622
7689
  * copied at capture time.
7623
7690
  *
7624
- * The one in-place mutator is appendData(), whose push loop grows the shared
7625
- * data array. Re-capturing after it does not undo that: the pushed points
7626
- * are already in the array both snapshots point at, so a snapshot taken
7627
- * before the append reads back as appended. That is the documented
7628
- * behaviour of appendData(overwriteInitialSeries = true), and the `false`
7629
- * case is not honoured for a separate, older reason: Data.parseData()
7630
- * re-captures initialSeries unconditionally on the re-render appendData
7631
- * triggers. Detaching would mean copying the data arrays, which is exactly
7632
- * the per-point cost this snapshot exists to avoid. The same exception
7633
- * applies to `initialConfig.series`, which is captured with the same shape.
7691
+ * appendData() used to be the exception, growing the shared data array in
7692
+ * place. It now replaces the array instead (`data = data.concat(newData)`):
7693
+ * one array copy per call, against the per-point cost this snapshot exists
7694
+ * to avoid. With that, no internal edit can reach a captured copy. The same
7695
+ * holds for `initialConfig.series`, which is captured with the same shape.
7634
7696
  *
7635
7697
  * @param {Record<string, any>} globals
7636
7698
  */
@@ -8207,7 +8269,7 @@ class CoreUtils {
8207
8269
  includedIndexes.push(si);
8208
8270
  }
8209
8271
  });
8210
- const excludedIndices = w.seriesData.series.map((_, fi) => includedIndexes.indexOf(fi) === -1 ? fi : -1).filter((f) => f !== -1);
8272
+ const excludedIndices = w.seriesData.series.map((_2, fi) => includedIndexes.indexOf(fi) === -1 ? fi : -1).filter((f) => f !== -1);
8211
8273
  total.push(this.getStackedSeriesTotals(excludedIndices));
8212
8274
  });
8213
8275
  return total;
@@ -8612,7 +8674,7 @@ class CoreUtils {
8612
8674
  _gl.yLogRatio = yRatio.slice();
8613
8675
  _gl.logYRange = /** @type {any[]} */
8614
8676
  gl.yRange.map(
8615
- (_, i2) => {
8677
+ (_2, i2) => {
8616
8678
  const yAxisIndex = w.globals.seriesYAxisReverseMap[i2];
8617
8679
  if (w.config.yaxis[yAxisIndex] && this.w.config.yaxis[yAxisIndex].logarithmic) {
8618
8680
  const range = 1;
@@ -8978,11 +9040,11 @@ function findNextM(arr, offset) {
8978
9040
  return false;
8979
9041
  }
8980
9042
  function arcToBezier(pos, val) {
8981
- var rx = Math.abs(val[1]), ry = Math.abs(val[2]), xAxisRotation = val[3] % 360, largeArcFlag = val[4], sweepFlag = val[5], x = val[6], y = val[7], A2 = new Point(pos[0], pos[1]), B = new Point(x, y), primedCoord, lambda, mat, k, c, cSquare, t2, O2, OA, OB, tetaStart, tetaEnd, deltaTeta, nbSectors, f, arcSegPoints, angle, sinAngle, cosAngle, pt, i2, il, retVal = [], x1, y1, x2, y2;
8982
- if (rx === 0 || ry === 0 || A2.x === B.x && A2.y === B.y) {
8983
- return [["C", A2.x, A2.y, B.x, B.y, B.x, B.y]];
9043
+ var rx = Math.abs(val[1]), ry = Math.abs(val[2]), xAxisRotation = val[3] % 360, largeArcFlag = val[4], sweepFlag = val[5], x = val[6], y = val[7], A = new Point(pos[0], pos[1]), B = new Point(x, y), primedCoord, lambda, mat, k, c, cSquare, t2, O2, OA, OB, tetaStart, tetaEnd, deltaTeta, nbSectors, f, arcSegPoints, angle, sinAngle, cosAngle, pt, i2, il, retVal = [], x1, y1, x2, y2;
9044
+ if (rx === 0 || ry === 0 || A.x === B.x && A.y === B.y) {
9045
+ return [["C", A.x, A.y, B.x, B.y, B.x, B.y]];
8984
9046
  }
8985
- primedCoord = new Point((A2.x - B.x) / 2, (A2.y - B.y) / 2).transform(
9047
+ primedCoord = new Point((A.x - B.x) / 2, (A.y - B.y) / 2).transform(
8986
9048
  // Start with the identity matrix (no args → Matrix defaults a=d=1, others 0).
8987
9049
  // Passing all-zero args here would produce a degenerate zero matrix, since
8988
9050
  // `0 ?? 1` is `0`, not `1` — every subsequent transform then yields (0,0)
@@ -8998,9 +9060,9 @@ function arcToBezier(pos, val) {
8998
9060
  }
8999
9061
  mat = /** @type {any} */
9000
9062
  new Matrix().rotate(xAxisRotation).scale(1 / rx, 1 / ry).rotate(-xAxisRotation);
9001
- A2 = A2.transform(mat);
9063
+ A = A.transform(mat);
9002
9064
  B = B.transform(mat);
9003
- k = [B.x - A2.x, B.y - A2.y];
9065
+ k = [B.x - A.x, B.y - A.y];
9004
9066
  cSquare = k[0] * k[0] + k[1] * k[1];
9005
9067
  c = Math.sqrt(cSquare);
9006
9068
  k[0] /= c;
@@ -9009,8 +9071,8 @@ function arcToBezier(pos, val) {
9009
9071
  if (largeArcFlag === sweepFlag) {
9010
9072
  t2 *= -1;
9011
9073
  }
9012
- O2 = new Point((B.x + A2.x) / 2 + t2 * -k[1], (B.y + A2.y) / 2 + t2 * k[0]);
9013
- OA = new Point(A2.x - O2.x, A2.y - O2.y);
9074
+ O2 = new Point((B.x + A.x) / 2 + t2 * -k[1], (B.y + A.y) / 2 + t2 * k[0]);
9075
+ OA = new Point(A.x - O2.x, A.y - O2.y);
9014
9076
  OB = new Point(B.x - O2.x, B.y - O2.y);
9015
9077
  tetaStart = Math.acos(OA.x / Math.sqrt(OA.x * OA.x + OA.y * OA.y));
9016
9078
  if (OA.y < 0) tetaStart *= -1;
@@ -9641,7 +9703,7 @@ function prefersReducedMotion() {
9641
9703
  _reducedMotionMql = window.matchMedia("(prefers-reduced-motion: reduce)");
9642
9704
  }
9643
9705
  return !!_reducedMotionMql.matches;
9644
- } catch (_) {
9706
+ } catch (_2) {
9645
9707
  return false;
9646
9708
  }
9647
9709
  }
@@ -10004,7 +10066,7 @@ class Animations {
10004
10066
  if (typeof node.getTotalLength === "function") {
10005
10067
  len = node.getTotalLength();
10006
10068
  }
10007
- } catch (_) {
10069
+ } catch (_2) {
10008
10070
  len = 0;
10009
10071
  }
10010
10072
  if (!len) {
@@ -15527,7 +15589,17 @@ class Range {
15527
15589
  let ticks = 10;
15528
15590
  if (cnf.xaxis.tickAmount === void 0) {
15529
15591
  ticks = Math.round(gl.svgWidth / 150);
15530
- if (cnf.xaxis.type === "numeric" && gl.dataPoints < 30) {
15592
+ const inferredNumericX = this.w.axisFlags.isXNumeric && this.w.axisFlags.dataFormatXNumeric && cnf.xaxis.type !== "datetime" && !cnf.xaxis.convertedCatToNumeric && !gl.isBarHorizontal;
15593
+ const fontSize = parseFloat(cnf.xaxis.labels.style.fontSize) || 12;
15594
+ const widestLabelLength = this.w.labelData.labels.reduce(
15595
+ (widest, seriesLabels) => Array.isArray(seriesLabels) ? seriesLabels.reduce(
15596
+ (seriesWidest, label) => Math.max(seriesWidest, String(label).length),
15597
+ widest
15598
+ ) : widest,
15599
+ 0
15600
+ );
15601
+ const allPointLabelsFit = gl.dataPoints * widestLabelLength * fontSize * 0.6 <= gl.svgWidth;
15602
+ if ((cnf.xaxis.type === "numeric" || inferredNumericX && allPointLabelsFit) && gl.dataPoints < 30) {
15531
15603
  ticks = gl.dataPoints - 1;
15532
15604
  }
15533
15605
  if (ticks > gl.dataPoints && gl.dataPoints !== 0) {
@@ -15751,7 +15823,7 @@ class Range {
15751
15823
  });
15752
15824
  Object.entries(stackedPoss).forEach(([key]) => {
15753
15825
  stackedPoss[key].forEach(
15754
- (_, stgi) => {
15826
+ (_2, stgi) => {
15755
15827
  gl.maxY = Math.max(gl.maxY, stackedPoss[key][stgi]);
15756
15828
  gl.minY = Math.min(gl.minY, stackedNegs[key][stgi]);
15757
15829
  }
@@ -16222,42 +16294,30 @@ class YAxis {
16222
16294
  }
16223
16295
  setYAxisTextAlignments() {
16224
16296
  const w = this.w;
16225
- const yaxis = Array.from(
16226
- w.dom.baseEl.getElementsByClassName("apexcharts-yaxis")
16227
- );
16228
- yaxis.forEach((y, index) => {
16229
- const yaxe = w.config.yaxis[index];
16297
+ w.config.yaxis.forEach((yaxe, index) => {
16230
16298
  if (yaxe && !yaxe.floating && yaxe.labels.align !== void 0) {
16231
16299
  const yAxisInner = w.dom.baseEl.querySelector(
16232
16300
  `.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-texts-g`
16233
16301
  );
16302
+ if (!yAxisInner) return;
16234
16303
  const yAxisTexts = Array.from(
16235
16304
  w.dom.baseEl.querySelectorAll(
16236
16305
  `.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-label`
16237
16306
  )
16238
16307
  );
16239
- const rect = (
16240
- /** @type {Element} */
16241
- yAxisInner.getBoundingClientRect()
16242
- );
16308
+ const rect = yAxisInner.getBoundingClientRect();
16243
16309
  yAxisTexts.forEach((label) => {
16244
16310
  label.setAttribute("text-anchor", yaxe.labels.align);
16245
16311
  });
16246
16312
  if (yaxe.labels.align === "left" && !yaxe.opposite) {
16247
- yAxisInner.setAttribute(
16248
- "transform",
16249
- `translate(-${rect.width}, 0)`
16250
- );
16313
+ yAxisInner.setAttribute("transform", `translate(-${rect.width}, 0)`);
16251
16314
  } else if (yaxe.labels.align === "center") {
16252
16315
  yAxisInner.setAttribute(
16253
16316
  "transform",
16254
16317
  `translate(${rect.width / 2 * (!yaxe.opposite ? -1 : 1)}, 0)`
16255
16318
  );
16256
16319
  } else if (yaxe.labels.align === "right" && yaxe.opposite) {
16257
- yAxisInner.setAttribute(
16258
- "transform",
16259
- `translate(${rect.width}, 0)`
16260
- );
16320
+ yAxisInner.setAttribute("transform", `translate(${rect.width}, 0)`);
16261
16321
  }
16262
16322
  }
16263
16323
  });
@@ -17117,9 +17177,9 @@ function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false)
17117
17177
  if (!Array.isArray(oldY) || !Array.isArray(newY)) return null;
17118
17178
  if (!oldY.length || !newY.length) return null;
17119
17179
  const oldKeys = uniquifyKeys(
17120
- oldY.map((_, j2) => frameDatumKey(frame, realIndex, j2))
17180
+ oldY.map((_2, j2) => frameDatumKey(frame, realIndex, j2))
17121
17181
  );
17122
- const newKeys = uniquifyKeys(newY.map((_, j2) => datumKey(w, realIndex, j2)));
17182
+ const newKeys = uniquifyKeys(newY.map((_2, j2) => datumKey(w, realIndex, j2)));
17123
17183
  const join = joinKeys(oldKeys, newKeys);
17124
17184
  if (!join.ordered && !allowReorder) return null;
17125
17185
  if (!join.changed && !includeIdentity) return null;
@@ -17309,7 +17369,7 @@ function renderBarExitGhosts({
17309
17369
  origin = Math.abs(start.y - (bb.y + bb.height)) <= Math.abs(start.y - bb.y) ? "center bottom" : "center top";
17310
17370
  }
17311
17371
  }
17312
- } catch (_) {
17372
+ } catch (_2) {
17313
17373
  }
17314
17374
  const style = node.style;
17315
17375
  style.transformBox = "fill-box";
@@ -17426,7 +17486,7 @@ function captureAxisChrome(w) {
17426
17486
  xScale: currentXScale(w),
17427
17487
  yAnchors: currentYAnchors(w, yLabels)
17428
17488
  };
17429
- } catch (_) {
17489
+ } catch (_2) {
17430
17490
  gl.prevChromeFrame = null;
17431
17491
  }
17432
17492
  }
@@ -17618,7 +17678,7 @@ function applyAxisTransition(w) {
17618
17678
  if (!chrome || !gl.axisCharts || !Environment.isBrowser()) return;
17619
17679
  if (!lengthTransitionEnabled(w)) return;
17620
17680
  const anyMotion = (w.seriesData.series || []).some(
17621
- (_, i2) => seriesJoin(w, i2, true, true) !== null
17681
+ (_2, i2) => seriesJoin(w, i2, true, true) !== null
17622
17682
  );
17623
17683
  if (!anyMotion) return;
17624
17684
  const root = w.dom.baseEl;
@@ -17659,7 +17719,7 @@ function applyAxisTransition(w) {
17659
17719
  ease,
17660
17720
  project: projY
17661
17721
  });
17662
- } catch (_) {
17722
+ } catch (_2) {
17663
17723
  }
17664
17724
  }
17665
17725
  const DL_GROUP_SEL = ".apexcharts-data-labels[data\\:dlKey]";
@@ -17719,7 +17779,7 @@ function captureDataLabels(w) {
17719
17779
  });
17720
17780
  });
17721
17781
  gl.prevDataLabels = map.size ? map : null;
17722
- } catch (_) {
17782
+ } catch (_2) {
17723
17783
  gl.prevDataLabels = null;
17724
17784
  }
17725
17785
  }
@@ -17782,7 +17842,7 @@ function countUpText(w, { el, from, to, formatter, fmtOpts, duration, ease, dela
17782
17842
  if (typeof formatter === "function") {
17783
17843
  try {
17784
17844
  out = formatter(rounded, fmtOpts);
17785
- } catch (_) {
17845
+ } catch (_2) {
17786
17846
  out = rounded;
17787
17847
  }
17788
17848
  }
@@ -17896,7 +17956,7 @@ function applyDataLabelTransition(w) {
17896
17956
  });
17897
17957
  }
17898
17958
  });
17899
- } catch (_) {
17959
+ } catch (_2) {
17900
17960
  }
17901
17961
  }
17902
17962
  class Series {
@@ -21925,7 +21985,7 @@ class Data {
21925
21985
  const point = data[j2];
21926
21986
  const x = point[0];
21927
21987
  const y = point[1];
21928
- const z = point[2];
21988
+ const z2 = point[2];
21929
21989
  if (typeof y !== "undefined") {
21930
21990
  if (Array.isArray(y) && y.length === 4 && !isBoxPlot) {
21931
21991
  this.twoDSeries.push(Utils$1.parseNumber(y[3]));
@@ -21942,8 +22002,8 @@ class Data {
21942
22002
  } else {
21943
22003
  this.twoDSeriesX.push(x);
21944
22004
  }
21945
- if (typeof z !== "undefined") {
21946
- this.threeDSeries.push(z);
22005
+ if (typeof z2 !== "undefined") {
22006
+ this.threeDSeries.push(z2);
21947
22007
  this.w.axisFlags.isDataXYZ = true;
21948
22008
  }
21949
22009
  }
@@ -22825,7 +22885,7 @@ class Data {
22825
22885
  }
22826
22886
  const x = this.getNestedValue(item, effectiveParsing.x);
22827
22887
  let y;
22828
- let z = void 0;
22888
+ let z2 = void 0;
22829
22889
  if (Array.isArray(effectiveParsing.y)) {
22830
22890
  const yValues = effectiveParsing.y.map(
22831
22891
  (fieldName) => this.getNestedValue(item, fieldName)
@@ -22844,7 +22904,7 @@ class Data {
22844
22904
  y = this.getNestedValue(item, effectiveParsing.y);
22845
22905
  }
22846
22906
  if (effectiveParsing.z) {
22847
- z = this.getNestedValue(item, effectiveParsing.z);
22907
+ z2 = this.getNestedValue(item, effectiveParsing.z);
22848
22908
  }
22849
22909
  if (x === void 0) {
22850
22910
  console.warn(
@@ -22863,8 +22923,8 @@ class Data {
22863
22923
  result.z = zValue;
22864
22924
  }
22865
22925
  }
22866
- if (z !== void 0) {
22867
- result.z = z;
22926
+ if (z2 !== void 0) {
22927
+ result.z = z2;
22868
22928
  }
22869
22929
  return result;
22870
22930
  }
@@ -23136,8 +23196,11 @@ class Data {
23136
23196
  // Segregate user provided data into appropriate vars
23137
23197
  /**
23138
23198
  * @param {any[]} ser
23199
+ * @param {boolean} [overwriteInitialSeries=true] false when the caller hands
23200
+ * back the series the chart already has (an internal re-render), so the
23201
+ * baseline resetSeries() restores must not move.
23139
23202
  */
23140
- parseData(ser) {
23203
+ parseData(ser, overwriteInitialSeries = true) {
23141
23204
  var _a, _b, _c, _d, _e, _f, _g;
23142
23205
  const w = this.w;
23143
23206
  const cnf = w.config;
@@ -23170,7 +23233,8 @@ class Data {
23170
23233
  ser = ser.map((s2) => __spreadValues({}, s2));
23171
23234
  }
23172
23235
  cnf.series = ser;
23173
- if (gl.dataReducerRawSeries && ((_g = cnf.chart.dataReducer) == null ? void 0 : _g.enabled)) {
23236
+ if (!overwriteInitialSeries) ;
23237
+ else if (gl.dataReducerRawSeries && ((_g = cnf.chart.dataReducer) == null ? void 0 : _g.enabled)) {
23174
23238
  const stash = gl.dataReducerRawSeries;
23175
23239
  gl.initialSeries = ser.map((s2, i2) => {
23176
23240
  var _a2, _b2, _c2;
@@ -23610,7 +23674,9 @@ class UpdateHelpers {
23610
23674
  );
23611
23675
  initialConfig.series = !options2.series && prevInitialSeries ? prevInitialSeries : Utils$1.copySeriesShallow(w.config.series);
23612
23676
  w.globals.initialConfig = initialConfig;
23613
- w.globals.initialSeries = w.config.series;
23677
+ if (options2.series) {
23678
+ w.globals.initialSeries = w.config.series;
23679
+ }
23614
23680
  }
23615
23681
  if (options2.series && (w.globals.collapsedSeriesIndices.length > 0 || w.globals.ancillaryCollapsedSeriesIndices.length > 0)) {
23616
23682
  ch.series.reconcileCollapsedByName();
@@ -23659,14 +23725,20 @@ class UpdateHelpers {
23659
23725
  w.globals.streamgraphRawSeries = null;
23660
23726
  w.globals.treemapRawSeries = null;
23661
23727
  }
23728
+ const definedSeries = newSeries;
23729
+ let reconciledCollapses = false;
23662
23730
  if (w.globals.axisCharts && (w.globals.collapsedSeriesIndices.length > 0 || w.globals.ancillaryCollapsedSeriesIndices.length > 0)) {
23663
23731
  newSeries = newSeries.map(
23664
23732
  (s2) => s2 && typeof s2 === "object" ? __spreadValues({}, s2) : s2
23665
23733
  );
23666
23734
  this.ctx.series.reconcileCollapsedByName(newSeries);
23735
+ reconciledCollapses = true;
23667
23736
  }
23668
23737
  this.ctx.data.resetParsingFlags();
23669
- const parsedState = this.ctx.data.parseData(newSeries);
23738
+ const parsedState = this.ctx.data.parseData(
23739
+ newSeries,
23740
+ overwriteInitialSeries
23741
+ );
23670
23742
  this.ctx._writeParsedSeriesData(parsedState.seriesData);
23671
23743
  this.ctx._writeParsedRangeData(parsedState.rangeData);
23672
23744
  this.ctx._writeParsedCandleData(parsedState.candleData);
@@ -23675,10 +23747,12 @@ class UpdateHelpers {
23675
23747
  if (overwriteInitialSeries) {
23676
23748
  if (w.globals.initialConfig) {
23677
23749
  w.globals.initialConfig.series = Utils$1.copySeriesShallow(
23678
- w.config.series
23750
+ reconciledCollapses ? definedSeries : w.config.series
23679
23751
  );
23680
23752
  }
23681
- w.globals.initialSeries = w.config.series;
23753
+ if (reconciledCollapses) {
23754
+ w.globals.initialSeries = definedSeries;
23755
+ }
23682
23756
  }
23683
23757
  if (this._canUseFastPath(newSeries, prevSeriesCount, prevDataLengths, w)) {
23684
23758
  return this.ctx.fastUpdate(animate, prevAxisScaleSig).then(() => {
@@ -29319,14 +29393,14 @@ const l = class {
29319
29393
  const t2 = __spreadProps(__spreadValues({}, n2), { signatureVerified: true });
29320
29394
  return void (this.licenseKey === e2 ? this.publish(t2) : this.notify(t2));
29321
29395
  }
29322
- const h = "Invalid license key. The license signature does not verify.", d = { data: i2.data, expired: false, message: h, signatureVerified: true, valid: false };
29323
- this.licenseKey === e2 ? this.publish(d) : this.notify(d), t(`[Apex] ${h}`);
29396
+ const u = "Invalid license key. The license signature does not verify.", h = { data: i2.data, expired: false, message: u, signatureVerified: true, valid: false };
29397
+ this.licenseKey === e2 ? this.publish(h) : this.notify(h), t(`[Apex] ${u}`);
29324
29398
  });
29325
29399
  }
29326
29400
  };
29327
29401
  l.publicKeysSpki = ["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="], l.verdicts = /* @__PURE__ */ new Map(), l.verifying = /* @__PURE__ */ new Set(), l.warnedUnverifiable = false, l.epoch = 0;
29328
29402
  let o = l;
29329
- const A = class {
29403
+ const j = class {
29330
29404
  static applyStyles(e2) {
29331
29405
  Object.assign(e2.style, this.CRITICAL_STYLES, { backgroundImage: this.createWatermarkPattern(), backgroundRepeat: "repeat" });
29332
29406
  }
@@ -29384,34 +29458,34 @@ const A = class {
29384
29458
  })));
29385
29459
  }
29386
29460
  };
29387
- A.WATERMARK_ATTR = "data-apexcharts-watermark", A.WATERMARK_TEXT = "APEXCHARTS", A.ATTR = "data-apexcharts-watermark", A.CRITICAL_STYLES = { bottom: "0", display: "block", left: "0", msUserSelect: "none", opacity: "1", pointerEvents: "none", position: "absolute", right: "0", top: "0", userSelect: "none", visibility: "visible", webkitUserSelect: "none", zIndex: "10000" }, A.managed = /* @__PURE__ */ new Set(), A.subscribed = false;
29388
- let M = A;
29389
- const L = 0.05, T = 0.05, j = 1 / 45;
29390
- function E(e2, t2, s2, i2) {
29461
+ j.WATERMARK_ATTR = "data-apexcharts-watermark", j.WATERMARK_TEXT = "APEXCHARTS", j.ATTR = "data-apexcharts-watermark", j.CRITICAL_STYLES = { bottom: "0", display: "block", left: "0", msUserSelect: "none", opacity: "1", pointerEvents: "none", position: "absolute", right: "0", top: "0", userSelect: "none", visibility: "visible", webkitUserSelect: "none", zIndex: "10000" }, j.managed = /* @__PURE__ */ new Set(), j.subscribed = false;
29462
+ let C = j;
29463
+ const D = 0.05, K = 0.05, O = 1 / 45;
29464
+ function $(e2, t2, s2, i2) {
29391
29465
  const n2 = { value: e2, velocity: 0, target: e2, stiffness: t2, damping: s2 };
29392
29466
  return n2;
29393
29467
  }
29394
- function R(e2, t2) {
29395
- if (t2 <= 0) return O(e2);
29468
+ function q(e2, t2) {
29469
+ if (t2 <= 0) return W(e2);
29396
29470
  let s2 = t2;
29397
29471
  for (; s2 > 0; ) {
29398
- const t3 = Math.min(s2, j), i2 = -e2.stiffness * (e2.value - e2.target) - e2.damping * e2.velocity;
29472
+ const t3 = Math.min(s2, O), i2 = -e2.stiffness * (e2.value - e2.target) - e2.damping * e2.velocity;
29399
29473
  e2.velocity += i2 * t3, e2.value += e2.velocity * t3, s2 -= t3;
29400
29474
  }
29401
- return !!O(e2) && (e2.value = e2.target, e2.velocity = 0, true);
29475
+ return !!W(e2) && (e2.value = e2.target, e2.velocity = 0, true);
29402
29476
  }
29403
- function D(e2, t2) {
29477
+ function _(e2, t2) {
29404
29478
  e2.target = t2;
29405
29479
  }
29406
- function O(e2) {
29480
+ function W(e2) {
29407
29481
  var _a, _b;
29408
- const t2 = (_a = e2.restVelocity) != null ? _a : L, s2 = (_b = e2.restDisplacement) != null ? _b : T;
29482
+ const t2 = (_a = e2.restVelocity) != null ? _a : D, s2 = (_b = e2.restDisplacement) != null ? _b : K;
29409
29483
  return Math.abs(e2.velocity) < t2 && Math.abs(e2.value - e2.target) < s2;
29410
29484
  }
29411
- const $ = { crisp: [210, 26], gentle: [120, 20], snappy: [320, 30] };
29412
- function q(e2) {
29485
+ const V = { crisp: [210, 26], gentle: [120, 20], snappy: [320, 30] };
29486
+ function z(e2) {
29413
29487
  var _a;
29414
- return (_a = $[e2 != null ? e2 : "crisp"]) != null ? _a : $.crisp;
29488
+ return (_a = V[e2 != null ? e2 : "crisp"]) != null ? _a : V.crisp;
29415
29489
  }
29416
29490
  const PRICING_URL = "https://apexcharts.com/pricing";
29417
29491
  let _perspectivesTokenDecoded = false;
@@ -29465,15 +29539,15 @@ function licensedForPremium(key) {
29465
29539
  return typeof plan === "string" && PREMIUM_PLANS.has(plan.toLowerCase());
29466
29540
  }
29467
29541
  function reinstateWatermark(ctx, elWrap) {
29468
- const node = M.add(elWrap, { manage: false });
29542
+ const node = C.add(elWrap, { manage: false });
29469
29543
  if (!node || typeof MutationObserver === "undefined") return;
29470
29544
  if (ctx._wmNodeObserver && ctx._wmObservedNode === node) return;
29471
29545
  if (ctx._wmNodeObserver) ctx._wmNodeObserver.disconnect();
29472
29546
  const nodeObs = new MutationObserver(() => {
29473
- const n2 = M.node(elWrap);
29547
+ const n2 = C.node(elWrap);
29474
29548
  if (!n2) return;
29475
29549
  nodeObs.disconnect();
29476
- M.applyStyles(n2);
29550
+ C.applyStyles(n2);
29477
29551
  nodeObs.takeRecords();
29478
29552
  nodeObs.observe(n2, { attributes: true, attributeFilter: ["style"] });
29479
29553
  });
@@ -29485,7 +29559,7 @@ function addWatermark(ctx, elWrap) {
29485
29559
  reinstateWatermark(ctx, elWrap);
29486
29560
  if (typeof MutationObserver === "undefined" || ctx._wmWrapObserver) return;
29487
29561
  const wrapObs = new MutationObserver(() => {
29488
- if (!M.node(elWrap)) reinstateWatermark(ctx, elWrap);
29562
+ if (!C.node(elWrap)) reinstateWatermark(ctx, elWrap);
29489
29563
  });
29490
29564
  wrapObs.observe(elWrap, { childList: true });
29491
29565
  ctx._wmWrapObserver = wrapObs;
@@ -29501,7 +29575,7 @@ function teardownWatermark(ctx, elWrap) {
29501
29575
  }
29502
29576
  ctx._wmObservedNode = null;
29503
29577
  const wrap = elWrap || ctx.w && ctx.w.dom && ctx.w.dom.elWrap;
29504
- if (wrap) M.remove(wrap, { manage: false });
29578
+ if (wrap) C.remove(wrap, { manage: false });
29505
29579
  }
29506
29580
  function notifyTrial(ctx, key, features) {
29507
29581
  if (ctx._premiumLicenseNotified) return;
@@ -29878,8 +29952,9 @@ const _ApexCharts = class _ApexCharts {
29878
29952
  /**
29879
29953
  * @param {any[]} ser
29880
29954
  * @param {object} opts
29955
+ * @param {boolean} [overwriteInitialSeries=true]
29881
29956
  */
29882
- create(ser, opts) {
29957
+ create(ser, opts, overwriteInitialSeries = true) {
29883
29958
  var _a, _b, _c, _d, _e, _f;
29884
29959
  const w = this.w;
29885
29960
  if (!this.core) {
@@ -29926,7 +30001,7 @@ const _ApexCharts = class _ApexCharts {
29926
30001
  if (Environment.isBrowser()) {
29927
30002
  this.events.setupEventHandlers();
29928
30003
  }
29929
- const parsedState = this.data.parseData(series);
30004
+ const parsedState = this.data.parseData(series, overwriteInitialSeries);
29930
30005
  this._writeParsedSeriesData(parsedState.seriesData);
29931
30006
  this._writeParsedRangeData(parsedState.rangeData);
29932
30007
  this._writeParsedCandleData(parsedState.candleData);
@@ -29993,7 +30068,7 @@ const _ApexCharts = class _ApexCharts {
29993
30068
  const me = this;
29994
30069
  const w = me.w;
29995
30070
  return new Promise((resolve, reject) => {
29996
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
30071
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
29997
30072
  if (me.el === null) {
29998
30073
  return reject(
29999
30074
  new Error("Not enough data to display or target element not found")
@@ -30091,9 +30166,11 @@ const _ApexCharts = class _ApexCharts {
30091
30166
  }
30092
30167
  if (w.config.chart.toolbar.show && !w.globals.allSeriesCollapsed) {
30093
30168
  (_k = me.toolbar) == null ? void 0 : _k.createToolbar();
30169
+ } else if (!w.globals.allSeriesCollapsed && ((_l = me.toolbar) == null ? void 0 : _l.resetControlDue())) {
30170
+ me.toolbar.createToolbar({ resetOnly: true });
30094
30171
  }
30095
30172
  }
30096
- (_l = me.weave) == null ? void 0 : _l.dispatch("draw", {
30173
+ (_m = me.weave) == null ? void 0 : _m.dispatch("draw", {
30097
30174
  pass: "full",
30098
30175
  xyRatios: graphData == null ? void 0 : graphData.xyRatios
30099
30176
  });
@@ -30282,6 +30359,7 @@ const _ApexCharts = class _ApexCharts {
30282
30359
  * @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.
30283
30360
  */
30284
30361
  appendData(newData, overwriteInitialSeries = true) {
30362
+ var _a;
30285
30363
  const me = this;
30286
30364
  me.data.resetParsingFlags();
30287
30365
  me.w.globals.dataChanged = true;
@@ -30296,14 +30374,13 @@ const _ApexCharts = class _ApexCharts {
30296
30374
  newData[i2]
30297
30375
  );
30298
30376
  if (src && Array.isArray(src.data) && Array.isArray(derivedRaw[i2].data)) {
30299
- for (let j2 = 0; j2 < src.data.length; j2++) {
30300
- derivedRaw[i2].data.push(src.data[j2]);
30301
- }
30377
+ derivedRaw[i2].data = derivedRaw[i2].data.concat(src.data);
30302
30378
  }
30303
30379
  }
30304
- return this.update();
30380
+ return this.update(void 0, overwriteInitialSeries);
30305
30381
  }
30306
30382
  const newSeries = me.w.config.series.slice();
30383
+ const reducerRaw = me.w.globals.dataReducerRawSeries;
30307
30384
  for (let i2 = 0; i2 < newSeries.length; i2++) {
30308
30385
  if (newData[i2] !== null && typeof newData[i2] !== "undefined") {
30309
30386
  const srcSerie = (
@@ -30314,17 +30391,15 @@ const _ApexCharts = class _ApexCharts {
30314
30391
  /** @type {any} */
30315
30392
  newSeries[i2]
30316
30393
  );
30317
- for (let j2 = 0; j2 < srcSerie.data.length; j2++) {
30318
- dstSerie.data.push(srcSerie.data[j2]);
30394
+ dstSerie.data = dstSerie.data.concat(srcSerie.data);
30395
+ if (reducerRaw && Array.isArray((_a = reducerRaw[i2]) == null ? void 0 : _a.data)) {
30396
+ reducerRaw[i2].data = reducerRaw[i2].data.concat(srcSerie.data);
30319
30397
  }
30320
30398
  }
30321
30399
  }
30322
30400
  trimStreamingSeries(newSeries, me.w);
30323
30401
  me.w.config.series = newSeries;
30324
- if (overwriteInitialSeries) {
30325
- me.w.globals.initialSeries = me.w.config.series;
30326
- }
30327
- return this.update();
30402
+ return this.update(void 0, overwriteInitialSeries);
30328
30403
  }
30329
30404
  /**
30330
30405
  * True when an options object carries enough series data that a
@@ -30346,15 +30421,22 @@ const _ApexCharts = class _ApexCharts {
30346
30421
  }
30347
30422
  /**
30348
30423
  * @param {object} [options]
30424
+ * @param {boolean} [overwriteInitialSeries=false] true only when the caller
30425
+ * redefined the series before triggering this re-render, so the parse it
30426
+ * runs is the one that captures the new baseline.
30349
30427
  */
30350
- update(options2) {
30428
+ update(options2, overwriteInitialSeries = false) {
30351
30429
  return new Promise((resolve, reject) => {
30352
30430
  if (options2 && this.lastUpdateOptions && !_ApexCharts._optionsTooBigToCompare(options2) && Utils$1.stringifyForCompare(this.lastUpdateOptions) === Utils$1.stringifyForCompare(options2)) {
30353
30431
  return resolve(this);
30354
30432
  }
30355
30433
  this.lastUpdateOptions = options2 && !_ApexCharts._optionsTooBigToCompare(options2) ? Utils$1.clone(options2) : null;
30356
30434
  new Destroy(this.ctx).clear({ isUpdating: true });
30357
- const graphData = this.create(this.w.config.series, options2 != null ? options2 : {});
30435
+ const graphData = this.create(
30436
+ this.w.config.series,
30437
+ options2 != null ? options2 : {},
30438
+ overwriteInitialSeries
30439
+ );
30358
30440
  if (!graphData) return resolve(this);
30359
30441
  this.mount(graphData).then(() => {
30360
30442
  var _a;
@@ -32664,8 +32746,7 @@ class Exports {
32664
32746
  }
32665
32747
  };
32666
32748
  const handleUnequalXValues = () => {
32667
- const categories = /* @__PURE__ */ new Set();
32668
- const data = {};
32749
+ const byCategory = /* @__PURE__ */ new Map();
32669
32750
  series.forEach((s2, sI) => {
32670
32751
  s2 == null ? void 0 : s2.data.forEach((dataItem) => {
32671
32752
  let cat, value;
@@ -32678,23 +32759,22 @@ class Exports {
32678
32759
  } else {
32679
32760
  return;
32680
32761
  }
32681
- if (!/** @type {Record<string,any>} */
32682
- data[cat]) {
32683
- data[cat] = Array(
32684
- series.length
32685
- ).fill("");
32762
+ const key = String(cat);
32763
+ let row = byCategory.get(key);
32764
+ if (!row) {
32765
+ row = { cat, values: Array(series.length).fill("") };
32766
+ byCategory.set(key, row);
32686
32767
  }
32687
- data[cat][sI] = getFormattedValue(value);
32688
- categories.add(cat);
32768
+ row.values[sI] = getFormattedValue(value);
32689
32769
  });
32690
32770
  });
32691
32771
  if (columns.length) {
32692
32772
  rows.push(columns.join(columnDelimiter));
32693
32773
  }
32694
- Array.from(categories).sort().forEach((cat) => {
32695
- const values = (
32696
- /** @type {Record<string,any>} */
32697
- data[cat]
32774
+ Array.from(byCategory.keys()).sort().forEach((key) => {
32775
+ const { cat, values } = (
32776
+ /** @type {{cat: any, values: string[]}} */
32777
+ byCategory.get(key)
32698
32778
  );
32699
32779
  rows.push([getFormattedCategory(cat), ...values].join(columnDelimiter));
32700
32780
  });
@@ -33710,7 +33790,7 @@ class HeatmapGradientLegend {
33710
33790
  "dataPointMouseLeave",
33711
33791
  this._onCellLeave
33712
33792
  );
33713
- } catch (_) {
33793
+ } catch (_2) {
33714
33794
  }
33715
33795
  }
33716
33796
  /** Wire mousemove/mouseout on each per-band hit-region (ranges mode). */
@@ -34129,7 +34209,7 @@ class Legend {
34129
34209
  const isLegendInversed = w.config.legend.inverseOrder;
34130
34210
  const legendGroups = [];
34131
34211
  if (w.labelData.seriesGroups.length > 1 && w.config.legend.clusterGroupedSeries) {
34132
- w.labelData.seriesGroups.forEach((_, gi) => {
34212
+ w.labelData.seriesGroups.forEach((_2, gi) => {
34133
34213
  legendGroups[gi] = BrowserAPIs.createElement("div");
34134
34214
  legendGroups[gi].classList.add(
34135
34215
  "apexcharts-legend-group",
@@ -34454,10 +34534,49 @@ class Toolbar {
34454
34534
  this.elMenu = null;
34455
34535
  this.elMenuItems = [];
34456
34536
  this.t = null;
34537
+ this._drawnForZoom = null;
34457
34538
  }
34458
- createToolbar() {
34459
- var _a, _b;
34539
+ /**
34540
+ * Whether this chart's built-in ways back out of a zoom are switched on.
34541
+ *
34542
+ * The gate `chart.zoom.resetControl` opens, and the one the Escape shortcut
34543
+ * reads too, so a page that says it supplies its own reset gets neither.
34544
+ * 'auto' means "supply one when nothing else on screen can": a toolbar
34545
+ * showing its reset tool is a way back, and anything else is not.
34546
+ *
34547
+ * @returns {boolean}
34548
+ */
34549
+ resetControlAllowed() {
34550
+ const c = this.w.config.chart;
34551
+ if (!c.zoom || !c.zoom.enabled) return false;
34552
+ const setting = c.zoom.resetControl === void 0 ? "auto" : c.zoom.resetControl;
34553
+ if (setting !== "auto") return !!setting;
34554
+ const onScreen = c.toolbar && c.toolbar.show && c.toolbar.tools && c.toolbar.tools.reset;
34555
+ return !onScreen;
34556
+ }
34557
+ /**
34558
+ * Whether a reset control has to be drawn for the state the chart is in now.
34559
+ *
34560
+ * Only while the chart is actually zoomed, which is the whole idea: the
34561
+ * control appears at the moment the viewer changed the view, where they are
34562
+ * already looking, and goes again when the range does. A page that never
34563
+ * zooms never sees it, so `toolbar: { show: false }` still means an empty
34564
+ * chart for everyone who does not zoom.
34565
+ *
34566
+ * @returns {boolean}
34567
+ */
34568
+ resetControlDue() {
34569
+ return !!this.w.interact.zoomed && this.resetControlAllowed();
34570
+ }
34571
+ /**
34572
+ * @param {{ resetOnly?: boolean }} [opts] `resetOnly` draws the on-demand
34573
+ * reset control and nothing else, for a chart whose page asked for no
34574
+ * toolbar at all. See {@link Toolbar#resetControlDue}.
34575
+ */
34576
+ createToolbar(opts = {}) {
34577
+ var _a, _b, _c;
34460
34578
  const w = this.w;
34579
+ const resetOnly = !!opts.resetOnly;
34461
34580
  const createDiv = () => {
34462
34581
  return BrowserAPIs.createElementNS("http://www.w3.org/1999/xhtml", "div");
34463
34582
  };
@@ -34485,6 +34604,24 @@ class Toolbar {
34485
34604
  this.elMenu = createDiv();
34486
34605
  this.elCustomIcons = [];
34487
34606
  this.t = w.config.chart.toolbar.tools;
34607
+ this._drawnForZoom = null;
34608
+ if (resetOnly) {
34609
+ this.t = {
34610
+ zoom: false,
34611
+ zoomin: false,
34612
+ zoomout: false,
34613
+ selection: false,
34614
+ pan: false,
34615
+ measure: false,
34616
+ download: false,
34617
+ customIcons: [],
34618
+ reset: true
34619
+ };
34620
+ this._drawnForZoom = "wrap";
34621
+ } else if (!this.t.reset && this.resetControlDue()) {
34622
+ this.t = __spreadProps(__spreadValues({}, this.t), { reset: true });
34623
+ this._drawnForZoom = "control";
34624
+ }
34488
34625
  if (Array.isArray(this.t.customIcons)) {
34489
34626
  for (let i2 = 0; i2 < this.t.customIcons.length; i2++) {
34490
34627
  this.elCustomIcons.push(createBtn());
@@ -34507,16 +34644,16 @@ class Toolbar {
34507
34644
  };
34508
34645
  appendZoomControl("zoomIn", this.elZoomIn, icoZoomIn);
34509
34646
  appendZoomControl("zoomOut", this.elZoomOut, icoZoomOut);
34510
- const zoomSelectionCtrls = (z) => {
34511
- if (this.t[z] && w.config.chart[z].enabled) {
34647
+ const zoomSelectionCtrls = (z2) => {
34648
+ if (this.t[z2] && w.config.chart[z2].enabled) {
34512
34649
  toolbarControls.push({
34513
- el: z === "zoom" ? this.elZoom : this.elSelection,
34514
- icon: typeof this.t[z] === "string" ? this.t[z] : z === "zoom" ? icoZoom : icoSelect,
34650
+ el: z2 === "zoom" ? this.elZoom : this.elSelection,
34651
+ icon: typeof this.t[z2] === "string" ? this.t[z2] : z2 === "zoom" ? icoZoom : icoSelect,
34515
34652
  title: (
34516
34653
  /** @type {any} */
34517
- this.localeValues[z === "zoom" ? "selectionZoom" : "selection"]
34654
+ this.localeValues[z2 === "zoom" ? "selectionZoom" : "selection"]
34518
34655
  ),
34519
- class: `apexcharts-${z}-icon`
34656
+ class: `apexcharts-${z2}-icon`
34520
34657
  });
34521
34658
  }
34522
34659
  };
@@ -34595,7 +34732,14 @@ class Toolbar {
34595
34732
  this.elMenuIcon.setAttribute("aria-haspopup", "true");
34596
34733
  this.elMenuIcon.setAttribute("aria-expanded", "false");
34597
34734
  }
34598
- this._createHamburgerMenu(elToolbarWrap);
34735
+ if (!resetOnly) this._createHamburgerMenu(elToolbarWrap);
34736
+ if (resetOnly) {
34737
+ (_a = this.elZoomReset) == null ? void 0 : _a.addEventListener(
34738
+ "click",
34739
+ this.handleZoomReset.bind(this)
34740
+ );
34741
+ return;
34742
+ }
34599
34743
  if (w.interact.zoomEnabled) {
34600
34744
  this.elZoom.classList.add(this.selectedClass);
34601
34745
  } else if (w.interact.panEnabled) {
@@ -34604,7 +34748,7 @@ class Toolbar {
34604
34748
  this.elSelection.classList.add(this.selectedClass);
34605
34749
  } else if (w.interact.measureEnabled && this.elMeasure) {
34606
34750
  this.elMeasure.classList.add(this.selectedClass);
34607
- (_b = (_a = this.ctx.measure) == null ? void 0 : _a.startMeasure) == null ? void 0 : _b.call(_a);
34751
+ (_c = (_b = this.ctx.measure) == null ? void 0 : _b.startMeasure) == null ? void 0 : _c.call(_b);
34608
34752
  }
34609
34753
  this.addToolbarEventListeners();
34610
34754
  }
@@ -35010,9 +35154,28 @@ class Toolbar {
35010
35154
  break;
35011
35155
  }
35012
35156
  }
35157
+ /**
35158
+ * Take down whatever the zoom alone put on screen.
35159
+ *
35160
+ * By hand, and not left to the next render, because of the order in
35161
+ * {@link Toolbar#handleZoomReset}: the re-render happens while
35162
+ * `interact.zoomed` is still true, so the control is drawn once more and then
35163
+ * the flag clears with no further pass to notice. Reversing that order would
35164
+ * change what every listener downstream of the update sees, which is a much
35165
+ * larger promise than this control is worth.
35166
+ */
35167
+ clearZoomAffordance() {
35168
+ const drawn = this._drawnForZoom;
35169
+ this._drawnForZoom = null;
35170
+ if (!drawn || !this.elZoomReset) return;
35171
+ const parent = this.elZoomReset.parentNode;
35172
+ const gone = drawn === "wrap" ? parent : this.elZoomReset;
35173
+ if (gone && gone.parentNode) gone.parentNode.removeChild(gone);
35174
+ }
35013
35175
  handleZoomReset() {
35014
35176
  const charts = this.ctx.getSyncedCharts();
35015
35177
  charts.forEach((ch) => {
35178
+ var _a;
35016
35179
  const w = ch.w;
35017
35180
  if (!w.interact.zoomed) return;
35018
35181
  w.globals.lastXAxis.min = w.globals.initialConfig.xaxis.min;
@@ -35038,6 +35201,7 @@ class Toolbar {
35038
35201
  w.config.chart.animations.dynamicAnimation.enabled
35039
35202
  );
35040
35203
  w.interact.zoomed = false;
35204
+ (_a = ch.ctx.toolbar) == null ? void 0 : _a.clearZoomAffordance();
35041
35205
  });
35042
35206
  }
35043
35207
  destroy() {
@@ -35137,6 +35301,10 @@ class ZoomPanSelection extends Toolbar {
35137
35301
  passive: false
35138
35302
  });
35139
35303
  }
35304
+ this.hoverArea.addEventListener("keydown", me.escapeResetEvent.bind(me), {
35305
+ capture: false,
35306
+ passive: true
35307
+ });
35140
35308
  if (this._momentumEnabled()) {
35141
35309
  ["touchstart", "touchmove", "touchend", "touchcancel"].forEach(
35142
35310
  (event) => {
@@ -35269,12 +35437,16 @@ class ZoomPanSelection extends Toolbar {
35269
35437
  /**
35270
35438
  * A wheel or pinch zoom is an incidental gesture: the viewer can land in a
35271
35439
  * zoomed window without meaning to (a page scroll over the chart, a two-finger
35272
- * swipe), so it is only offered when there is a way back out of it. The only
35273
- * built-in way back is the toolbar's reset button, hence 'auto' (the default
35274
- * for both allowMouseWheelZoom and pinch) resolves against that button being
35275
- * present. A page that builds its own reset control sets the option to true
35276
- * and gets the gesture with no toolbar. Drag-to-zoom is deliberate, so it is
35277
- * not gated this way.
35440
+ * swipe), so it is only offered when there is a way back out of it. 'auto'
35441
+ * (the default for both allowMouseWheelZoom and pinch) resolves against a
35442
+ * reset button that is already on screen. A page that builds its own reset
35443
+ * control sets the option to true and gets the gesture with no toolbar.
35444
+ * Drag-to-zoom is deliberate, so it is not gated this way.
35445
+ *
35446
+ * `chart.zoom.resetControl` supplies a reset of its own once a chart IS
35447
+ * zoomed, and deliberately does NOT open this gate. It arrives after the
35448
+ * fact, and what an incidental wheel zoom takes from the viewer first is the
35449
+ * page scroll it swallowed, which no button hands back.
35278
35450
  *
35279
35451
  * @param {boolean|'auto'} setting
35280
35452
  */
@@ -35289,6 +35461,58 @@ class ZoomPanSelection extends Toolbar {
35289
35461
  const { zoom } = this.w.config.chart;
35290
35462
  return this._incidentalZoomEnabled(zoom && zoom.allowMouseWheelZoom);
35291
35463
  }
35464
+ /**
35465
+ * Put keyboard focus on the chart, where the chart is focusable at all.
35466
+ *
35467
+ * A drag is swallowed by the zoom handlers before the browser can move focus,
35468
+ * so a viewer who has just zoomed by hand leaves nothing focused, and every
35469
+ * key the chart offers is out of reach: Escape to reset (see
35470
+ * {@link ZoomPanSelection#escapeResetEvent}) and the +, - and 0 the keyboard
35471
+ * module already binds. Focusing what they just acted on puts those in reach.
35472
+ *
35473
+ * Pointer-driven focus, which keyboard navigation expects and does not read
35474
+ * as a request to start navigating, and which the stylesheet draws no ring
35475
+ * around (`svg:focus:not(:focus-visible)`).
35476
+ *
35477
+ * Only where the accessibility module has made the SVG focusable, which is
35478
+ * the default: a page that turned keyboard support off is not handed a tab
35479
+ * stop it never asked for, and still has the reset control as its way back.
35480
+ */
35481
+ _focusForKeyboard() {
35482
+ var _a, _b;
35483
+ const node = this.w.dom.Paper && this.w.dom.Paper.node;
35484
+ if (!node || typeof node.focus !== "function") return;
35485
+ if (node.getAttribute("tabindex") === null) return;
35486
+ (_b = (_a = this.ctx.keyboardNavigation) == null ? void 0 : _a.notePointerFocus) == null ? void 0 : _b.call(_a);
35487
+ try {
35488
+ node.focus({ preventScroll: true });
35489
+ } catch (e2) {
35490
+ node.focus();
35491
+ }
35492
+ }
35493
+ /**
35494
+ * Escape, on a zoomed chart, puts the range back.
35495
+ *
35496
+ * The quiet half of the same answer the on-demand reset control gives, and
35497
+ * gated on it, so a page that says it supplies its own way back gets neither.
35498
+ *
35499
+ * It defers to keyboard navigation, whose Escape dismisses the tooltip and
35500
+ * which offers `0` for this, so the key means one thing at a time. It does
35501
+ * not stop the event either, so a page listening for Escape still hears it.
35502
+ *
35503
+ * Reachable because a completed drag-zoom puts focus on the chart; see
35504
+ * {@link ZoomPanSelection#_focusForKeyboard}.
35505
+ *
35506
+ * @param {any} e
35507
+ */
35508
+ escapeResetEvent(e2) {
35509
+ if (e2.key !== "Escape" && e2.key !== "Esc") return;
35510
+ if (!this.w.interact.zoomed) return;
35511
+ const nav = this.ctx.keyboardNavigation;
35512
+ if (nav && nav.active) return;
35513
+ if (!this.resetControlAllowed()) return;
35514
+ this.handleZoomReset();
35515
+ }
35292
35516
  /** Lazily-created, re-render-surviving wheel-gesture state. */
35293
35517
  _wheel() {
35294
35518
  const it = this.w.interact;
@@ -35771,11 +35995,16 @@ class ZoomPanSelection extends Toolbar {
35771
35995
  if (!w.config.chart.group) {
35772
35996
  options2.yaxis = yaxis;
35773
35997
  }
35774
- me.ctx.updateHelpers._updateOptions(
35998
+ const applied = me.ctx.updateHelpers._updateOptions(
35775
35999
  options2,
35776
36000
  false,
35777
36001
  me.w.config.chart.animations.dynamicAnimation.enabled
35778
36002
  );
36003
+ if (applied && typeof applied.then === "function") {
36004
+ applied.then(() => me._focusForKeyboard());
36005
+ } else {
36006
+ me._focusForKeyboard();
36007
+ }
35779
36008
  if (typeof w.config.chart.events.zoomed === "function") {
35780
36009
  toolbar.zoomCallback(xaxis, yaxis);
35781
36010
  }
@@ -37528,6 +37757,19 @@ class KeyboardNavigation {
37528
37757
  _onPointerDown() {
37529
37758
  this._lastPointerDownAt = Date.now();
37530
37759
  }
37760
+ /**
37761
+ * Note that a pointer gesture is about to move focus into the chart.
37762
+ *
37763
+ * The 100 ms window above catches the browser's own click-to-focus, which
37764
+ * lands immediately. A drag-zoom moves focus deliberately, and only once its
37765
+ * re-render is done (ZoomPanSelection#_focusForKeyboard), which is far
37766
+ * outside that window. Without this it reads as a viewer asking to navigate
37767
+ * by keyboard, which activates nav and flashes a tooltip at the first visible
37768
+ * point after every zoom.
37769
+ */
37770
+ notePointerFocus() {
37771
+ this._lastPointerDownAt = Date.now();
37772
+ }
37531
37773
  /**
37532
37774
  * Called from Events.js keydown handler. Navigation keys are already handled
37533
37775
  * by the direct SVG listener (which can call preventDefault). This entry
@@ -41072,7 +41314,7 @@ class Drilldown {
41072
41314
  }
41073
41315
  }
41074
41316
  ApexCharts.registerFeatures({ drilldown: Drilldown });
41075
- const WEAVE_API_VERSION = 3;
41317
+ const WEAVE_API_VERSION = 5;
41076
41318
  const PLUGIN_CHART_METHODS = [
41077
41319
  "updateOptions",
41078
41320
  "updateSeries",
@@ -41303,6 +41545,19 @@ function buildPluginAPI(host, record) {
41303
41545
  enabledOnSeries: Array.isArray(
41304
41546
  w.config.dataLabels && w.config.dataLabels.enabledOnSeries
41305
41547
  ) ? w.config.dataLabels.enabledOnSeries.slice() : null
41548
+ }),
41549
+ // The caller's own dashing, reported for the same reason and against
41550
+ // the same trap (v5). `stroke.dashArray` is indexed by series position
41551
+ // with no per-series escape hatch, so a plugin that wants ITS OWN
41552
+ // computed series dashed has to write the whole array, and writing one
41553
+ // without knowing what was there discards the caller's dashed lines
41554
+ // with nothing to restore them from.
41555
+ //
41556
+ // A scalar applies to every series and an array is per series. There is
41557
+ // no "unset" to report: the option defaults to 0, and 0 already means
41558
+ // no dashing, so restoring it restores exactly what was there.
41559
+ stroke: Object.freeze({
41560
+ dashArray: Array.isArray(w.config.stroke && w.config.stroke.dashArray) ? w.config.stroke.dashArray.slice() : w.config.stroke && w.config.stroke.dashArray || 0
41306
41561
  })
41307
41562
  });
41308
41563
  },
@@ -41370,6 +41625,36 @@ function buildPluginAPI(host, record) {
41370
41625
  host._reserve(record.def.name, box);
41371
41626
  return api;
41372
41627
  },
41628
+ /**
41629
+ * Subscribe to the data point a viewer is pointing at.
41630
+ *
41631
+ * The chart already knows this: it resolves the series and point under the
41632
+ * pointer for its own tooltip and fires `dataPointMouseEnter`,
41633
+ * `dataPointMouseLeave` and `dataPointSelection` for the caller. This
41634
+ * forwards the same three, so a plugin gets the host's answer rather than
41635
+ * hit-testing the SVG itself and disagreeing with the tooltip.
41636
+ *
41637
+ * The payload is normalised rather than the chart's own argument list,
41638
+ * which passes `w`. A plugin must not receive `w`, and the three things a
41639
+ * plugin actually wants (which series, which point, what the point is
41640
+ * called) are exactly what the chart has already resolved.
41641
+ *
41642
+ * `category` is the resolved display label, the same string `api.categories`
41643
+ * carries, because a plugin coordinating two charts keys on the label
41644
+ * rather than on an index that means something different on each chart.
41645
+ *
41646
+ * Nothing here gives a plugin the ability to intercept or cancel: the
41647
+ * chart's own tooltip, selection state and caller events are unaffected,
41648
+ * and a handler that throws is contained rather than allowed to break the
41649
+ * interaction it was watching.
41650
+ *
41651
+ * @param {(e: {type: 'enter'|'leave'|'select', seriesIndex: number, dataPointIndex: number, category: string|undefined, seriesName: string|undefined, selected: boolean|undefined}) => void} fn
41652
+ * @returns {() => void} unsubscribe
41653
+ * @since Weave v4
41654
+ */
41655
+ pointer(fn) {
41656
+ return host._onPointer(record.def.name, fn);
41657
+ },
41373
41658
  // ── custom events out to the host app ──
41374
41659
  /**
41375
41660
  * Fires as `plugin:<pluginName>:<name>` on the chart's event bus. The
@@ -41407,6 +41692,8 @@ const _WeaveHost = class _WeaveHost {
41407
41692
  this._derived = null;
41408
41693
  this._reserved = null;
41409
41694
  this._reserveTimer = null;
41695
+ this._pointerSubs = null;
41696
+ this._pointerWired = null;
41410
41697
  this._onUpdated = this._onUpdated.bind(this);
41411
41698
  this._init();
41412
41699
  }
@@ -41534,7 +41821,7 @@ const _WeaveHost = class _WeaveHost {
41534
41821
  _setScales(xyRatios) {
41535
41822
  const w = this.w;
41536
41823
  const gl = w.globals;
41537
- const L2 = w.layout;
41824
+ const L = w.layout;
41538
41825
  if (!xyRatios || !gl.axisCharts) {
41539
41826
  this._currentScales = null;
41540
41827
  return;
@@ -41545,7 +41832,7 @@ const _WeaveHost = class _WeaveHost {
41545
41832
  const maxY = (axis) => gl.maxYArr[axis] != null ? gl.maxYArr[axis] : gl.maxY;
41546
41833
  const minY = (axis) => gl.minYArr[axis] != null ? gl.minYArr[axis] : gl.minY;
41547
41834
  const banded = !w.axisFlags.isXNumeric && !gl.isBarHorizontal && gl.dataPoints > 0;
41548
- const band = banded ? L2.gridWidth / gl.dataPoints : 0;
41835
+ const band = banded ? L.gridWidth / gl.dataPoints : 0;
41549
41836
  this._currentScales = {
41550
41837
  x: banded ? (v) => band * (v + 0.5) : (v) => (v - gl.minX) / xRatio,
41551
41838
  /**
@@ -41556,8 +41843,8 @@ const _WeaveHost = class _WeaveHost {
41556
41843
  domainX: banded ? [-0.5, gl.dataPoints - 0.5] : [gl.minX, gl.maxX],
41557
41844
  /** @param {number} [axis] */
41558
41845
  domainY: (axis = 0) => [minY(axis), maxY(axis)],
41559
- gridWidth: L2.gridWidth,
41560
- gridHeight: L2.gridHeight,
41846
+ gridWidth: L.gridWidth,
41847
+ gridHeight: L.gridHeight,
41561
41848
  ratios: xyRatios
41562
41849
  };
41563
41850
  }
@@ -41649,6 +41936,132 @@ const _WeaveHost = class _WeaveHost {
41649
41936
  }
41650
41937
  this._repairInitialSeries();
41651
41938
  }
41939
+ /**
41940
+ * Subscribe a plugin to the data point the viewer is pointing at.
41941
+ *
41942
+ * Wired lazily: a chart whose plugins never ask pays nothing, and the chart
41943
+ * fires these three events whether or not anyone is listening, so there is no
41944
+ * cost to the chart either way.
41945
+ *
41946
+ * The chart's own handler signature is `(e, ctx, {seriesIndex,
41947
+ * dataPointIndex, w})`. `w` stops here: what reaches a plugin is the
41948
+ * normalised payload documented on `api.pointer`.
41949
+ *
41950
+ * @param {string} pluginName
41951
+ * @param {Function} fn
41952
+ * @returns {() => void} unsubscribe
41953
+ */
41954
+ _onPointer(pluginName, fn) {
41955
+ if (typeof fn !== "function") return () => {
41956
+ };
41957
+ if (!this._pointerSubs) this._pointerSubs = /* @__PURE__ */ new Map();
41958
+ const list = this._pointerSubs.get(pluginName) || [];
41959
+ list.push(fn);
41960
+ this._pointerSubs.set(pluginName, list);
41961
+ this._wirePointer();
41962
+ return () => {
41963
+ const current = this._pointerSubs && this._pointerSubs.get(pluginName);
41964
+ if (!current) return;
41965
+ const i2 = current.indexOf(fn);
41966
+ if (i2 > -1) current.splice(i2, 1);
41967
+ };
41968
+ }
41969
+ /** Attach to the chart's own data point events, once. */
41970
+ _wirePointer() {
41971
+ if (this._pointerWired) return;
41972
+ if (!this.ctx || typeof this.ctx.addEventListener !== "function") return;
41973
+ const map = [
41974
+ ["enter", "dataPointMouseEnter"],
41975
+ ["leave", "dataPointMouseLeave"],
41976
+ ["select", "dataPointSelection"]
41977
+ ];
41978
+ this._pointerWired = [];
41979
+ for (const [type, name2] of map) {
41980
+ const handler = (_e, _ctx, opts) => {
41981
+ this._emitPointer(type, opts);
41982
+ };
41983
+ this.ctx.addEventListener(name2, handler);
41984
+ this._pointerWired.push([name2, handler]);
41985
+ }
41986
+ }
41987
+ /**
41988
+ * Hand one pointer event to every subscribed plugin.
41989
+ *
41990
+ * A handler that throws is contained per plugin, on the same terms as every
41991
+ * other plugin callback here: this runs inside the viewer's own hover, and a
41992
+ * plugin breaking the chart's interaction would be the worst failure mode
41993
+ * this facade has.
41994
+ *
41995
+ * @param {'enter'|'leave'|'select'} type
41996
+ * @param {any} opts
41997
+ */
41998
+ _emitPointer(type, opts) {
41999
+ if (!this._pointerSubs || !this._pointerSubs.size) return;
42000
+ const seriesIndex = opts && typeof opts.seriesIndex === "number" ? opts.seriesIndex : -1;
42001
+ const dataPointIndex = opts && typeof opts.dataPointIndex === "number" ? opts.dataPointIndex : -1;
42002
+ const labels = this._categories() || [];
42003
+ const w = this.w;
42004
+ const config = w && w.config && w.config.series || [];
42005
+ const payload = {
42006
+ type,
42007
+ seriesIndex,
42008
+ dataPointIndex,
42009
+ category: dataPointIndex > -1 ? labels[dataPointIndex] : void 0,
42010
+ // A pie/donut carries bare numbers in `series`, so there is no name to
42011
+ // read: undefined rather than a guess, on the same terms as `category`.
42012
+ seriesName: _WeaveHost._seriesName(config, seriesIndex),
42013
+ // Only meaningful on a select: the chart hands back its whole selection
42014
+ // set, and what a plugin wants to know is whether THIS point is now in
42015
+ // it, so a second click reads as a deselect rather than another select.
42016
+ selected: type === "select" ? _WeaveHost._isSelected(opts, seriesIndex, dataPointIndex) : void 0
42017
+ };
42018
+ for (const [name2, handlers] of this._pointerSubs) {
42019
+ for (const fn of handlers.slice()) {
42020
+ try {
42021
+ fn(payload);
42022
+ } catch (e2) {
42023
+ console.warn(
42024
+ '[apexcharts] plugin "' + name2 + '" threw in a pointer handler',
42025
+ e2
42026
+ );
42027
+ }
42028
+ }
42029
+ }
42030
+ }
42031
+ /**
42032
+ * The configured name of series `i`, where there is one.
42033
+ *
42034
+ * @param {any[]} config
42035
+ * @param {number} i
42036
+ * @returns {string|undefined}
42037
+ */
42038
+ static _seriesName(config, i2) {
42039
+ if (i2 < 0) return void 0;
42040
+ const entry = config[i2];
42041
+ if (!entry || typeof entry !== "object") return void 0;
42042
+ return typeof entry.name === "string" ? entry.name : void 0;
42043
+ }
42044
+ /**
42045
+ * Whether the chart now counts this point as selected.
42046
+ *
42047
+ * `selectedDataPoints` is an array per series of the indexes selected in it.
42048
+ * Absent on a chart type that does not carry point selection, in which case
42049
+ * the answer is undefined rather than false: "not selected" and "selection
42050
+ * does not apply here" are different, and a plugin keying on it should be
42051
+ * able to tell.
42052
+ *
42053
+ * @param {any} opts
42054
+ * @param {number} seriesIndex
42055
+ * @param {number} dataPointIndex
42056
+ * @returns {boolean|undefined}
42057
+ */
42058
+ static _isSelected(opts, seriesIndex, dataPointIndex) {
42059
+ const all = opts && opts.selectedDataPoints;
42060
+ if (!Array.isArray(all) || seriesIndex < 0) return void 0;
42061
+ const mine = all[seriesIndex];
42062
+ if (!Array.isArray(mine)) return false;
42063
+ return mine.indexOf(dataPointIndex) > -1;
42064
+ }
41652
42065
  /**
41653
42066
  * Record a plugin's container reservation and re-render if it changed.
41654
42067
  *
@@ -41796,14 +42209,14 @@ const _WeaveHost = class _WeaveHost {
41796
42209
  * @param {string} name
41797
42210
  * @param {{ z?: 'front'|'behind', className?: string }} opts
41798
42211
  */
41799
- _layer(name2, { z = "front", className = "" } = {}) {
42212
+ _layer(name2, { z: z2 = "front", className = "" } = {}) {
41800
42213
  let g = this._layers.get(name2);
41801
42214
  if (!g) {
41802
42215
  g = this.ctx.graphics.group({
41803
42216
  class: `apexcharts-plugin-${name2} ${className}`.trim()
41804
42217
  });
41805
42218
  const parent = this.w.dom.elGraphical.node;
41806
- if (z === "behind") parent.insertBefore(g.node, parent.firstChild);
42219
+ if (z2 === "behind") parent.insertBefore(g.node, parent.firstChild);
41807
42220
  else parent.appendChild(g.node);
41808
42221
  g.node.setAttribute("aria-hidden", "true");
41809
42222
  this._layers.set(name2, g);
@@ -41873,6 +42286,13 @@ const _WeaveHost = class _WeaveHost {
41873
42286
  this.active = [];
41874
42287
  this._derived = null;
41875
42288
  this._reserved = null;
42289
+ this._pointerSubs = null;
42290
+ if (this._pointerWired) {
42291
+ for (const [name2, handler] of this._pointerWired) {
42292
+ this.ctx.removeEventListener && this.ctx.removeEventListener(name2, handler);
42293
+ }
42294
+ this._pointerWired = null;
42295
+ }
41876
42296
  if (this._reserveTimer != null) {
41877
42297
  clearTimeout(this._reserveTimer);
41878
42298
  this._reserveTimer = null;
@@ -42440,8 +42860,8 @@ function kernelDensity(values, opts = {}) {
42440
42860
  const x = lo + g * step;
42441
42861
  let sum = 0;
42442
42862
  for (let i2 = 0; i2 < n2; i2++) {
42443
- const z = (x - sorted[i2]) / h;
42444
- sum += Math.exp(-0.5 * z * z);
42863
+ const z2 = (x - sorted[i2]) / h;
42864
+ sum += Math.exp(-0.5 * z2 * z2);
42445
42865
  }
42446
42866
  density.push([x, sum * norm]);
42447
42867
  }
@@ -43099,7 +43519,7 @@ function dumbbellTransform(ser, w) {
43099
43519
  values,
43100
43520
  order,
43101
43521
  carrier: visible.length ? visible[0] : 0,
43102
- hidden: raw.map((_, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
43522
+ hidden: raw.map((_2, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
43103
43523
  };
43104
43524
  const carrier = w.dumbbellData.carrier;
43105
43525
  return raw.map((s2, k) => __spreadProps(__spreadValues({}, s2), {
@@ -43904,7 +44324,7 @@ function streamgraphTransform(ser, w) {
43904
44324
  highs,
43905
44325
  order: bandOrder,
43906
44326
  offset,
43907
- hidden: raw.map((_, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
44327
+ hidden: raw.map((_2, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
43908
44328
  };
43909
44329
  return raw.map((s2, k) => {
43910
44330
  const lo = lows[k];
@@ -44653,7 +45073,7 @@ let Helpers$1 = class Helpers4 {
44653
45073
  /**
44654
45074
  * @param {any} _
44655
45075
  */
44656
- brArr.map((_) => "none")
45076
+ brArr.map((_2) => "none")
44657
45077
  )
44658
45078
  );
44659
45079
  }
@@ -44994,7 +45414,7 @@ let Helpers$1 = class Helpers4 {
44994
45414
  ) : null;
44995
45415
  const isBar = (i2) => !barIndices || barIndices.has(i2);
44996
45416
  if (!groups || groups.length < 2) {
44997
- const bucket = Array.from({ length: numSeries }, (_, i2) => i2).filter(isBar);
45417
+ const bucket = Array.from({ length: numSeries }, (_2, i2) => i2).filter(isBar);
44998
45418
  return bucket.length ? [bucket] : [];
44999
45419
  }
45000
45420
  const buckets = Array.from({ length: groups.length }, () => []);
@@ -45025,6 +45445,14 @@ let Helpers$1 = class Helpers4 {
45025
45445
  * second at the top, and nothing else touched. Stacked totals already resolve
45026
45446
  * per group (see drawsStackedTotal, #4173); corners never got the same fix.
45027
45447
  *
45448
+ * plotOptions.bar.borderRadiusWhenStacked picks which ends round: 'all'
45449
+ * caps both the baseline and the far end, 'last' only the far end (#4845).
45450
+ *
45451
+ * A single-data-point chart used to hand its baseline segment 'top' (and a
45452
+ * solo segment 'top' instead of 'both'), which on a horizontal stack rounded
45453
+ * the first segment on its INNER edge and left a pill in the middle of the
45454
+ * bar (#4845). One data point is resolved like any other now.
45455
+ *
45028
45456
  * @param {any[]} series
45029
45457
  * @returns {string[][]}
45030
45458
  */
@@ -45039,9 +45467,11 @@ let Helpers$1 = class Helpers4 {
45039
45467
  () => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
45040
45468
  );
45041
45469
  if (alwaysApplyRadius) return output;
45042
- const isSoloHorizontal = this.w.config.chart.type === "bar" && numColumns === 1;
45043
- const soloCorner = isSoloHorizontal ? "top" : "both";
45044
- const baseCorner = isSoloHorizontal ? "top" : "bottom";
45470
+ const lastOnly = w.config.plotOptions.bar.borderRadiusWhenStacked === "last";
45471
+ const soloPositive = lastOnly ? "top" : "both";
45472
+ const soloNegative = lastOnly ? "bottom" : "both";
45473
+ const positiveBase = lastOnly ? "none" : "bottom";
45474
+ const negativeBase = lastOnly ? "none" : "top";
45045
45475
  for (const stack of this.getStackedSeriesIndices(numSeries)) {
45046
45476
  for (let j2 = 0; j2 < numColumns; j2++) {
45047
45477
  const positiveIndices = [];
@@ -45053,22 +45483,22 @@ let Helpers$1 = class Helpers4 {
45053
45483
  }
45054
45484
  if (positiveIndices.length > 0 && negativeIndices.length === 0) {
45055
45485
  if (positiveIndices.length === 1) {
45056
- output[positiveIndices[0]][j2] = soloCorner;
45486
+ output[positiveIndices[0]][j2] = soloPositive;
45057
45487
  } else {
45058
45488
  const first = positiveIndices[0];
45059
45489
  const last = positiveIndices[positiveIndices.length - 1];
45060
45490
  for (const i2 of positiveIndices) {
45061
- output[i2][j2] = i2 === first ? baseCorner : i2 === last ? "top" : "none";
45491
+ output[i2][j2] = i2 === first ? positiveBase : i2 === last ? "top" : "none";
45062
45492
  }
45063
45493
  }
45064
45494
  } else if (negativeIndices.length > 0 && positiveIndices.length === 0) {
45065
45495
  if (negativeIndices.length === 1) {
45066
- output[negativeIndices[0]][j2] = "both";
45496
+ output[negativeIndices[0]][j2] = soloNegative;
45067
45497
  } else {
45068
- const highest = Math.max(...negativeIndices);
45069
- const lowest = Math.min(...negativeIndices);
45498
+ const nearest = Math.min(...negativeIndices);
45499
+ const farthest = Math.max(...negativeIndices);
45070
45500
  for (const i2 of negativeIndices) {
45071
- output[i2][j2] = i2 === highest ? "bottom" : i2 === lowest ? "top" : "none";
45501
+ output[i2][j2] = i2 === nearest ? negativeBase : i2 === farthest ? "bottom" : "none";
45072
45502
  }
45073
45503
  }
45074
45504
  } else if (positiveIndices.length > 0 && negativeIndices.length > 0) {
@@ -45704,7 +46134,7 @@ let Helpers$1 = class Helpers4 {
45704
46134
  const w = this.w;
45705
46135
  let nonZeroColumns = 0;
45706
46136
  let zeroEncounters = 0;
45707
- 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)) || [];
46137
+ const seriesIndices = w.config.plotOptions.bar.horizontal ? w.seriesData.series.map((_2, _i) => _i) : ((_a = w.globals.columnSeries) == null ? void 0 : _a.i.map((_i) => _i)) || [];
45708
46138
  seriesIndices.forEach((_si) => {
45709
46139
  const val = w.globals.seriesPercent[_si][j2];
45710
46140
  if (val) {
@@ -46791,7 +47221,7 @@ class BarStacked extends Bar {
46791
47221
  series = w.globals.comboCharts ? (
46792
47222
  /** @type {any} */
46793
47223
  seriesIndex.map(
46794
- (_) => w.globals.seriesPercent[_]
47224
+ (_2) => w.globals.seriesPercent[_2]
46795
47225
  )
46796
47226
  ) : w.globals.seriesPercent.slice();
46797
47227
  }
@@ -47590,17 +48020,17 @@ class BoxCandleStick extends Bar {
47590
48020
  if (this.isHorizontal) {
47591
48021
  const yRatio = this.invertedYRatio;
47592
48022
  const bh = barHeight != null ? barHeight : 0;
47593
- const z = zeroW != null ? zeroW : 0;
48023
+ const z2 = zeroW != null ? zeroW : 0;
47594
48024
  center = paths.barYPosition + bh / 2;
47595
48025
  halfExtent = bh / 2;
47596
- alongFn = (v) => z + logVal(v) / yRatio;
48026
+ alongFn = (v) => z2 + logVal(v) / yRatio;
47597
48027
  } else {
47598
48028
  const yRatio = this.yRatio[translationsIndex];
47599
48029
  const bw = barWidth != null ? barWidth : 0;
47600
- const z = zeroH != null ? zeroH : 0;
48030
+ const z2 = zeroH != null ? zeroH : 0;
47601
48031
  center = paths.barXPosition + bw / 2;
47602
48032
  halfExtent = bw / 2;
47603
- alongFn = (v) => z - logVal(v) / yRatio;
48033
+ alongFn = (v) => z2 - logVal(v) / yRatio;
47604
48034
  }
47605
48035
  const groups = buildJitterGroups({
47606
48036
  w,
@@ -48334,7 +48764,7 @@ class Violin extends Bar {
48334
48764
  return { nodes: [], maxWeight: 0 };
48335
48765
  }
48336
48766
  const order = d.values.map(
48337
- (_, k) => k
48767
+ (_2, k) => k
48338
48768
  );
48339
48769
  order.sort(
48340
48770
  (a2, b) => d.values[a2] - d.values[b]
@@ -50297,15 +50727,15 @@ class Line {
50297
50727
  case "monotoneCubic": {
50298
50728
  const yAj = isRangeStart ? yArrj : y2Arrj;
50299
50729
  const getSmoothInputs = (xArr, yArr) => {
50300
- return xArr.map((_, i3) => {
50301
- return [_, yArr[i3]];
50302
- }).filter((_) => _[1] !== null);
50730
+ return xArr.map((_2, i3) => {
50731
+ return [_2, yArr[i3]];
50732
+ }).filter((_2) => _2[1] !== null);
50303
50733
  };
50304
50734
  const getSegmentLengths = (yArr) => {
50305
50735
  const segLens = [];
50306
50736
  let count = 0;
50307
- yArr.forEach((_) => {
50308
- if (_ !== null) {
50737
+ yArr.forEach((_2) => {
50738
+ if (_2 !== null) {
50309
50739
  count++;
50310
50740
  } else if (count > 0) {
50311
50741
  segLens.push(count);
@@ -50352,11 +50782,11 @@ class Line {
50352
50782
  }
50353
50783
  let segmentCount = 0;
50354
50784
  let smoothInputsIndex = 0;
50355
- getSegments(_yAj, points).forEach((_) => {
50785
+ getSegments(_yAj, points).forEach((_2) => {
50356
50786
  segmentCount++;
50357
- const svgPoints = svgPath(_);
50787
+ const svgPoints = svgPath(_2);
50358
50788
  const _start = smoothInputsIndex;
50359
- smoothInputsIndex += _.length;
50789
+ smoothInputsIndex += _2.length;
50360
50790
  const _end = smoothInputsIndex - 1;
50361
50791
  if (isLowerRangeAreaPath) {
50362
50792
  linePath = graphics.move(
@@ -50839,13 +51269,13 @@ function roundedPieSegmentPath({ cx, cy, rOut, a0, a1, r: r2, spanDeg }) {
50839
51269
  function sharpDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, spanDeg }) {
50840
51270
  const ptAt = (radius, deg) => arcPoint(cx, cy, radius, deg);
50841
51271
  const largeArc = spanDeg > 180 ? 1 : 0;
50842
- const A2 = ptAt(rOut, a0);
51272
+ const A = ptAt(rOut, a0);
50843
51273
  const B = ptAt(rOut, a1);
50844
- const C = ptAt(rIn, a1);
51274
+ const C2 = ptAt(rIn, a1);
50845
51275
  const Din = ptAt(rIn, a0);
50846
51276
  return [
50847
51277
  "M",
50848
- xy(A2),
51278
+ xy(A),
50849
51279
  "A",
50850
51280
  rOut,
50851
51281
  rOut,
@@ -50854,7 +51284,7 @@ function sharpDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, spanDeg }) {
50854
51284
  1,
50855
51285
  xy(B),
50856
51286
  "L",
50857
- xy(C),
51287
+ xy(C2),
50858
51288
  "A",
50859
51289
  rIn,
50860
51290
  rIn,
@@ -50974,7 +51404,7 @@ class Pie {
50974
51404
  const w = this.w;
50975
51405
  const helpers = new CircularChartsHelpers(w);
50976
51406
  const lineSets = (w.seriesData.seriesNames || []).map(
50977
- (_, i2) => this.getExternalLabelLines(i2)
51407
+ (_2, i2) => this.getExternalLabelLines(i2)
50978
51408
  );
50979
51409
  const maxLabelWidth = helpers.getMaxLabelWidth(lineSets.flat(), {
50980
51410
  fontSize: this.externalLabelStyle.fontSize,
@@ -53667,7 +54097,7 @@ class RangeBar extends Bar {
53667
54097
  (_d = (_c = w.config.series[i2].data) == null ? void 0 : _c[j2]) == null ? void 0 : _d.x
53668
54098
  );
53669
54099
  const labelX = Array.isArray(x) ? x.join(" ") : x;
53670
- const rowIndex = w.labelData.labels.map((_) => Array.isArray(_) ? _.join(" ") : _).indexOf(labelX);
54100
+ const rowIndex = w.labelData.labels.map((_2) => Array.isArray(_2) ? _2.join(" ") : _2).indexOf(labelX);
53671
54101
  const overlappedIndex = w.rangeData.seriesRange[i2].findIndex(
53672
54102
  (tx) => {
53673
54103
  var _a2;
@@ -54865,8 +55295,8 @@ class TreemapChart {
54865
55295
  */
54866
55296
  _zoomEnabled() {
54867
55297
  const w = this.w;
54868
- const z = w.config.plotOptions.treemap.zoom;
54869
- if (!z || !z.enabled || !this.showParents) return false;
55298
+ const z2 = w.config.plotOptions.treemap.zoom;
55299
+ if (!z2 || !z2.enabled || !this.showParents) return false;
54870
55300
  const dd = w.config.drilldown;
54871
55301
  if (dd && dd.enabled && Array.isArray(dd.series) && dd.series.length) {
54872
55302
  if (!this._warnedZoomConflict) {
@@ -54958,8 +55388,8 @@ class TreemapChart {
54958
55388
  }
54959
55389
  /** The breadcrumb config: a treemap-local override on the shared block. */
54960
55390
  _breadcrumbCfg() {
54961
- const z = this.w.config.plotOptions.treemap.zoom;
54962
- return breadcrumbConfig(this.w, z && z.breadcrumb);
55391
+ const z2 = this.w.config.plotOptions.treemap.zoom;
55392
+ return breadcrumbConfig(this.w, z2 && z2.breadcrumb);
54963
55393
  }
54964
55394
  /**
54965
55395
  * Breadcrumb back out of a zoom. Markup, config and accessible semantics are
@@ -55158,7 +55588,7 @@ class TreemapChart {
55158
55588
  if (typeof fmt === "function") {
55159
55589
  try {
55160
55590
  return String(fmt(v, { seriesIndex: 0, dataPointIndex: 0, w }));
55161
- } catch (_) {
55591
+ } catch (_2) {
55162
55592
  }
55163
55593
  }
55164
55594
  return String(v);
@@ -55403,7 +55833,7 @@ const PK_CIRCLE = 0;
55403
55833
  const PK_CORNER = 1;
55404
55834
  const PK_GLYPH = 2;
55405
55835
  function springParams(preset, speed) {
55406
- const [stiffness, damping] = q(
55836
+ const [stiffness, damping] = z(
55407
55837
  /** @type {import('apex-commons').SpringPreset|undefined} */
55408
55838
  preset
55409
55839
  );
@@ -55647,7 +56077,7 @@ class Unit {
55647
56077
  r: typeof p.r === "number" && p.r > 0 ? p.r : void 0
55648
56078
  });
55649
56079
  });
55650
- const clusters = counts.map((_, i2) => ({
56080
+ const clusters = counts.map((_2, i2) => ({
55651
56081
  i: i2,
55652
56082
  cx: gw / 2,
55653
56083
  cy: gh / 2,
@@ -55754,7 +56184,7 @@ class Unit {
55754
56184
  const gw = w.layout.gridWidth;
55755
56185
  const gh = w.layout.gridHeight;
55756
56186
  const labelSpace = opts.clusterLabels && opts.clusterLabels.show ? 30 : 6;
55757
- const visible = counts.map((_, i2) => i2).filter((i2) => counts[i2] > 0);
56187
+ const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
55758
56188
  const Kv = Math.max(1, visible.length);
55759
56189
  const slotOf = new Array(counts.length).fill(-1);
55760
56190
  visible.forEach((i2, s2) => slotOf[i2] = s2);
@@ -55769,7 +56199,7 @@ class Unit {
55769
56199
  const cy = labelSpace + availH / 2;
55770
56200
  const outerRs = counts.map((n2) => step * Math.sqrt(Math.max(1, n2)) + dotR);
55771
56201
  const cellCentre = (i2) => slotOf[i2] >= 0 ? cellW * (slotOf[i2] + 0.5) : gw / 2;
55772
- let centers = counts.map((_, i2) => cellCentre(i2));
56202
+ let centers = counts.map((_2, i2) => cellCentre(i2));
55773
56203
  const visOuter = visible.map((i2) => outerRs[i2]);
55774
56204
  let overlap = false;
55775
56205
  for (let s2 = 1; s2 < Kv; s2++) {
@@ -55794,10 +56224,10 @@ class Unit {
55794
56224
  } else {
55795
56225
  const lo = visOuter[0];
55796
56226
  const hi = gw - visOuter[Kv - 1];
55797
- visCenters = visOuter.map((_, s2) => lo + (hi - lo) * s2 / (Kv - 1));
56227
+ visCenters = visOuter.map((_2, s2) => lo + (hi - lo) * s2 / (Kv - 1));
55798
56228
  }
55799
56229
  centers = counts.map(
55800
- (_, i2) => slotOf[i2] >= 0 ? visCenters[slotOf[i2]] : gw / 2
56230
+ (_2, i2) => slotOf[i2] >= 0 ? visCenters[slotOf[i2]] : gw / 2
55801
56231
  );
55802
56232
  }
55803
56233
  return counts.map((n2, i2) => ({
@@ -55829,11 +56259,11 @@ class Unit {
55829
56259
  this._lastDotR = this._dotRadiusFromStep(step, opts);
55830
56260
  const cx = gw / 2;
55831
56261
  const cy = labelSpace + (gh - labelSpace) / 2;
55832
- const order = counts.map((_, i2) => i2);
56262
+ const order = counts.map((_2, i2) => i2);
55833
56263
  if (opts.sortByGroup !== false) {
55834
56264
  order.sort((a2, b) => counts[a2] - counts[b]);
55835
56265
  }
55836
- const clusters = counts.map((_, i2) => ({
56266
+ const clusters = counts.map((_2, i2) => ({
55837
56267
  i: i2,
55838
56268
  cx,
55839
56269
  cy,
@@ -55905,7 +56335,7 @@ class Unit {
55905
56335
  }
55906
56336
  }
55907
56337
  seats.sort((s1, s2) => s1.a - s2.a);
55908
- const clusters = counts.map((_, i2) => ({
56338
+ const clusters = counts.map((_2, i2) => ({
55909
56339
  i: i2,
55910
56340
  cx,
55911
56341
  cy,
@@ -55966,11 +56396,11 @@ class Unit {
55966
56396
  const spacing = opts.spacing > 0 ? opts.spacing : 1.05;
55967
56397
  const absSpan = Math.abs(span) || Math.PI;
55968
56398
  const fixed = this._fixedRadius(opts);
55969
- const evalR = (R2) => {
55970
- R2 = Math.max(1, Math.round(R2));
56399
+ const evalR = (R) => {
56400
+ R = Math.max(1, Math.round(R));
55971
56401
  const radii = [];
55972
- for (let r2 = 0; r2 < R2; r2++) {
55973
- radii.push(R2 === 1 ? (r0 + r1) / 2 : r0 + (r1 - r0) * (r2 / (R2 - 1)));
56402
+ for (let r2 = 0; r2 < R; r2++) {
56403
+ radii.push(R === 1 ? (r0 + r1) / 2 : r0 + (r1 - r0) * (r2 / (R - 1)));
55974
56404
  }
55975
56405
  const weightSum = radii.reduce((a2, x) => a2 + x, 0) || 1;
55976
56406
  const raw = radii.map((rho) => total * rho / weightSum);
@@ -55983,19 +56413,19 @@ class Unit {
55983
56413
  }
55984
56414
  });
55985
56415
  while (left > 0) {
55986
- seatsPerRow[R2 - 1]++;
56416
+ seatsPerRow[R - 1]++;
55987
56417
  left--;
55988
56418
  }
55989
- const radialPitch = R2 === 1 ? r1 - r0 || r1 : (r1 - r0) / (R2 - 1);
56419
+ const radialPitch = R === 1 ? r1 - r0 || r1 : (r1 - r0) / (R - 1);
55990
56420
  let minArcPitch = Infinity;
55991
- for (let r2 = 0; r2 < R2; r2++) {
56421
+ for (let r2 = 0; r2 < R; r2++) {
55992
56422
  const n2 = seatsPerRow[r2];
55993
56423
  if (n2 <= 0) continue;
55994
56424
  const arcPitch = radii[r2] * absSpan / n2;
55995
56425
  if (arcPitch < minArcPitch) minArcPitch = arcPitch;
55996
56426
  }
55997
56427
  const pitch = Math.min(radialPitch, minArcPitch);
55998
- return { R: R2, radii, seatsPerRow, dotR: Math.max(1, pitch / (2 * spacing)) };
56428
+ return { R, radii, seatsPerRow, dotR: Math.max(1, pitch / (2 * spacing)) };
55999
56429
  };
56000
56430
  const arcRows = opts.arc && opts.arc.rows;
56001
56431
  let res;
@@ -56007,8 +56437,8 @@ class Unit {
56007
56437
  } else {
56008
56438
  const maxR = Math.max(1, Math.min(40, Math.ceil(Math.sqrt(total)) + 6));
56009
56439
  res = evalR(1);
56010
- for (let R2 = 2; R2 <= maxR; R2++) {
56011
- const cand = evalR(R2);
56440
+ for (let R = 2; R <= maxR; R++) {
56441
+ const cand = evalR(R);
56012
56442
  if (cand.dotR > res.dotR) res = cand;
56013
56443
  }
56014
56444
  }
@@ -56032,7 +56462,7 @@ class Unit {
56032
56462
  const labelsOn = !!(opts.clusterLabels && opts.clusterLabels.show);
56033
56463
  const labelsBelow = labelsOn && opts.clusterLabels.position === "bottom";
56034
56464
  const topPad = labelsOn && !labelsBelow ? 30 : 6;
56035
- const visible = counts.map((_, i2) => i2).filter((i2) => counts[i2] > 0);
56465
+ const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
56036
56466
  const Kv = Math.max(1, visible.length);
56037
56467
  const slotOf = new Array(counts.length).fill(-1);
56038
56468
  visible.forEach((i2, s2) => slotOf[i2] = s2);
@@ -56147,7 +56577,7 @@ class Unit {
56147
56577
  const originX = (gw - blockW) / 2 + pitch / 2;
56148
56578
  const topY = labelSpace + (availH - blockH) / 2;
56149
56579
  const rowY = (rowIdx) => fillFrom === "bottom" ? topY + blockH - pitch / 2 - rowIdx * pitch : topY + pitch / 2 + rowIdx * pitch;
56150
- const clusters = counts.map((_, i2) => ({
56580
+ const clusters = counts.map((_2, i2) => ({
56151
56581
  i: i2,
56152
56582
  cx: gw / 2,
56153
56583
  cy: labelSpace + availH / 2,
@@ -56193,14 +56623,14 @@ class Unit {
56193
56623
  const fillFrom = gcfg.fillFrom === "top" ? "top" : "bottom";
56194
56624
  const cellsPerTile = Math.max(1, Math.round(gcfg.total > 0 ? gcfg.total : 100));
56195
56625
  const rowsPerTile = Math.max(1, Math.ceil(cellsPerTile / cols));
56196
- const visible = counts.map((_, i2) => i2).filter((i2) => counts[i2] > 0);
56197
- const K = Math.max(1, visible.length);
56626
+ const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
56627
+ const K2 = Math.max(1, visible.length);
56198
56628
  const denom = gcfg.max > 0 ? gcfg.max : Math.max(1, ...counts);
56199
56629
  const tileCols = Math.max(
56200
56630
  1,
56201
- Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(K)))
56631
+ Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(K2)))
56202
56632
  );
56203
- const tileRows = Math.max(1, Math.ceil(K / tileCols));
56633
+ const tileRows = Math.max(1, Math.ceil(K2 / tileCols));
56204
56634
  const labelsOn = !(opts.clusterLabels && opts.clusterLabels.show === false);
56205
56635
  const labelsBelow = labelsOn && opts.clusterLabels && opts.clusterLabels.position === "bottom";
56206
56636
  const topBand = labelsOn && !labelsBelow ? 22 : 4;
@@ -56320,7 +56750,7 @@ class Unit {
56320
56750
  (cat) => Array.isArray(cat) ? cat.map(valueOf) : []
56321
56751
  );
56322
56752
  const isNum = (v) => v != null && isFinite(v);
56323
- const visible = catVals.map((_, i2) => i2).filter((i2) => catVals[i2].some(isNum));
56753
+ const visible = catVals.map((_2, i2) => i2).filter((i2) => catVals[i2].some(isNum));
56324
56754
  const Kv = Math.max(1, visible.length);
56325
56755
  let vmin = Infinity;
56326
56756
  let vmax = -Infinity;
@@ -56439,7 +56869,7 @@ class Unit {
56439
56869
  (cat) => Array.isArray(cat) ? cat.map(valueOf) : []
56440
56870
  );
56441
56871
  const isNum = (v) => v != null && isFinite(v);
56442
- const visible = catVals.map((_, i2) => i2).filter((i2) => catVals[i2].some(isNum));
56872
+ const visible = catVals.map((_2, i2) => i2).filter((i2) => catVals[i2].some(isNum));
56443
56873
  const Kv = Math.max(1, visible.length);
56444
56874
  let vmin = Infinity;
56445
56875
  let vmax = -Infinity;
@@ -56556,7 +56986,7 @@ class Unit {
56556
56986
  const isNum = (v) => typeof v === "number" && isFinite(v);
56557
56987
  const xOf = (d) => d && typeof d === "object" ? d.x : null;
56558
56988
  const yOf = (d) => d && typeof d === "object" ? d.y != null ? d.y : d.value : null;
56559
- const visible = unitData.map((_, i2) => i2).filter(
56989
+ const visible = unitData.map((_2, i2) => i2).filter(
56560
56990
  (i2) => (unitData[i2] || []).some((d) => isNum(xOf(d)) && isNum(yOf(d)))
56561
56991
  );
56562
56992
  let xmn = Infinity;
@@ -56694,10 +57124,10 @@ class Unit {
56694
57124
  let zmax = -Infinity;
56695
57125
  unitData.forEach(
56696
57126
  (cat) => (cat || []).forEach((d) => {
56697
- const z = d && typeof d === "object" ? d[field] : null;
56698
- if (typeof z === "number" && isFinite(z)) {
56699
- if (z < zmin) zmin = z;
56700
- if (z > zmax) zmax = z;
57127
+ const z2 = d && typeof d === "object" ? d[field] : null;
57128
+ if (typeof z2 === "number" && isFinite(z2)) {
57129
+ if (z2 < zmin) zmin = z2;
57130
+ if (z2 > zmax) zmax = z2;
56701
57131
  }
56702
57132
  })
56703
57133
  );
@@ -56714,9 +57144,9 @@ class Unit {
56714
57144
  */
56715
57145
  _scatterRadius(d, st, fallback) {
56716
57146
  if (!st) return fallback;
56717
- const z = d && typeof d === "object" ? d[st.field] : null;
56718
- if (typeof z !== "number" || !isFinite(z)) return st.rMin;
56719
- const t2 = st.zmax > st.zmin ? (z - st.zmin) / (st.zmax - st.zmin) : 1;
57147
+ const z2 = d && typeof d === "object" ? d[st.field] : null;
57148
+ if (typeof z2 !== "number" || !isFinite(z2)) return st.rMin;
57149
+ const t2 = st.zmax > st.zmin ? (z2 - st.zmin) / (st.zmax - st.zmin) : 1;
56720
57150
  const tc = Math.max(0, Math.min(1, t2));
56721
57151
  const aMin = st.rMin * st.rMin;
56722
57152
  const aMax = st.rMax * st.rMax;
@@ -57512,8 +57942,8 @@ class Unit {
57512
57942
  for (let k = 0; k < dots.length; k++) {
57513
57943
  const d = dots[k];
57514
57944
  const carried = live && !d.isEnter && d.key != null ? live.get(d.key) : null;
57515
- const sx = carried ? carried.x : E(d.cx0, stiffness, damping);
57516
- const sy = carried ? carried.y : E(d.cy0, stiffness, damping);
57945
+ const sx = carried ? carried.x : $(d.cx0, stiffness, damping);
57946
+ const sy = carried ? carried.y : $(d.cy0, stiffness, damping);
57517
57947
  if (carried) {
57518
57948
  sx.stiffness = stiffness;
57519
57949
  sy.stiffness = stiffness;
@@ -57597,12 +58027,12 @@ class Unit {
57597
58027
  let cx, cy;
57598
58028
  if (d.sx && d.sy) {
57599
58029
  if (elapsed >= 0 && !d.released) {
57600
- D(d.sx, d.x);
57601
- D(d.sy, d.y);
58030
+ _(d.sx, d.x);
58031
+ _(d.sy, d.y);
57602
58032
  d.released = true;
57603
58033
  }
57604
- const restX = R(d.sx, dt);
57605
- const restY = R(d.sy, dt);
58034
+ const restX = q(d.sx, dt);
58035
+ const restY = q(d.sy, dt);
57606
58036
  if (!d.released || !restX || !restY) done = false;
57607
58037
  cx = d.sx.value;
57608
58038
  cy = d.sy.value;
@@ -57934,14 +58364,14 @@ ${percent.toFixed(1)}%`;
57934
58364
  textEl.setAttribute("font-weight", String(cfg.fontWeight || 600));
57935
58365
  textEl.setAttribute("fill", cfg.color || color);
57936
58366
  const bottom = cfg.position === "bottom";
57937
- const R2 = cluster.outerR + fontSize * 0.6 + 3 + (cfg.offsetY || 0);
58367
+ const R = cluster.outerR + fontSize * 0.6 + 3 + (cfg.offsetY || 0);
57938
58368
  const estWidth = str.length * fontSize * 0.55;
57939
- const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI * R2 * 0.95;
58369
+ const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI * R * 0.95;
57940
58370
  if (curved) {
57941
58371
  const yMid = cluster.cy;
57942
- const x1 = cluster.cx - R2;
57943
- const x2 = cluster.cx + R2;
57944
- const d = `M ${x1} ${yMid} A ${R2} ${R2} 0 0 1 ${x2} ${yMid}`;
58372
+ const x1 = cluster.cx - R;
58373
+ const x2 = cluster.cx + R;
58374
+ const d = `M ${x1} ${yMid} A ${R} ${R} 0 0 1 ${x2} ${yMid}`;
57945
58375
  const arcId = `apexcharts-unit-label-${w.globals.chartID}-${cluster.i}`;
57946
58376
  const pathEl = BrowserAPIs.createElementNS(NS, "path");
57947
58377
  pathEl.setAttribute("id", arcId);