apexcharts 7.3.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.
- package/LICENSE +30 -11
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +545 -463
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.esm.js +984 -801
- package/dist/apexcharts.js +519 -254
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +519 -254
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +20 -10
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +20 -10
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +20 -10
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +20 -10
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +545 -463
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +20 -10
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +199 -26
- package/dist/features/annotations.common.js +1 -1
- package/dist/features/annotations.esm.js +1 -1
- package/dist/features/annotations.js +1 -1
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +1 -1
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/drilldown.js +1 -1
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +2 -2
- package/dist/features/exports.esm.js +12 -14
- package/dist/features/exports.js +2 -2
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +14 -1
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/legend.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +38 -38
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +1 -1
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/morph.js +1 -1
- package/dist/features/perspectives.common.js +1 -1
- package/dist/features/perspectives.esm.js +11 -11
- package/dist/features/perspectives.js +1 -1
- package/dist/features/raincloud.common.js +1 -1
- package/dist/features/raincloud.esm.js +1 -1
- package/dist/features/raincloud.js +1 -1
- package/dist/features/renderer-canvas.common.js +1 -1
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +1 -1
- package/dist/features/stats.common.js +1 -1
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +1 -1
- package/dist/features/storyboard.common.js +1 -1
- package/dist/features/storyboard.esm.js +11 -11
- package/dist/features/storyboard.js +1 -1
- package/dist/features/streamgraph.common.js +1 -1
- package/dist/features/streamgraph.esm.js +1 -1
- package/dist/features/streamgraph.js +1 -1
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +172 -25
- package/dist/features/toolbar.js +2 -2
- package/dist/features/trellis.common.js +1 -1
- package/dist/features/trellis.esm.js +1 -1
- package/dist/features/trellis.js +1 -1
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +2 -2
- package/dist/features/weave.esm.js +15 -2
- package/dist/features/weave.js +2 -2
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +20 -10
- package/dist/line.common.js +1 -1
- package/dist/line.esm.js +1 -1
- package/dist/line.js +1 -1
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +1 -1
- package/dist/raincloud.common.js +2 -2
- package/dist/raincloud.esm.js +20 -10
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +20 -10
- package/dist/scatter.common.js +1 -1
- package/dist/scatter.esm.js +1 -1
- package/dist/streamgraph.common.js +1 -1
- package/dist/streamgraph.esm.js +1 -1
- package/dist/sunburst.common.js +1 -1
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +1 -1
- package/dist/treemap.common.js +1 -1
- package/dist/treemap.esm.js +1 -1
- package/dist/treemap.js +1 -1
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +1 -1
- package/dist/unit.esm.js +79 -79
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +20 -10
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +20 -10
- package/package.json +2 -2
- package/src/apexcharts.js +39 -15
- package/src/charts/common/bar/Helpers.js +31 -12
- package/src/modules/Data.js +8 -2
- package/src/modules/Exports.js +14 -12
- package/src/modules/Formatters.js +24 -1
- package/src/modules/Range.js +28 -1
- package/src/modules/Toolbar.js +112 -2
- package/src/modules/ZoomPanSelection.js +85 -7
- package/src/modules/accessibility/KeyboardNavigation.js +14 -0
- package/src/modules/axes/YAxis.js +12 -15
- package/src/modules/helpers/UpdateHelpers.js +25 -8
- package/src/modules/settings/Globals.js +5 -10
- package/src/modules/settings/Options.js +15 -0
- package/src/modules/weave/PluginAPI.js +21 -1
- package/src/ssr/DOMShim.js +50 -0
- package/src/types/internal.d.ts +1 -1
- package/src/utils/Utils.js +6 -9
- 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.
|
|
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.
|
|
691
|
-
//
|
|
692
|
-
//
|
|
693
|
-
// this way because the series object was copied at capture time.
|
|
694
|
-
//
|
|
695
|
-
//
|
|
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,
|
|
1042
|
-
return "rgb(" + (Math.round((t2 -
|
|
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,
|
|
1050
|
-
return "#" + (16777216 + (Math.round((t2 -
|
|
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
|
|
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(
|
|
1358
|
-
format = format.replace(/(^|[^\\])M/g, "$1" +
|
|
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
|
|
1383
|
-
format = format.replace(/(^|[^\\])TT+/g, "$1" +
|
|
1384
|
-
format = format.replace(/(^|[^\\])T/g, "$1" +
|
|
1385
|
-
const t2 =
|
|
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
|
|
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
|
-
|
|
1433
|
+
K2 += ii(tzHrs) + ":" + ii(tzMin);
|
|
1395
1434
|
}
|
|
1396
|
-
format = format.replace(/(^|[^\\])K/g, "$1" +
|
|
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[
|
|
1401
|
-
format = format.replace(new RegExp(MMM[0], "g"), MMM[
|
|
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
|
-
*
|
|
7625
|
-
*
|
|
7626
|
-
*
|
|
7627
|
-
*
|
|
7628
|
-
*
|
|
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((
|
|
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
|
-
(
|
|
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],
|
|
8982
|
-
if (rx === 0 || ry === 0 ||
|
|
8983
|
-
return [["C",
|
|
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((
|
|
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
|
-
|
|
9063
|
+
A = A.transform(mat);
|
|
9002
9064
|
B = B.transform(mat);
|
|
9003
|
-
k = [B.x -
|
|
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 +
|
|
9013
|
-
OA = new Point(
|
|
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
|
-
|
|
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
|
-
(
|
|
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
|
-
|
|
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((
|
|
17180
|
+
oldY.map((_2, j2) => frameDatumKey(frame, realIndex, j2))
|
|
17121
17181
|
);
|
|
17122
|
-
const newKeys = uniquifyKeys(newY.map((
|
|
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
|
-
(
|
|
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
|
|
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
|
|
21946
|
-
this.threeDSeries.push(
|
|
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
|
|
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
|
-
|
|
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 (
|
|
22867
|
-
result.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 (
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
|
29323
|
-
this.licenseKey === e2 ? this.publish(
|
|
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
|
|
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
|
-
|
|
29388
|
-
let
|
|
29389
|
-
const
|
|
29390
|
-
function
|
|
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
|
|
29395
|
-
if (t2 <= 0) return
|
|
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,
|
|
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 !!
|
|
29475
|
+
return !!W(e2) && (e2.value = e2.target, e2.velocity = 0, true);
|
|
29402
29476
|
}
|
|
29403
|
-
function
|
|
29477
|
+
function _(e2, t2) {
|
|
29404
29478
|
e2.target = t2;
|
|
29405
29479
|
}
|
|
29406
|
-
function
|
|
29480
|
+
function W(e2) {
|
|
29407
29481
|
var _a, _b;
|
|
29408
|
-
const t2 = (_a = e2.restVelocity) != null ? _a :
|
|
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
|
|
29412
|
-
function
|
|
29485
|
+
const V = { crisp: [210, 26], gentle: [120, 20], snappy: [320, 30] };
|
|
29486
|
+
function z(e2) {
|
|
29413
29487
|
var _a;
|
|
29414
|
-
return (_a =
|
|
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 =
|
|
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 =
|
|
29547
|
+
const n2 = C.node(elWrap);
|
|
29474
29548
|
if (!n2) return;
|
|
29475
29549
|
nodeObs.disconnect();
|
|
29476
|
-
|
|
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 (!
|
|
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)
|
|
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
|
-
(
|
|
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
|
-
|
|
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
|
-
|
|
30318
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
|
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
|
-
|
|
32682
|
-
|
|
32683
|
-
|
|
32684
|
-
|
|
32685
|
-
|
|
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
|
-
|
|
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(
|
|
32695
|
-
const values = (
|
|
32696
|
-
/** @type {
|
|
32697
|
-
|
|
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((
|
|
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
|
-
|
|
34459
|
-
|
|
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 = (
|
|
34511
|
-
if (this.t[
|
|
34647
|
+
const zoomSelectionCtrls = (z2) => {
|
|
34648
|
+
if (this.t[z2] && w.config.chart[z2].enabled) {
|
|
34512
34649
|
toolbarControls.push({
|
|
34513
|
-
el:
|
|
34514
|
-
icon: typeof this.t[
|
|
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[
|
|
34654
|
+
this.localeValues[z2 === "zoom" ? "selectionZoom" : "selection"]
|
|
34518
34655
|
),
|
|
34519
|
-
class: `apexcharts-${
|
|
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
|
-
(
|
|
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.
|
|
35273
|
-
*
|
|
35274
|
-
*
|
|
35275
|
-
*
|
|
35276
|
-
*
|
|
35277
|
-
*
|
|
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 =
|
|
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
|
},
|
|
@@ -41566,7 +41821,7 @@ const _WeaveHost = class _WeaveHost {
|
|
|
41566
41821
|
_setScales(xyRatios) {
|
|
41567
41822
|
const w = this.w;
|
|
41568
41823
|
const gl = w.globals;
|
|
41569
|
-
const
|
|
41824
|
+
const L = w.layout;
|
|
41570
41825
|
if (!xyRatios || !gl.axisCharts) {
|
|
41571
41826
|
this._currentScales = null;
|
|
41572
41827
|
return;
|
|
@@ -41577,7 +41832,7 @@ const _WeaveHost = class _WeaveHost {
|
|
|
41577
41832
|
const maxY = (axis) => gl.maxYArr[axis] != null ? gl.maxYArr[axis] : gl.maxY;
|
|
41578
41833
|
const minY = (axis) => gl.minYArr[axis] != null ? gl.minYArr[axis] : gl.minY;
|
|
41579
41834
|
const banded = !w.axisFlags.isXNumeric && !gl.isBarHorizontal && gl.dataPoints > 0;
|
|
41580
|
-
const band = banded ?
|
|
41835
|
+
const band = banded ? L.gridWidth / gl.dataPoints : 0;
|
|
41581
41836
|
this._currentScales = {
|
|
41582
41837
|
x: banded ? (v) => band * (v + 0.5) : (v) => (v - gl.minX) / xRatio,
|
|
41583
41838
|
/**
|
|
@@ -41588,8 +41843,8 @@ const _WeaveHost = class _WeaveHost {
|
|
|
41588
41843
|
domainX: banded ? [-0.5, gl.dataPoints - 0.5] : [gl.minX, gl.maxX],
|
|
41589
41844
|
/** @param {number} [axis] */
|
|
41590
41845
|
domainY: (axis = 0) => [minY(axis), maxY(axis)],
|
|
41591
|
-
gridWidth:
|
|
41592
|
-
gridHeight:
|
|
41846
|
+
gridWidth: L.gridWidth,
|
|
41847
|
+
gridHeight: L.gridHeight,
|
|
41593
41848
|
ratios: xyRatios
|
|
41594
41849
|
};
|
|
41595
41850
|
}
|
|
@@ -41954,14 +42209,14 @@ const _WeaveHost = class _WeaveHost {
|
|
|
41954
42209
|
* @param {string} name
|
|
41955
42210
|
* @param {{ z?: 'front'|'behind', className?: string }} opts
|
|
41956
42211
|
*/
|
|
41957
|
-
_layer(name2, { z = "front", className = "" } = {}) {
|
|
42212
|
+
_layer(name2, { z: z2 = "front", className = "" } = {}) {
|
|
41958
42213
|
let g = this._layers.get(name2);
|
|
41959
42214
|
if (!g) {
|
|
41960
42215
|
g = this.ctx.graphics.group({
|
|
41961
42216
|
class: `apexcharts-plugin-${name2} ${className}`.trim()
|
|
41962
42217
|
});
|
|
41963
42218
|
const parent = this.w.dom.elGraphical.node;
|
|
41964
|
-
if (
|
|
42219
|
+
if (z2 === "behind") parent.insertBefore(g.node, parent.firstChild);
|
|
41965
42220
|
else parent.appendChild(g.node);
|
|
41966
42221
|
g.node.setAttribute("aria-hidden", "true");
|
|
41967
42222
|
this._layers.set(name2, g);
|
|
@@ -42605,8 +42860,8 @@ function kernelDensity(values, opts = {}) {
|
|
|
42605
42860
|
const x = lo + g * step;
|
|
42606
42861
|
let sum = 0;
|
|
42607
42862
|
for (let i2 = 0; i2 < n2; i2++) {
|
|
42608
|
-
const
|
|
42609
|
-
sum += Math.exp(-0.5 *
|
|
42863
|
+
const z2 = (x - sorted[i2]) / h;
|
|
42864
|
+
sum += Math.exp(-0.5 * z2 * z2);
|
|
42610
42865
|
}
|
|
42611
42866
|
density.push([x, sum * norm]);
|
|
42612
42867
|
}
|
|
@@ -43264,7 +43519,7 @@ function dumbbellTransform(ser, w) {
|
|
|
43264
43519
|
values,
|
|
43265
43520
|
order,
|
|
43266
43521
|
carrier: visible.length ? visible[0] : 0,
|
|
43267
|
-
hidden: raw.map((
|
|
43522
|
+
hidden: raw.map((_2, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
|
|
43268
43523
|
};
|
|
43269
43524
|
const carrier = w.dumbbellData.carrier;
|
|
43270
43525
|
return raw.map((s2, k) => __spreadProps(__spreadValues({}, s2), {
|
|
@@ -44069,7 +44324,7 @@ function streamgraphTransform(ser, w) {
|
|
|
44069
44324
|
highs,
|
|
44070
44325
|
order: bandOrder,
|
|
44071
44326
|
offset,
|
|
44072
|
-
hidden: raw.map((
|
|
44327
|
+
hidden: raw.map((_2, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
|
|
44073
44328
|
};
|
|
44074
44329
|
return raw.map((s2, k) => {
|
|
44075
44330
|
const lo = lows[k];
|
|
@@ -44818,7 +45073,7 @@ let Helpers$1 = class Helpers4 {
|
|
|
44818
45073
|
/**
|
|
44819
45074
|
* @param {any} _
|
|
44820
45075
|
*/
|
|
44821
|
-
brArr.map((
|
|
45076
|
+
brArr.map((_2) => "none")
|
|
44822
45077
|
)
|
|
44823
45078
|
);
|
|
44824
45079
|
}
|
|
@@ -45159,7 +45414,7 @@ let Helpers$1 = class Helpers4 {
|
|
|
45159
45414
|
) : null;
|
|
45160
45415
|
const isBar = (i2) => !barIndices || barIndices.has(i2);
|
|
45161
45416
|
if (!groups || groups.length < 2) {
|
|
45162
|
-
const bucket = Array.from({ length: numSeries }, (
|
|
45417
|
+
const bucket = Array.from({ length: numSeries }, (_2, i2) => i2).filter(isBar);
|
|
45163
45418
|
return bucket.length ? [bucket] : [];
|
|
45164
45419
|
}
|
|
45165
45420
|
const buckets = Array.from({ length: groups.length }, () => []);
|
|
@@ -45190,6 +45445,14 @@ let Helpers$1 = class Helpers4 {
|
|
|
45190
45445
|
* second at the top, and nothing else touched. Stacked totals already resolve
|
|
45191
45446
|
* per group (see drawsStackedTotal, #4173); corners never got the same fix.
|
|
45192
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
|
+
*
|
|
45193
45456
|
* @param {any[]} series
|
|
45194
45457
|
* @returns {string[][]}
|
|
45195
45458
|
*/
|
|
@@ -45204,9 +45467,11 @@ let Helpers$1 = class Helpers4 {
|
|
|
45204
45467
|
() => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
|
|
45205
45468
|
);
|
|
45206
45469
|
if (alwaysApplyRadius) return output;
|
|
45207
|
-
const
|
|
45208
|
-
const
|
|
45209
|
-
const
|
|
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";
|
|
45210
45475
|
for (const stack of this.getStackedSeriesIndices(numSeries)) {
|
|
45211
45476
|
for (let j2 = 0; j2 < numColumns; j2++) {
|
|
45212
45477
|
const positiveIndices = [];
|
|
@@ -45218,22 +45483,22 @@ let Helpers$1 = class Helpers4 {
|
|
|
45218
45483
|
}
|
|
45219
45484
|
if (positiveIndices.length > 0 && negativeIndices.length === 0) {
|
|
45220
45485
|
if (positiveIndices.length === 1) {
|
|
45221
|
-
output[positiveIndices[0]][j2] =
|
|
45486
|
+
output[positiveIndices[0]][j2] = soloPositive;
|
|
45222
45487
|
} else {
|
|
45223
45488
|
const first = positiveIndices[0];
|
|
45224
45489
|
const last = positiveIndices[positiveIndices.length - 1];
|
|
45225
45490
|
for (const i2 of positiveIndices) {
|
|
45226
|
-
output[i2][j2] = i2 === first ?
|
|
45491
|
+
output[i2][j2] = i2 === first ? positiveBase : i2 === last ? "top" : "none";
|
|
45227
45492
|
}
|
|
45228
45493
|
}
|
|
45229
45494
|
} else if (negativeIndices.length > 0 && positiveIndices.length === 0) {
|
|
45230
45495
|
if (negativeIndices.length === 1) {
|
|
45231
|
-
output[negativeIndices[0]][j2] =
|
|
45496
|
+
output[negativeIndices[0]][j2] = soloNegative;
|
|
45232
45497
|
} else {
|
|
45233
|
-
const
|
|
45234
|
-
const
|
|
45498
|
+
const nearest = Math.min(...negativeIndices);
|
|
45499
|
+
const farthest = Math.max(...negativeIndices);
|
|
45235
45500
|
for (const i2 of negativeIndices) {
|
|
45236
|
-
output[i2][j2] = i2 ===
|
|
45501
|
+
output[i2][j2] = i2 === nearest ? negativeBase : i2 === farthest ? "bottom" : "none";
|
|
45237
45502
|
}
|
|
45238
45503
|
}
|
|
45239
45504
|
} else if (positiveIndices.length > 0 && negativeIndices.length > 0) {
|
|
@@ -45869,7 +46134,7 @@ let Helpers$1 = class Helpers4 {
|
|
|
45869
46134
|
const w = this.w;
|
|
45870
46135
|
let nonZeroColumns = 0;
|
|
45871
46136
|
let zeroEncounters = 0;
|
|
45872
|
-
const seriesIndices = w.config.plotOptions.bar.horizontal ? w.seriesData.series.map((
|
|
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)) || [];
|
|
45873
46138
|
seriesIndices.forEach((_si) => {
|
|
45874
46139
|
const val = w.globals.seriesPercent[_si][j2];
|
|
45875
46140
|
if (val) {
|
|
@@ -46956,7 +47221,7 @@ class BarStacked extends Bar {
|
|
|
46956
47221
|
series = w.globals.comboCharts ? (
|
|
46957
47222
|
/** @type {any} */
|
|
46958
47223
|
seriesIndex.map(
|
|
46959
|
-
(
|
|
47224
|
+
(_2) => w.globals.seriesPercent[_2]
|
|
46960
47225
|
)
|
|
46961
47226
|
) : w.globals.seriesPercent.slice();
|
|
46962
47227
|
}
|
|
@@ -47755,17 +48020,17 @@ class BoxCandleStick extends Bar {
|
|
|
47755
48020
|
if (this.isHorizontal) {
|
|
47756
48021
|
const yRatio = this.invertedYRatio;
|
|
47757
48022
|
const bh = barHeight != null ? barHeight : 0;
|
|
47758
|
-
const
|
|
48023
|
+
const z2 = zeroW != null ? zeroW : 0;
|
|
47759
48024
|
center = paths.barYPosition + bh / 2;
|
|
47760
48025
|
halfExtent = bh / 2;
|
|
47761
|
-
alongFn = (v) =>
|
|
48026
|
+
alongFn = (v) => z2 + logVal(v) / yRatio;
|
|
47762
48027
|
} else {
|
|
47763
48028
|
const yRatio = this.yRatio[translationsIndex];
|
|
47764
48029
|
const bw = barWidth != null ? barWidth : 0;
|
|
47765
|
-
const
|
|
48030
|
+
const z2 = zeroH != null ? zeroH : 0;
|
|
47766
48031
|
center = paths.barXPosition + bw / 2;
|
|
47767
48032
|
halfExtent = bw / 2;
|
|
47768
|
-
alongFn = (v) =>
|
|
48033
|
+
alongFn = (v) => z2 - logVal(v) / yRatio;
|
|
47769
48034
|
}
|
|
47770
48035
|
const groups = buildJitterGroups({
|
|
47771
48036
|
w,
|
|
@@ -48499,7 +48764,7 @@ class Violin extends Bar {
|
|
|
48499
48764
|
return { nodes: [], maxWeight: 0 };
|
|
48500
48765
|
}
|
|
48501
48766
|
const order = d.values.map(
|
|
48502
|
-
(
|
|
48767
|
+
(_2, k) => k
|
|
48503
48768
|
);
|
|
48504
48769
|
order.sort(
|
|
48505
48770
|
(a2, b) => d.values[a2] - d.values[b]
|
|
@@ -50462,15 +50727,15 @@ class Line {
|
|
|
50462
50727
|
case "monotoneCubic": {
|
|
50463
50728
|
const yAj = isRangeStart ? yArrj : y2Arrj;
|
|
50464
50729
|
const getSmoothInputs = (xArr, yArr) => {
|
|
50465
|
-
return xArr.map((
|
|
50466
|
-
return [
|
|
50467
|
-
}).filter((
|
|
50730
|
+
return xArr.map((_2, i3) => {
|
|
50731
|
+
return [_2, yArr[i3]];
|
|
50732
|
+
}).filter((_2) => _2[1] !== null);
|
|
50468
50733
|
};
|
|
50469
50734
|
const getSegmentLengths = (yArr) => {
|
|
50470
50735
|
const segLens = [];
|
|
50471
50736
|
let count = 0;
|
|
50472
|
-
yArr.forEach((
|
|
50473
|
-
if (
|
|
50737
|
+
yArr.forEach((_2) => {
|
|
50738
|
+
if (_2 !== null) {
|
|
50474
50739
|
count++;
|
|
50475
50740
|
} else if (count > 0) {
|
|
50476
50741
|
segLens.push(count);
|
|
@@ -50517,11 +50782,11 @@ class Line {
|
|
|
50517
50782
|
}
|
|
50518
50783
|
let segmentCount = 0;
|
|
50519
50784
|
let smoothInputsIndex = 0;
|
|
50520
|
-
getSegments(_yAj, points).forEach((
|
|
50785
|
+
getSegments(_yAj, points).forEach((_2) => {
|
|
50521
50786
|
segmentCount++;
|
|
50522
|
-
const svgPoints = svgPath(
|
|
50787
|
+
const svgPoints = svgPath(_2);
|
|
50523
50788
|
const _start = smoothInputsIndex;
|
|
50524
|
-
smoothInputsIndex +=
|
|
50789
|
+
smoothInputsIndex += _2.length;
|
|
50525
50790
|
const _end = smoothInputsIndex - 1;
|
|
50526
50791
|
if (isLowerRangeAreaPath) {
|
|
50527
50792
|
linePath = graphics.move(
|
|
@@ -51004,13 +51269,13 @@ function roundedPieSegmentPath({ cx, cy, rOut, a0, a1, r: r2, spanDeg }) {
|
|
|
51004
51269
|
function sharpDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, spanDeg }) {
|
|
51005
51270
|
const ptAt = (radius, deg) => arcPoint(cx, cy, radius, deg);
|
|
51006
51271
|
const largeArc = spanDeg > 180 ? 1 : 0;
|
|
51007
|
-
const
|
|
51272
|
+
const A = ptAt(rOut, a0);
|
|
51008
51273
|
const B = ptAt(rOut, a1);
|
|
51009
|
-
const
|
|
51274
|
+
const C2 = ptAt(rIn, a1);
|
|
51010
51275
|
const Din = ptAt(rIn, a0);
|
|
51011
51276
|
return [
|
|
51012
51277
|
"M",
|
|
51013
|
-
xy(
|
|
51278
|
+
xy(A),
|
|
51014
51279
|
"A",
|
|
51015
51280
|
rOut,
|
|
51016
51281
|
rOut,
|
|
@@ -51019,7 +51284,7 @@ function sharpDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, spanDeg }) {
|
|
|
51019
51284
|
1,
|
|
51020
51285
|
xy(B),
|
|
51021
51286
|
"L",
|
|
51022
|
-
xy(
|
|
51287
|
+
xy(C2),
|
|
51023
51288
|
"A",
|
|
51024
51289
|
rIn,
|
|
51025
51290
|
rIn,
|
|
@@ -51139,7 +51404,7 @@ class Pie {
|
|
|
51139
51404
|
const w = this.w;
|
|
51140
51405
|
const helpers = new CircularChartsHelpers(w);
|
|
51141
51406
|
const lineSets = (w.seriesData.seriesNames || []).map(
|
|
51142
|
-
(
|
|
51407
|
+
(_2, i2) => this.getExternalLabelLines(i2)
|
|
51143
51408
|
);
|
|
51144
51409
|
const maxLabelWidth = helpers.getMaxLabelWidth(lineSets.flat(), {
|
|
51145
51410
|
fontSize: this.externalLabelStyle.fontSize,
|
|
@@ -53832,7 +54097,7 @@ class RangeBar extends Bar {
|
|
|
53832
54097
|
(_d = (_c = w.config.series[i2].data) == null ? void 0 : _c[j2]) == null ? void 0 : _d.x
|
|
53833
54098
|
);
|
|
53834
54099
|
const labelX = Array.isArray(x) ? x.join(" ") : x;
|
|
53835
|
-
const rowIndex = w.labelData.labels.map((
|
|
54100
|
+
const rowIndex = w.labelData.labels.map((_2) => Array.isArray(_2) ? _2.join(" ") : _2).indexOf(labelX);
|
|
53836
54101
|
const overlappedIndex = w.rangeData.seriesRange[i2].findIndex(
|
|
53837
54102
|
(tx) => {
|
|
53838
54103
|
var _a2;
|
|
@@ -55030,8 +55295,8 @@ class TreemapChart {
|
|
|
55030
55295
|
*/
|
|
55031
55296
|
_zoomEnabled() {
|
|
55032
55297
|
const w = this.w;
|
|
55033
|
-
const
|
|
55034
|
-
if (!
|
|
55298
|
+
const z2 = w.config.plotOptions.treemap.zoom;
|
|
55299
|
+
if (!z2 || !z2.enabled || !this.showParents) return false;
|
|
55035
55300
|
const dd = w.config.drilldown;
|
|
55036
55301
|
if (dd && dd.enabled && Array.isArray(dd.series) && dd.series.length) {
|
|
55037
55302
|
if (!this._warnedZoomConflict) {
|
|
@@ -55123,8 +55388,8 @@ class TreemapChart {
|
|
|
55123
55388
|
}
|
|
55124
55389
|
/** The breadcrumb config: a treemap-local override on the shared block. */
|
|
55125
55390
|
_breadcrumbCfg() {
|
|
55126
|
-
const
|
|
55127
|
-
return breadcrumbConfig(this.w,
|
|
55391
|
+
const z2 = this.w.config.plotOptions.treemap.zoom;
|
|
55392
|
+
return breadcrumbConfig(this.w, z2 && z2.breadcrumb);
|
|
55128
55393
|
}
|
|
55129
55394
|
/**
|
|
55130
55395
|
* Breadcrumb back out of a zoom. Markup, config and accessible semantics are
|
|
@@ -55323,7 +55588,7 @@ class TreemapChart {
|
|
|
55323
55588
|
if (typeof fmt === "function") {
|
|
55324
55589
|
try {
|
|
55325
55590
|
return String(fmt(v, { seriesIndex: 0, dataPointIndex: 0, w }));
|
|
55326
|
-
} catch (
|
|
55591
|
+
} catch (_2) {
|
|
55327
55592
|
}
|
|
55328
55593
|
}
|
|
55329
55594
|
return String(v);
|
|
@@ -55568,7 +55833,7 @@ const PK_CIRCLE = 0;
|
|
|
55568
55833
|
const PK_CORNER = 1;
|
|
55569
55834
|
const PK_GLYPH = 2;
|
|
55570
55835
|
function springParams(preset, speed) {
|
|
55571
|
-
const [stiffness, damping] =
|
|
55836
|
+
const [stiffness, damping] = z(
|
|
55572
55837
|
/** @type {import('apex-commons').SpringPreset|undefined} */
|
|
55573
55838
|
preset
|
|
55574
55839
|
);
|
|
@@ -55812,7 +56077,7 @@ class Unit {
|
|
|
55812
56077
|
r: typeof p.r === "number" && p.r > 0 ? p.r : void 0
|
|
55813
56078
|
});
|
|
55814
56079
|
});
|
|
55815
|
-
const clusters = counts.map((
|
|
56080
|
+
const clusters = counts.map((_2, i2) => ({
|
|
55816
56081
|
i: i2,
|
|
55817
56082
|
cx: gw / 2,
|
|
55818
56083
|
cy: gh / 2,
|
|
@@ -55919,7 +56184,7 @@ class Unit {
|
|
|
55919
56184
|
const gw = w.layout.gridWidth;
|
|
55920
56185
|
const gh = w.layout.gridHeight;
|
|
55921
56186
|
const labelSpace = opts.clusterLabels && opts.clusterLabels.show ? 30 : 6;
|
|
55922
|
-
const visible = counts.map((
|
|
56187
|
+
const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
|
|
55923
56188
|
const Kv = Math.max(1, visible.length);
|
|
55924
56189
|
const slotOf = new Array(counts.length).fill(-1);
|
|
55925
56190
|
visible.forEach((i2, s2) => slotOf[i2] = s2);
|
|
@@ -55934,7 +56199,7 @@ class Unit {
|
|
|
55934
56199
|
const cy = labelSpace + availH / 2;
|
|
55935
56200
|
const outerRs = counts.map((n2) => step * Math.sqrt(Math.max(1, n2)) + dotR);
|
|
55936
56201
|
const cellCentre = (i2) => slotOf[i2] >= 0 ? cellW * (slotOf[i2] + 0.5) : gw / 2;
|
|
55937
|
-
let centers = counts.map((
|
|
56202
|
+
let centers = counts.map((_2, i2) => cellCentre(i2));
|
|
55938
56203
|
const visOuter = visible.map((i2) => outerRs[i2]);
|
|
55939
56204
|
let overlap = false;
|
|
55940
56205
|
for (let s2 = 1; s2 < Kv; s2++) {
|
|
@@ -55959,10 +56224,10 @@ class Unit {
|
|
|
55959
56224
|
} else {
|
|
55960
56225
|
const lo = visOuter[0];
|
|
55961
56226
|
const hi = gw - visOuter[Kv - 1];
|
|
55962
|
-
visCenters = visOuter.map((
|
|
56227
|
+
visCenters = visOuter.map((_2, s2) => lo + (hi - lo) * s2 / (Kv - 1));
|
|
55963
56228
|
}
|
|
55964
56229
|
centers = counts.map(
|
|
55965
|
-
(
|
|
56230
|
+
(_2, i2) => slotOf[i2] >= 0 ? visCenters[slotOf[i2]] : gw / 2
|
|
55966
56231
|
);
|
|
55967
56232
|
}
|
|
55968
56233
|
return counts.map((n2, i2) => ({
|
|
@@ -55994,11 +56259,11 @@ class Unit {
|
|
|
55994
56259
|
this._lastDotR = this._dotRadiusFromStep(step, opts);
|
|
55995
56260
|
const cx = gw / 2;
|
|
55996
56261
|
const cy = labelSpace + (gh - labelSpace) / 2;
|
|
55997
|
-
const order = counts.map((
|
|
56262
|
+
const order = counts.map((_2, i2) => i2);
|
|
55998
56263
|
if (opts.sortByGroup !== false) {
|
|
55999
56264
|
order.sort((a2, b) => counts[a2] - counts[b]);
|
|
56000
56265
|
}
|
|
56001
|
-
const clusters = counts.map((
|
|
56266
|
+
const clusters = counts.map((_2, i2) => ({
|
|
56002
56267
|
i: i2,
|
|
56003
56268
|
cx,
|
|
56004
56269
|
cy,
|
|
@@ -56070,7 +56335,7 @@ class Unit {
|
|
|
56070
56335
|
}
|
|
56071
56336
|
}
|
|
56072
56337
|
seats.sort((s1, s2) => s1.a - s2.a);
|
|
56073
|
-
const clusters = counts.map((
|
|
56338
|
+
const clusters = counts.map((_2, i2) => ({
|
|
56074
56339
|
i: i2,
|
|
56075
56340
|
cx,
|
|
56076
56341
|
cy,
|
|
@@ -56131,11 +56396,11 @@ class Unit {
|
|
|
56131
56396
|
const spacing = opts.spacing > 0 ? opts.spacing : 1.05;
|
|
56132
56397
|
const absSpan = Math.abs(span) || Math.PI;
|
|
56133
56398
|
const fixed = this._fixedRadius(opts);
|
|
56134
|
-
const evalR = (
|
|
56135
|
-
|
|
56399
|
+
const evalR = (R) => {
|
|
56400
|
+
R = Math.max(1, Math.round(R));
|
|
56136
56401
|
const radii = [];
|
|
56137
|
-
for (let r2 = 0; r2 <
|
|
56138
|
-
radii.push(
|
|
56402
|
+
for (let r2 = 0; r2 < R; r2++) {
|
|
56403
|
+
radii.push(R === 1 ? (r0 + r1) / 2 : r0 + (r1 - r0) * (r2 / (R - 1)));
|
|
56139
56404
|
}
|
|
56140
56405
|
const weightSum = radii.reduce((a2, x) => a2 + x, 0) || 1;
|
|
56141
56406
|
const raw = radii.map((rho) => total * rho / weightSum);
|
|
@@ -56148,19 +56413,19 @@ class Unit {
|
|
|
56148
56413
|
}
|
|
56149
56414
|
});
|
|
56150
56415
|
while (left > 0) {
|
|
56151
|
-
seatsPerRow[
|
|
56416
|
+
seatsPerRow[R - 1]++;
|
|
56152
56417
|
left--;
|
|
56153
56418
|
}
|
|
56154
|
-
const radialPitch =
|
|
56419
|
+
const radialPitch = R === 1 ? r1 - r0 || r1 : (r1 - r0) / (R - 1);
|
|
56155
56420
|
let minArcPitch = Infinity;
|
|
56156
|
-
for (let r2 = 0; r2 <
|
|
56421
|
+
for (let r2 = 0; r2 < R; r2++) {
|
|
56157
56422
|
const n2 = seatsPerRow[r2];
|
|
56158
56423
|
if (n2 <= 0) continue;
|
|
56159
56424
|
const arcPitch = radii[r2] * absSpan / n2;
|
|
56160
56425
|
if (arcPitch < minArcPitch) minArcPitch = arcPitch;
|
|
56161
56426
|
}
|
|
56162
56427
|
const pitch = Math.min(radialPitch, minArcPitch);
|
|
56163
|
-
return { R
|
|
56428
|
+
return { R, radii, seatsPerRow, dotR: Math.max(1, pitch / (2 * spacing)) };
|
|
56164
56429
|
};
|
|
56165
56430
|
const arcRows = opts.arc && opts.arc.rows;
|
|
56166
56431
|
let res;
|
|
@@ -56172,8 +56437,8 @@ class Unit {
|
|
|
56172
56437
|
} else {
|
|
56173
56438
|
const maxR = Math.max(1, Math.min(40, Math.ceil(Math.sqrt(total)) + 6));
|
|
56174
56439
|
res = evalR(1);
|
|
56175
|
-
for (let
|
|
56176
|
-
const cand = evalR(
|
|
56440
|
+
for (let R = 2; R <= maxR; R++) {
|
|
56441
|
+
const cand = evalR(R);
|
|
56177
56442
|
if (cand.dotR > res.dotR) res = cand;
|
|
56178
56443
|
}
|
|
56179
56444
|
}
|
|
@@ -56197,7 +56462,7 @@ class Unit {
|
|
|
56197
56462
|
const labelsOn = !!(opts.clusterLabels && opts.clusterLabels.show);
|
|
56198
56463
|
const labelsBelow = labelsOn && opts.clusterLabels.position === "bottom";
|
|
56199
56464
|
const topPad = labelsOn && !labelsBelow ? 30 : 6;
|
|
56200
|
-
const visible = counts.map((
|
|
56465
|
+
const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
|
|
56201
56466
|
const Kv = Math.max(1, visible.length);
|
|
56202
56467
|
const slotOf = new Array(counts.length).fill(-1);
|
|
56203
56468
|
visible.forEach((i2, s2) => slotOf[i2] = s2);
|
|
@@ -56312,7 +56577,7 @@ class Unit {
|
|
|
56312
56577
|
const originX = (gw - blockW) / 2 + pitch / 2;
|
|
56313
56578
|
const topY = labelSpace + (availH - blockH) / 2;
|
|
56314
56579
|
const rowY = (rowIdx) => fillFrom === "bottom" ? topY + blockH - pitch / 2 - rowIdx * pitch : topY + pitch / 2 + rowIdx * pitch;
|
|
56315
|
-
const clusters = counts.map((
|
|
56580
|
+
const clusters = counts.map((_2, i2) => ({
|
|
56316
56581
|
i: i2,
|
|
56317
56582
|
cx: gw / 2,
|
|
56318
56583
|
cy: labelSpace + availH / 2,
|
|
@@ -56358,14 +56623,14 @@ class Unit {
|
|
|
56358
56623
|
const fillFrom = gcfg.fillFrom === "top" ? "top" : "bottom";
|
|
56359
56624
|
const cellsPerTile = Math.max(1, Math.round(gcfg.total > 0 ? gcfg.total : 100));
|
|
56360
56625
|
const rowsPerTile = Math.max(1, Math.ceil(cellsPerTile / cols));
|
|
56361
|
-
const visible = counts.map((
|
|
56362
|
-
const
|
|
56626
|
+
const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
|
|
56627
|
+
const K2 = Math.max(1, visible.length);
|
|
56363
56628
|
const denom = gcfg.max > 0 ? gcfg.max : Math.max(1, ...counts);
|
|
56364
56629
|
const tileCols = Math.max(
|
|
56365
56630
|
1,
|
|
56366
|
-
Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(
|
|
56631
|
+
Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(K2)))
|
|
56367
56632
|
);
|
|
56368
|
-
const tileRows = Math.max(1, Math.ceil(
|
|
56633
|
+
const tileRows = Math.max(1, Math.ceil(K2 / tileCols));
|
|
56369
56634
|
const labelsOn = !(opts.clusterLabels && opts.clusterLabels.show === false);
|
|
56370
56635
|
const labelsBelow = labelsOn && opts.clusterLabels && opts.clusterLabels.position === "bottom";
|
|
56371
56636
|
const topBand = labelsOn && !labelsBelow ? 22 : 4;
|
|
@@ -56485,7 +56750,7 @@ class Unit {
|
|
|
56485
56750
|
(cat) => Array.isArray(cat) ? cat.map(valueOf) : []
|
|
56486
56751
|
);
|
|
56487
56752
|
const isNum = (v) => v != null && isFinite(v);
|
|
56488
|
-
const visible = catVals.map((
|
|
56753
|
+
const visible = catVals.map((_2, i2) => i2).filter((i2) => catVals[i2].some(isNum));
|
|
56489
56754
|
const Kv = Math.max(1, visible.length);
|
|
56490
56755
|
let vmin = Infinity;
|
|
56491
56756
|
let vmax = -Infinity;
|
|
@@ -56604,7 +56869,7 @@ class Unit {
|
|
|
56604
56869
|
(cat) => Array.isArray(cat) ? cat.map(valueOf) : []
|
|
56605
56870
|
);
|
|
56606
56871
|
const isNum = (v) => v != null && isFinite(v);
|
|
56607
|
-
const visible = catVals.map((
|
|
56872
|
+
const visible = catVals.map((_2, i2) => i2).filter((i2) => catVals[i2].some(isNum));
|
|
56608
56873
|
const Kv = Math.max(1, visible.length);
|
|
56609
56874
|
let vmin = Infinity;
|
|
56610
56875
|
let vmax = -Infinity;
|
|
@@ -56721,7 +56986,7 @@ class Unit {
|
|
|
56721
56986
|
const isNum = (v) => typeof v === "number" && isFinite(v);
|
|
56722
56987
|
const xOf = (d) => d && typeof d === "object" ? d.x : null;
|
|
56723
56988
|
const yOf = (d) => d && typeof d === "object" ? d.y != null ? d.y : d.value : null;
|
|
56724
|
-
const visible = unitData.map((
|
|
56989
|
+
const visible = unitData.map((_2, i2) => i2).filter(
|
|
56725
56990
|
(i2) => (unitData[i2] || []).some((d) => isNum(xOf(d)) && isNum(yOf(d)))
|
|
56726
56991
|
);
|
|
56727
56992
|
let xmn = Infinity;
|
|
@@ -56859,10 +57124,10 @@ class Unit {
|
|
|
56859
57124
|
let zmax = -Infinity;
|
|
56860
57125
|
unitData.forEach(
|
|
56861
57126
|
(cat) => (cat || []).forEach((d) => {
|
|
56862
|
-
const
|
|
56863
|
-
if (typeof
|
|
56864
|
-
if (
|
|
56865
|
-
if (
|
|
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;
|
|
56866
57131
|
}
|
|
56867
57132
|
})
|
|
56868
57133
|
);
|
|
@@ -56879,9 +57144,9 @@ class Unit {
|
|
|
56879
57144
|
*/
|
|
56880
57145
|
_scatterRadius(d, st, fallback) {
|
|
56881
57146
|
if (!st) return fallback;
|
|
56882
|
-
const
|
|
56883
|
-
if (typeof
|
|
56884
|
-
const t2 = st.zmax > st.zmin ? (
|
|
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;
|
|
56885
57150
|
const tc = Math.max(0, Math.min(1, t2));
|
|
56886
57151
|
const aMin = st.rMin * st.rMin;
|
|
56887
57152
|
const aMax = st.rMax * st.rMax;
|
|
@@ -57677,8 +57942,8 @@ class Unit {
|
|
|
57677
57942
|
for (let k = 0; k < dots.length; k++) {
|
|
57678
57943
|
const d = dots[k];
|
|
57679
57944
|
const carried = live && !d.isEnter && d.key != null ? live.get(d.key) : null;
|
|
57680
|
-
const sx = carried ? carried.x :
|
|
57681
|
-
const sy = carried ? carried.y :
|
|
57945
|
+
const sx = carried ? carried.x : $(d.cx0, stiffness, damping);
|
|
57946
|
+
const sy = carried ? carried.y : $(d.cy0, stiffness, damping);
|
|
57682
57947
|
if (carried) {
|
|
57683
57948
|
sx.stiffness = stiffness;
|
|
57684
57949
|
sy.stiffness = stiffness;
|
|
@@ -57762,12 +58027,12 @@ class Unit {
|
|
|
57762
58027
|
let cx, cy;
|
|
57763
58028
|
if (d.sx && d.sy) {
|
|
57764
58029
|
if (elapsed >= 0 && !d.released) {
|
|
57765
|
-
|
|
57766
|
-
|
|
58030
|
+
_(d.sx, d.x);
|
|
58031
|
+
_(d.sy, d.y);
|
|
57767
58032
|
d.released = true;
|
|
57768
58033
|
}
|
|
57769
|
-
const restX =
|
|
57770
|
-
const restY =
|
|
58034
|
+
const restX = q(d.sx, dt);
|
|
58035
|
+
const restY = q(d.sy, dt);
|
|
57771
58036
|
if (!d.released || !restX || !restY) done = false;
|
|
57772
58037
|
cx = d.sx.value;
|
|
57773
58038
|
cy = d.sy.value;
|
|
@@ -58099,14 +58364,14 @@ ${percent.toFixed(1)}%`;
|
|
|
58099
58364
|
textEl.setAttribute("font-weight", String(cfg.fontWeight || 600));
|
|
58100
58365
|
textEl.setAttribute("fill", cfg.color || color);
|
|
58101
58366
|
const bottom = cfg.position === "bottom";
|
|
58102
|
-
const
|
|
58367
|
+
const R = cluster.outerR + fontSize * 0.6 + 3 + (cfg.offsetY || 0);
|
|
58103
58368
|
const estWidth = str.length * fontSize * 0.55;
|
|
58104
|
-
const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI *
|
|
58369
|
+
const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI * R * 0.95;
|
|
58105
58370
|
if (curved) {
|
|
58106
58371
|
const yMid = cluster.cy;
|
|
58107
|
-
const x1 = cluster.cx -
|
|
58108
|
-
const x2 = cluster.cx +
|
|
58109
|
-
const d = `M ${x1} ${yMid} A ${
|
|
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}`;
|
|
58110
58375
|
const arcId = `apexcharts-unit-label-${w.globals.chartID}-${cluster.i}`;
|
|
58111
58376
|
const pathEl = BrowserAPIs.createElementNS(NS, "path");
|
|
58112
58377
|
pathEl.setAttribute("id", arcId);
|