apexcharts 8.2.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +7 -7
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +271 -173
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.css +35 -0
  6. package/dist/apexcharts.esm.js +1722 -1527
  7. package/dist/apexcharts.full.js +1459 -1075
  8. package/dist/apexcharts.full.min.js +2 -2
  9. package/dist/apexcharts.js +994 -715
  10. package/dist/apexcharts.min.js +2 -2
  11. package/dist/apexcharts.ssr.common.js +2 -2
  12. package/dist/apexcharts.ssr.esm.js +994 -715
  13. package/dist/area.common.js +2 -2
  14. package/dist/area.esm.js +91 -40
  15. package/dist/bar.common.js +2 -2
  16. package/dist/bar.esm.js +433 -394
  17. package/dist/bar.js +2 -2
  18. package/dist/boxPlot.common.js +2 -2
  19. package/dist/boxPlot.esm.js +364 -322
  20. package/dist/bubble.common.js +2 -2
  21. package/dist/bubble.esm.js +91 -40
  22. package/dist/candlestick.common.js +2 -2
  23. package/dist/candlestick.esm.js +364 -322
  24. package/dist/candlestick.js +2 -2
  25. package/dist/column.common.js +2 -2
  26. package/dist/column.esm.js +433 -394
  27. package/dist/core.common.js +2 -2
  28. package/dist/core.esm.js +271 -173
  29. package/dist/donut.common.js +1 -1
  30. package/dist/donut.esm.js +1 -1
  31. package/dist/dumbbell.common.js +2 -2
  32. package/dist/dumbbell.esm.js +433 -394
  33. package/dist/features/all.common.js +2 -2
  34. package/dist/features/all.esm.js +250 -187
  35. package/dist/features/annotations.common.js +1 -1
  36. package/dist/features/annotations.esm.js +1 -1
  37. package/dist/features/annotations.js +1 -1
  38. package/dist/features/context-menu.common.js +1 -1
  39. package/dist/features/context-menu.esm.js +1 -1
  40. package/dist/features/context-menu.js +1 -1
  41. package/dist/features/drilldown.common.js +2 -2
  42. package/dist/features/drilldown.esm.js +4 -2
  43. package/dist/features/drilldown.js +2 -2
  44. package/dist/features/dumbbell.common.js +1 -1
  45. package/dist/features/dumbbell.esm.js +1 -1
  46. package/dist/features/dumbbell.js +1 -1
  47. package/dist/features/exports.common.js +1 -1
  48. package/dist/features/exports.esm.js +1 -1
  49. package/dist/features/exports.js +1 -1
  50. package/dist/features/facet.common.js +1 -1
  51. package/dist/features/facet.esm.js +1 -1
  52. package/dist/features/facet.js +1 -1
  53. package/dist/features/highlight-filter.common.js +2 -2
  54. package/dist/features/highlight-filter.esm.js +14 -9
  55. package/dist/features/highlight-filter.js +2 -2
  56. package/dist/features/history.common.js +1 -1
  57. package/dist/features/history.esm.js +1 -1
  58. package/dist/features/history.js +1 -1
  59. package/dist/features/ink.common.js +1 -1
  60. package/dist/features/ink.esm.js +1 -1
  61. package/dist/features/ink.js +1 -1
  62. package/dist/features/keyboard.common.js +2 -2
  63. package/dist/features/keyboard.esm.js +97 -145
  64. package/dist/features/keyboard.js +2 -2
  65. package/dist/features/legend.common.js +2 -2
  66. package/dist/features/legend.esm.js +63 -43
  67. package/dist/features/legend.js +2 -2
  68. package/dist/features/link.common.js +1 -1
  69. package/dist/features/link.esm.js +1 -1
  70. package/dist/features/link.js +1 -1
  71. package/dist/features/marks.common.js +1 -1
  72. package/dist/features/marks.esm.js +1 -1
  73. package/dist/features/marks.js +1 -1
  74. package/dist/features/measure.common.js +1 -1
  75. package/dist/features/measure.esm.js +1 -1
  76. package/dist/features/measure.js +1 -1
  77. package/dist/features/morph.common.js +1 -1
  78. package/dist/features/morph.esm.js +1 -1
  79. package/dist/features/morph.js +1 -1
  80. package/dist/features/perspectives.common.js +1 -1
  81. package/dist/features/perspectives.esm.js +1 -1
  82. package/dist/features/perspectives.js +1 -1
  83. package/dist/features/raincloud.common.js +1 -1
  84. package/dist/features/raincloud.esm.js +1 -1
  85. package/dist/features/raincloud.js +1 -1
  86. package/dist/features/renderer-canvas.common.js +2 -2
  87. package/dist/features/renderer-canvas.esm.js +2 -1
  88. package/dist/features/renderer-canvas.js +2 -2
  89. package/dist/features/stats.common.js +1 -1
  90. package/dist/features/stats.esm.js +1 -1
  91. package/dist/features/stats.js +1 -1
  92. package/dist/features/storyboard.common.js +1 -1
  93. package/dist/features/storyboard.esm.js +1 -1
  94. package/dist/features/storyboard.js +1 -1
  95. package/dist/features/streamgraph.common.js +2 -2
  96. package/dist/features/streamgraph.esm.js +3 -2
  97. package/dist/features/streamgraph.js +2 -2
  98. package/dist/features/toolbar.common.js +2 -2
  99. package/dist/features/toolbar.esm.js +92 -2
  100. package/dist/features/toolbar.js +2 -2
  101. package/dist/features/trellis.common.js +2 -2
  102. package/dist/features/trellis.esm.js +83 -47
  103. package/dist/features/trellis.js +2 -2
  104. package/dist/features/waterfall.common.js +1 -1
  105. package/dist/features/waterfall.esm.js +1 -1
  106. package/dist/features/waterfall.js +1 -1
  107. package/dist/features/weave.common.js +1 -1
  108. package/dist/features/weave.esm.js +1 -1
  109. package/dist/features/weave.js +1 -1
  110. package/dist/full.common.js +2 -2
  111. package/dist/full.esm.js +950 -795
  112. package/dist/heatmap.common.js +2 -2
  113. package/dist/heatmap.esm.js +3 -17
  114. package/dist/heatmap.js +2 -2
  115. package/dist/histogram.common.js +2 -2
  116. package/dist/histogram.esm.js +433 -394
  117. package/dist/icicle.common.js +2 -2
  118. package/dist/icicle.esm.js +54 -38
  119. package/dist/icicle.js +2 -2
  120. package/dist/line.common.js +2 -2
  121. package/dist/line.esm.js +91 -40
  122. package/dist/line.js +2 -2
  123. package/dist/locales/en.json +2 -1
  124. package/dist/locales/ro.json +3 -2
  125. package/dist/pictograms.common.js +1 -1
  126. package/dist/pictograms.esm.js +1 -1
  127. package/dist/pictograms.js +1 -1
  128. package/dist/pie.common.js +1 -1
  129. package/dist/pie.esm.js +1 -1
  130. package/dist/pie.js +1 -1
  131. package/dist/polarArea.common.js +1 -1
  132. package/dist/polarArea.esm.js +1 -1
  133. package/dist/radar.common.js +2 -2
  134. package/dist/radar.esm.js +5 -4
  135. package/dist/radar.js +2 -2
  136. package/dist/radialBar.common.js +1 -1
  137. package/dist/radialBar.esm.js +1 -1
  138. package/dist/radialBar.js +1 -1
  139. package/dist/raincloud.common.js +2 -2
  140. package/dist/raincloud.esm.js +72 -26
  141. package/dist/rangeArea.common.js +2 -2
  142. package/dist/rangeArea.esm.js +91 -40
  143. package/dist/rangeBar.common.js +2 -2
  144. package/dist/rangeBar.esm.js +433 -394
  145. package/dist/scatter.common.js +2 -2
  146. package/dist/scatter.esm.js +91 -40
  147. package/dist/streamgraph.common.js +2 -2
  148. package/dist/streamgraph.esm.js +93 -41
  149. package/dist/sunburst.common.js +2 -2
  150. package/dist/sunburst.esm.js +103 -93
  151. package/dist/sunburst.js +2 -2
  152. package/dist/treemap.common.js +2 -2
  153. package/dist/treemap.esm.js +105 -86
  154. package/dist/treemap.js +2 -2
  155. package/dist/unit-shapes.common.js +1 -1
  156. package/dist/unit-shapes.esm.js +1 -1
  157. package/dist/unit-shapes.js +1 -1
  158. package/dist/unit.common.js +2 -2
  159. package/dist/unit.esm.js +280 -202
  160. package/dist/unit.js +2 -2
  161. package/dist/violin.common.js +2 -2
  162. package/dist/violin.esm.js +72 -26
  163. package/dist/violin.js +2 -2
  164. package/dist/waterfall.common.js +2 -2
  165. package/dist/waterfall.esm.js +432 -393
  166. package/package.json +1 -1
  167. package/src/apexcharts.js +13 -6
  168. package/src/assets/apexcharts.css +35 -0
  169. package/src/charts/Bar.js +62 -55
  170. package/src/charts/BarStacked.js +80 -88
  171. package/src/charts/BoxCandleStick.js +28 -31
  172. package/src/charts/Icicle.js +37 -37
  173. package/src/charts/Line.js +118 -42
  174. package/src/charts/Radar.js +5 -7
  175. package/src/charts/RangeBar.js +47 -43
  176. package/src/charts/Sunburst.js +101 -98
  177. package/src/charts/Treemap.js +108 -66
  178. package/src/charts/Unit.js +368 -250
  179. package/src/charts/Violin.js +48 -30
  180. package/src/charts/common/Breadcrumb.js +2 -2
  181. package/src/charts/common/Hierarchy.js +32 -11
  182. package/src/charts/common/Jitter.js +32 -7
  183. package/src/charts/common/bar/DataLabels.js +76 -81
  184. package/src/charts/common/bar/Helpers.js +43 -7
  185. package/src/charts/common/line/Helpers.js +12 -15
  186. package/src/charts/common/partition/NodeTooltip.js +8 -1
  187. package/src/charts/common/partition/Partition.js +33 -1
  188. package/src/charts/common/treemap/Helpers.js +3 -11
  189. package/src/locales/en.json +2 -1
  190. package/src/locales/ro.json +3 -2
  191. package/src/modules/Core.js +4 -0
  192. package/src/modules/CoreUtils.js +18 -42
  193. package/src/modules/Data.js +23 -24
  194. package/src/modules/DataLabels.js +6 -6
  195. package/src/modules/Graphics.js +62 -49
  196. package/src/modules/Markers.js +3 -1
  197. package/src/modules/Range.js +44 -29
  198. package/src/modules/RendererController.js +17 -3
  199. package/src/modules/Scales.js +32 -9
  200. package/src/modules/Series.js +39 -18
  201. package/src/modules/Theme.js +1 -1
  202. package/src/modules/ZoomPanSelection.js +119 -2
  203. package/src/modules/accessibility/KeyboardNavigation.js +114 -186
  204. package/src/modules/animations/LengthTransition.js +22 -2
  205. package/src/modules/drilldown/Breadcrumb.js +5 -2
  206. package/src/modules/helpers/Destroy.js +1 -1
  207. package/src/modules/highlightFilter/HighlightFilter.js +8 -9
  208. package/src/modules/highlightFilter/TreemapPart.js +2 -2
  209. package/src/modules/legend/HeatmapGradientLegend.js +76 -45
  210. package/src/modules/legend/Helpers.js +2 -0
  211. package/src/modules/legend/Legend.js +11 -12
  212. package/src/modules/settings/Options.js +7 -0
  213. package/src/modules/streamgraph/StreamLabels.js +1 -0
  214. package/src/modules/tooltip/Tooltip.js +20 -4
  215. package/src/modules/tooltip/Utils.js +8 -0
  216. package/src/modules/trellis/Trellis.js +6 -0
  217. package/src/modules/trellis/TrellisChrome.js +18 -7
  218. package/src/modules/trellis/TrellisSync.js +2 -0
  219. package/src/renderers/canvas/CanvasGraphics.js +1 -0
  220. package/src/ssr/DOMShim.js +10 -0
  221. package/src/types/internal.d.ts +9 -3
  222. package/types/apexcharts.d.ts +31 -12
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v8.2.0
21
+ * ApexCharts v8.3.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -41,18 +41,16 @@ class Helpers {
41
41
  this.lineCtx = lineCtx;
42
42
  }
43
43
  /**
44
- * @param {number} i
44
+ * @param {number} i index into `series`, the rows this draw call renders
45
45
  * @param {any[]} series
46
+ * @param {number} realIndex index into the config / fill options
46
47
  */
47
- sameValueSeriesFix(i, series) {
48
+ sameValueSeriesFix(i, series, realIndex) {
48
49
  const w = this.w;
49
- if (w.config.fill.type === "gradient" || w.config.fill.type[i] === "gradient") {
50
- const coreUtils = new CoreUtils(this.lineCtx.w);
51
- if (coreUtils.seriesHaveSameValues(i)) {
52
- const gSeries = series[i].slice();
53
- gSeries[gSeries.length - 1] = gSeries[gSeries.length - 1] + 1e-6;
54
- series[i] = gSeries;
55
- }
50
+ const s = series[i];
51
+ if ((w.config.fill.type === "gradient" || w.config.fill.type[realIndex] === "gradient") && s.every((v) => v === s[0])) {
52
+ series[i] = s.slice();
53
+ series[i][s.length - 1] += 1e-6;
56
54
  }
57
55
  return series;
58
56
  }
@@ -653,6 +651,11 @@ function uniquifyKeys(keys) {
653
651
  return count === 0 ? k : `${k}#${count}`;
654
652
  });
655
653
  }
654
+ function seriesKeys(w, realIndex, n = ((_a) => (_a = w.seriesData.series[realIndex]) == null ? void 0 : _a.length)() | 0) {
655
+ return uniquifyKeys(
656
+ Array.from({ length: n }, (_, j) => datumKey(w, realIndex, j))
657
+ );
658
+ }
656
659
  function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false) {
657
660
  var _a, _b;
658
661
  if (!lengthTransitionEnabled(w)) return null;
@@ -665,7 +668,7 @@ function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false)
665
668
  const oldKeys = uniquifyKeys(
666
669
  oldY.map((_, j) => frameDatumKey(frame, realIndex, j))
667
670
  );
668
- const newKeys = uniquifyKeys(newY.map((_, j) => datumKey(w, realIndex, j)));
671
+ const newKeys = seriesKeys(w, realIndex);
669
672
  const join = joinKeys(oldKeys, newKeys);
670
673
  if (!join.ordered && !allowReorder) return null;
671
674
  if (!join.changed && !includeIdentity) return null;
@@ -929,13 +932,27 @@ class Line {
929
932
  this.yRatio = coreUtils.getLogYRatios(this.yRatio);
930
933
  this.prevSeriesY = [];
931
934
  this.prevSeriesYByX = /* @__PURE__ */ new Map();
935
+ this._stackXs = null;
936
+ if (w.config.chart.stacked && w.axisFlags.isXNumeric) {
937
+ const xs = series.map(
938
+ (_, i) => w.globals.comboCharts ? (
939
+ /** @type {any} */
940
+ seriesIndex[i]
941
+ ) : i
942
+ ).filter((ri) => !this._hidden(ri)).map((ri) => w.seriesData.seriesX[ri] || []);
943
+ if (xs.some(
944
+ (a) => a.length !== xs[0].length || a.some((v, k) => v !== xs[0][k])
945
+ )) {
946
+ this._stackXs = [...new Set(xs.flat())].sort((a, b) => a - b);
947
+ }
948
+ }
932
949
  const allSeries = [];
933
950
  for (let i = 0; i < series.length; i++) {
934
- series = this.lineHelpers.sameValueSeriesFix(i, series);
935
951
  const realIndex = w.globals.comboCharts ? (
936
952
  /** @type {any} */
937
953
  seriesIndex[i]
938
954
  ) : i;
955
+ series = this.lineHelpers.sameValueSeriesFix(i, series, realIndex);
939
956
  const translationsIndex = this.yRatio.length > 1 ? realIndex : 0;
940
957
  const flat = this._collapsedBaselineRow(series, i, realIndex);
941
958
  this._shapeOnly = !!flat;
@@ -1119,9 +1136,7 @@ class Line {
1119
1136
  const gl = w.globals;
1120
1137
  if (w.config.chart.stacked || this.pointsChart) return null;
1121
1138
  if (!Array.isArray(series[i]) || series[i].length !== 0) return null;
1122
- if (gl.collapsedSeriesIndices.indexOf(realIndex) === -1 && gl.ancillaryCollapsedSeriesIndices.indexOf(realIndex) === -1) {
1123
- return null;
1124
- }
1139
+ if (!this._hidden(realIndex)) return null;
1125
1140
  const n = w.axisFlags.isXNumeric ? (w.seriesData.seriesX[realIndex] || []).length : gl.dataPoints;
1126
1141
  if (!n) return null;
1127
1142
  const lo = Utils.isNumber(gl.minYArr[realIndex]) ? gl.minYArr[realIndex] : gl.minY;
@@ -1250,6 +1265,11 @@ class Line {
1250
1265
  if (key === void 0 || key === null) return void 0;
1251
1266
  return this.prevSeriesYByX.get(key);
1252
1267
  }
1268
+ /** @param {number} ri */
1269
+ _hidden(ri) {
1270
+ const g = this.w.globals;
1271
+ return g.collapsedSeriesIndices.indexOf(ri) > -1 || g.ancillaryCollapsedSeriesIndices.indexOf(ri) > -1;
1272
+ }
1253
1273
  /**
1254
1274
  * Fold a drawn series into the running stack top, so the next series can find
1255
1275
  * its baseline by x (#4886).
@@ -1265,19 +1285,18 @@ class Line {
1265
1285
  * correct if that representation ever changes.
1266
1286
  * @param {number} realIndex
1267
1287
  * @param {any[]} yArrj
1288
+ * @param {any[]} [row] the drawn row, if not the series' own (a part)
1268
1289
  */
1269
- _recordStackTops(realIndex, yArrj) {
1290
+ _recordStackTops(realIndex, yArrj, row = this.w.seriesData.series[realIndex]) {
1270
1291
  const w = this.w;
1271
1292
  if (!w.config.chart.stacked) return;
1272
1293
  if (!Array.isArray(yArrj)) return;
1273
- if (w.globals.collapsedSeriesIndices.indexOf(realIndex) !== -1 || w.globals.ancillaryCollapsedSeriesIndices.indexOf(realIndex) !== -1) {
1274
- return;
1275
- }
1294
+ if (this._hidden(realIndex)) return;
1276
1295
  for (let j = 0; j < yArrj.length; j++) {
1277
1296
  const key = this._stackKey(realIndex, j);
1278
1297
  if (key === void 0 || key === null) continue;
1279
1298
  const y = yArrj[j];
1280
- if (!Utils.isNumber(y)) continue;
1299
+ if (!Utils.isNumber(y) || (row == null ? void 0 : row[j]) == null) continue;
1281
1300
  this.prevSeriesYByX.set(key, y);
1282
1301
  }
1283
1302
  }
@@ -1310,7 +1329,8 @@ class Line {
1310
1329
  w.globals.seriesYvalues[realIndex] = paths.yArrj;
1311
1330
  const forecast = w.config.forecastDataPoints;
1312
1331
  if (forecast.count > 0 && type !== "rangeArea") {
1313
- const forecastCutoff = w.globals.seriesXvalues[realIndex][w.globals.seriesXvalues[realIndex].length - forecast.count - 1];
1332
+ const ci = paths.xArrj.length - forecast.count - 1;
1333
+ const forecastCutoff = w.axisFlags.isXNumeric ? (w.seriesData.seriesX[realIndex][ci] - w.globals.minX) / this.xRatio : w.globals.padHorizontal + this.categoryAxisCorrection + ci * this.xDivision;
1314
1334
  const elForecastMask = graphics.drawRect(
1315
1335
  forecastCutoff,
1316
1336
  0,
@@ -1397,7 +1417,7 @@ class Line {
1397
1417
  scrollMorph: !!streamScroll,
1398
1418
  stroke: "none",
1399
1419
  strokeWidth: 0,
1400
- strokeLineCap: null,
1420
+ strokeLinecap: null,
1401
1421
  fill: pathFill
1402
1422
  }));
1403
1423
  this.elSeries.add(renderedPath);
@@ -1439,7 +1459,7 @@ class Line {
1439
1459
  scrollMorph: !!streamScroll,
1440
1460
  stroke: lineFill,
1441
1461
  strokeWidth: this.strokeWidth,
1442
- strokeLineCap: w.config.stroke.lineCap,
1462
+ strokeLinecap: w.config.stroke.lineCap,
1443
1463
  fill: type === "rangeArea" ? pathFill : "none"
1444
1464
  });
1445
1465
  const renderedPath = emit.renderPaths(linePathCommonOpts);
@@ -1493,7 +1513,7 @@ class Line {
1493
1513
  isRangeStart,
1494
1514
  seriesRangeEnd
1495
1515
  }) {
1496
- var _a, _b;
1516
+ var _a, _b, _c;
1497
1517
  const w = this.w;
1498
1518
  const graphics = new Graphics(this.w);
1499
1519
  const yRatio = this.yRatio;
@@ -1545,15 +1565,30 @@ class Line {
1545
1565
  });
1546
1566
  if (fast) return fast;
1547
1567
  }
1568
+ const ks = stackSeries ? this._stackXs : null;
1569
+ let kp = 0;
1570
+ const midsAt = [];
1548
1571
  for (let j = 0; j < iterations; j++) {
1549
1572
  if (series[i].length === 0) break;
1550
1573
  const isNull = typeof series[i][j + 1] === "undefined" || series[i][j + 1] === null;
1551
1574
  if (w.axisFlags.isXNumeric) {
1552
- let sX = w.seriesData.seriesX[realIndex][j + 1];
1553
- if (typeof w.seriesData.seriesX[realIndex][j + 1] === "undefined") {
1554
- sX = w.seriesData.seriesX[realIndex][iterations - 1];
1575
+ const sxs = w.seriesData.seriesX[realIndex];
1576
+ let sX = sxs[j + 1];
1577
+ if (typeof sX === "undefined") {
1578
+ sX = sxs[iterations - 1];
1555
1579
  }
1556
1580
  x = (sX - w.globals.minX) / this.xRatio;
1581
+ if (ks) {
1582
+ const m = [];
1583
+ while (ks[kp] <= sxs[j]) kp++;
1584
+ while (ks[kp] < sX) {
1585
+ m.push([
1586
+ (ks[kp] - w.globals.minX) / this.xRatio,
1587
+ (_c = this.prevSeriesYByX.get(ks[kp++])) != null ? _c : this.zeroY
1588
+ ]);
1589
+ }
1590
+ if (m.length) midsAt[j + 1] = m;
1591
+ }
1557
1592
  } else {
1558
1593
  x = x + this.xDivision;
1559
1594
  }
@@ -1563,9 +1598,7 @@ class Line {
1563
1598
  var _a2;
1564
1599
  for (let pii = pi; pii >= 0; pii--) {
1565
1600
  const ri = (_a2 = seriesIndex == null ? void 0 : seriesIndex[pii]) != null ? _a2 : pii;
1566
- if (w.globals.collapsedSeriesIndices.indexOf(ri) === -1 && w.globals.ancillaryCollapsedSeriesIndices.indexOf(ri) === -1) {
1567
- return pii;
1568
- }
1601
+ if (!this._hidden(ri)) return pii;
1569
1602
  }
1570
1603
  return -1;
1571
1604
  };
@@ -1621,6 +1654,7 @@ class Line {
1621
1654
  j,
1622
1655
  x,
1623
1656
  y,
1657
+ midsAt,
1624
1658
  y2,
1625
1659
  xArrj,
1626
1660
  yArrj,
@@ -1861,7 +1895,7 @@ class Line {
1861
1895
  numericXY: nxs ? { xs: nxs, ys: nys, areaCloseY: bottomY } : void 0
1862
1896
  };
1863
1897
  }
1864
- /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */
1898
+ /** @param {{type: any, series: any, i: any, j: any, x: any, y: any, midsAt: any[][], xArrj: any, yArrj: any, y2: any, y2Arrj: any, pX: any, pY: any, pathState: any, segmentStartX: any, linePath: any, areaPath: any, linePaths: any, areaPaths: any, curve: any, isRangeStart: any}} opts */
1865
1899
  _createPaths({
1866
1900
  type,
1867
1901
  series,
@@ -1869,6 +1903,7 @@ class Line {
1869
1903
  j,
1870
1904
  x,
1871
1905
  y,
1906
+ midsAt,
1872
1907
  xArrj,
1873
1908
  yArrj,
1874
1909
  y2,
@@ -1888,6 +1923,8 @@ class Line {
1888
1923
  const areaBottomY = this.areaBottomY;
1889
1924
  const rangeArea = type === "rangeArea";
1890
1925
  const isLowerRangeAreaPath = type === "rangeArea" && isRangeStart;
1926
+ const mids = midsAt[j + 1];
1927
+ const via = (f) => mids ? [...mids, [x, y]].map(([bx, by], k, a) => f(...k ? a[k - 1] : [pX, pY], bx, by)).join("") : f(pX, pY, x, y);
1891
1928
  switch (curve) {
1892
1929
  case "monotoneCubic": {
1893
1930
  const yAj = isRangeStart ? yArrj : y2Arrj;
@@ -1933,8 +1970,19 @@ class Line {
1933
1970
  }
1934
1971
  // falls through
1935
1972
  case 2: {
1936
- const _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();
1937
- const _yAj = isRangeStart ? yAj : yAj.slice().reverse();
1973
+ let _xAj = isRangeStart ? xArrj : xArrj.slice().reverse();
1974
+ let _yAj = isRangeStart ? yAj : yAj.slice().reverse();
1975
+ if (midsAt.length && !rangeArea) {
1976
+ const P = [];
1977
+ _xAj.forEach((v, k) => {
1978
+ if (_yAj[k] !== null && _yAj[k - 1] != null && midsAt[k]) {
1979
+ P.push(...midsAt[k]);
1980
+ }
1981
+ P.push([v, _yAj[k]]);
1982
+ });
1983
+ _xAj = P.map((p) => p[0]);
1984
+ _yAj = P.map((p) => p[1]);
1985
+ }
1938
1986
  const smoothInputs = getSmoothInputs(_xAj, _yAj);
1939
1987
  const points = smoothInputs.length > 1 ? spline.points(smoothInputs) : smoothInputs;
1940
1988
  let smoothInputsLower = [];
@@ -1993,7 +2041,10 @@ class Line {
1993
2041
  break;
1994
2042
  }
1995
2043
  case "smooth": {
1996
- const length = (x - pX) * 0.35;
2044
+ const toPoint = (ax, ay, bx, by) => {
2045
+ const l = (bx - ax) * 0.35;
2046
+ return graphics.curve(ax + l, ay, bx - l, by, bx, by);
2047
+ };
1997
2048
  if (series[i][j] === null) {
1998
2049
  pathState = 0;
1999
2050
  } else {
@@ -2013,7 +2064,7 @@ class Line {
2013
2064
  }
2014
2065
  pathState = 1;
2015
2066
  if (j < series[i].length - 2) {
2016
- const p = graphics.curve(pX + length, pY, x - length, y, x, y);
2067
+ const p = via(toPoint);
2017
2068
  linePath += p;
2018
2069
  areaPath += p;
2019
2070
  break;
@@ -2031,7 +2082,7 @@ class Line {
2031
2082
  areaPaths.push(areaPath);
2032
2083
  pathState = -1;
2033
2084
  } else {
2034
- const p = graphics.curve(pX + length, pY, x - length, y, x, y);
2085
+ const p = via(toPoint);
2035
2086
  linePath += p;
2036
2087
  areaPath += p;
2037
2088
  if (j >= series[i].length - 2) {
@@ -2052,9 +2103,9 @@ class Line {
2052
2103
  break;
2053
2104
  }
2054
2105
  default: {
2055
- const pathToPoint = (curve2, x2, y3) => {
2106
+ const pathToPoint = (_ax, _ay, x2, y3) => {
2056
2107
  let path = "";
2057
- switch (curve2) {
2108
+ switch (curve) {
2058
2109
  case "stepline":
2059
2110
  path = graphics.line(x2, null, "H") + graphics.line(null, y3, "V");
2060
2111
  break;
@@ -2086,7 +2137,7 @@ class Line {
2086
2137
  }
2087
2138
  pathState = 1;
2088
2139
  if (j < series[i].length - 2) {
2089
- const p = pathToPoint(curve, x, y);
2140
+ const p = via(pathToPoint);
2090
2141
  linePath += p;
2091
2142
  areaPath += p;
2092
2143
  break;
@@ -2104,7 +2155,7 @@ class Line {
2104
2155
  areaPaths.push(areaPath);
2105
2156
  pathState = -1;
2106
2157
  } else {
2107
- const p = pathToPoint(curve, x, y);
2158
+ const p = via(pathToPoint);
2108
2159
  linePath += p;
2109
2160
  areaPath += p;
2110
2161
  if (j >= series[i].length - 2) {