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
package/dist/apexcharts.js
CHANGED
|
@@ -42,7 +42,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
/*!
|
|
45
|
-
* ApexCharts v7.
|
|
45
|
+
* ApexCharts v7.4.0
|
|
46
46
|
* (c) 2018-2026 ApexCharts
|
|
47
47
|
*/
|
|
48
48
|
|
|
@@ -82,6 +82,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
82
82
|
return {};
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
const CHAR_WIDTH_EM = 0.55;
|
|
86
|
+
const ASCENT_EM = 0.917;
|
|
87
|
+
const DESCENT_EM = 0.25;
|
|
88
|
+
const LINE_HEIGHT_EM = 1.1;
|
|
89
|
+
const DEFAULT_FONT_SIZE = 11;
|
|
85
90
|
class SSRElement {
|
|
86
91
|
/**
|
|
87
92
|
* @param {string} nodeName
|
|
@@ -202,6 +207,43 @@ var __async = (__this, __arguments, generator) => {
|
|
|
202
207
|
y: 0
|
|
203
208
|
};
|
|
204
209
|
}
|
|
210
|
+
getBBox() {
|
|
211
|
+
if (this.nodeName !== "text" && this.nodeName !== "tspan") {
|
|
212
|
+
return { x: 0, y: 0, width: 0, height: 0 };
|
|
213
|
+
}
|
|
214
|
+
const lines = this._textLines();
|
|
215
|
+
const longest = lines.reduce((acc, line) => Math.max(acc, line.length), 0);
|
|
216
|
+
if (!longest) {
|
|
217
|
+
return { x: 0, y: 0, width: 0, height: 0 };
|
|
218
|
+
}
|
|
219
|
+
const fontSize = parseFloat(this.attributes.get("font-size")) || DEFAULT_FONT_SIZE;
|
|
220
|
+
const width = longest * fontSize * CHAR_WIDTH_EM;
|
|
221
|
+
const height = fontSize * (ASCENT_EM + DESCENT_EM) + (lines.length - 1) * fontSize * LINE_HEIGHT_EM;
|
|
222
|
+
const anchor = this.attributes.get("text-anchor");
|
|
223
|
+
const x = parseFloat(this.attributes.get("x")) || 0;
|
|
224
|
+
const y = parseFloat(this.attributes.get("y")) || 0;
|
|
225
|
+
return {
|
|
226
|
+
x: anchor === "middle" ? x - width / 2 : anchor === "end" ? x - width : x,
|
|
227
|
+
y: y - fontSize * ASCENT_EM,
|
|
228
|
+
width,
|
|
229
|
+
height
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Text of this element, one entry per rendered line
|
|
234
|
+
* @returns {string[]}
|
|
235
|
+
*/
|
|
236
|
+
_textLines() {
|
|
237
|
+
var _a;
|
|
238
|
+
const tspans = this.children.filter((child) => child.nodeName === "tspan");
|
|
239
|
+
if (tspans.length) {
|
|
240
|
+
return tspans.map((tspan) => {
|
|
241
|
+
var _a2;
|
|
242
|
+
return String((_a2 = tspan.textContent) != null ? _a2 : "");
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
return [String((_a = this.textContent) != null ? _a : "")];
|
|
246
|
+
}
|
|
205
247
|
getRootNode() {
|
|
206
248
|
let root = this;
|
|
207
249
|
while (root.parentNode) {
|
|
@@ -691,15 +733,12 @@ var __async = (__this, __arguments, generator) => {
|
|
|
691
733
|
return output;
|
|
692
734
|
}
|
|
693
735
|
// A per-series shallow copy: the series OBJECTS are copied, their data arrays
|
|
694
|
-
// are shared.
|
|
695
|
-
//
|
|
696
|
-
//
|
|
697
|
-
// this way because the series object was copied at capture time.
|
|
698
|
-
//
|
|
699
|
-
//
|
|
700
|
-
// note above defineLazyInitialSeries(). This is the same cheap shape
|
|
701
|
-
// `globals.initialSeries` captures, so snapshotting a config stays O(n)
|
|
702
|
-
// instead of deep-cloning every point.
|
|
736
|
+
// are shared. Every internal "mutation" of a series' data is a property
|
|
737
|
+
// REPLACEMENT (`series[i].data = []` on legend collapse, `series[i] = 0` for
|
|
738
|
+
// non-axis charts, appendData's concat), and those cannot reach a copy made
|
|
739
|
+
// this way because the series object was copied at capture time. This is the
|
|
740
|
+
// same cheap shape `globals.initialSeries` captures, so snapshotting a config
|
|
741
|
+
// stays O(n) instead of deep-cloning every point.
|
|
703
742
|
/**
|
|
704
743
|
* @param {any} series
|
|
705
744
|
*/
|
|
@@ -1042,16 +1081,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1042
1081
|
* @param {string} color
|
|
1043
1082
|
*/
|
|
1044
1083
|
shadeRGBColor(percent, color) {
|
|
1045
|
-
const f = color.split(","), t2 = percent < 0 ? 0 : 255, p = percent < 0 ? percent * -1 : percent,
|
|
1046
|
-
return "rgb(" + (Math.round((t2 -
|
|
1084
|
+
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);
|
|
1085
|
+
return "rgb(" + (Math.round((t2 - R) * p) + R) + "," + (Math.round((t2 - G) * p) + G) + "," + (Math.round((t2 - B) * p) + B) + ")";
|
|
1047
1086
|
}
|
|
1048
1087
|
/**
|
|
1049
1088
|
* @param {number} percent
|
|
1050
1089
|
* @param {string} color
|
|
1051
1090
|
*/
|
|
1052
1091
|
shadeHexColor(percent, color) {
|
|
1053
|
-
const f = parseInt(color.slice(1), 16), t2 = percent < 0 ? 0 : 255, p = percent < 0 ? percent * -1 : percent,
|
|
1054
|
-
return "#" + (16777216 + (Math.round((t2 -
|
|
1092
|
+
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;
|
|
1093
|
+
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);
|
|
1055
1094
|
}
|
|
1056
1095
|
// beautiful color shading blending code
|
|
1057
1096
|
// http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors
|
|
@@ -1355,11 +1394,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1355
1394
|
format = format.replace(/(^|[^\\])yyyy+/g, "$1" + y);
|
|
1356
1395
|
format = format.replace(/(^|[^\\])yy/g, "$1" + y.toString().substr(2, 2));
|
|
1357
1396
|
format = format.replace(/(^|[^\\])y/g, "$1" + y);
|
|
1358
|
-
const
|
|
1397
|
+
const M = (utc ? date.getUTCMonth() : date.getMonth()) + 1;
|
|
1359
1398
|
format = format.replace(/(^|[^\\])MMMM+/g, "$1" + MMMM[0]);
|
|
1360
1399
|
format = format.replace(/(^|[^\\])MMM/g, "$1" + MMM[0]);
|
|
1361
|
-
format = format.replace(/(^|[^\\])MM/g, "$1" + ii(
|
|
1362
|
-
format = format.replace(/(^|[^\\])M/g, "$1" +
|
|
1400
|
+
format = format.replace(/(^|[^\\])MM/g, "$1" + ii(M));
|
|
1401
|
+
format = format.replace(/(^|[^\\])M/g, "$1" + M);
|
|
1363
1402
|
const d = utc ? date.getUTCDate() : date.getDate();
|
|
1364
1403
|
format = format.replace(/(^|[^\\])dddd+/g, "$1" + dddd[0]);
|
|
1365
1404
|
format = format.replace(/(^|[^\\])ddd/g, "$1" + ddd[0]);
|
|
@@ -1383,26 +1422,26 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1383
1422
|
format = format.replace(/(^|[^\\])ff/g, "$1" + ii(f));
|
|
1384
1423
|
f = Math.round(f / 10);
|
|
1385
1424
|
format = format.replace(/(^|[^\\])f/g, "$1" + f);
|
|
1386
|
-
const
|
|
1387
|
-
format = format.replace(/(^|[^\\])TT+/g, "$1" +
|
|
1388
|
-
format = format.replace(/(^|[^\\])T/g, "$1" +
|
|
1389
|
-
const t2 =
|
|
1425
|
+
const T = H < 12 ? "AM" : "PM";
|
|
1426
|
+
format = format.replace(/(^|[^\\])TT+/g, "$1" + T);
|
|
1427
|
+
format = format.replace(/(^|[^\\])T/g, "$1" + T.charAt(0));
|
|
1428
|
+
const t2 = T.toLowerCase();
|
|
1390
1429
|
format = format.replace(/(^|[^\\])tt+/g, "$1" + t2);
|
|
1391
1430
|
format = format.replace(/(^|[^\\])t/g, "$1" + t2.charAt(0));
|
|
1392
1431
|
let tz = -date.getTimezoneOffset();
|
|
1393
|
-
let
|
|
1432
|
+
let K2 = utc || !tz ? "Z" : tz > 0 ? "+" : "-";
|
|
1394
1433
|
if (!utc) {
|
|
1395
1434
|
tz = Math.abs(tz);
|
|
1396
1435
|
const tzHrs = Math.floor(tz / 60);
|
|
1397
1436
|
const tzMin = tz % 60;
|
|
1398
|
-
|
|
1437
|
+
K2 += ii(tzHrs) + ":" + ii(tzMin);
|
|
1399
1438
|
}
|
|
1400
|
-
format = format.replace(/(^|[^\\])K/g, "$1" +
|
|
1439
|
+
format = format.replace(/(^|[^\\])K/g, "$1" + K2);
|
|
1401
1440
|
const day = (utc ? date.getUTCDay() : date.getDay()) + 1;
|
|
1402
1441
|
format = format.replace(new RegExp(dddd[0], "g"), dddd[day]);
|
|
1403
1442
|
format = format.replace(new RegExp(ddd[0], "g"), ddd[day]);
|
|
1404
|
-
format = format.replace(new RegExp(MMMM[0], "g"), MMMM[
|
|
1405
|
-
format = format.replace(new RegExp(MMM[0], "g"), MMM[
|
|
1443
|
+
format = format.replace(new RegExp(MMMM[0], "g"), MMMM[M]);
|
|
1444
|
+
format = format.replace(new RegExp(MMM[0], "g"), MMM[M]);
|
|
1406
1445
|
format = format.replace(/\\(.)/g, "$1");
|
|
1407
1446
|
return format;
|
|
1408
1447
|
}
|
|
@@ -1870,6 +1909,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1870
1909
|
setLabelFormatters() {
|
|
1871
1910
|
const w = this.w;
|
|
1872
1911
|
const fmt = w.formatters;
|
|
1912
|
+
const inferredNumericX = w.axisFlags.isXNumeric && w.axisFlags.dataFormatXNumeric && w.config.xaxis.type !== "datetime" && !w.config.xaxis.convertedCatToNumeric && !w.globals.isBarHorizontal;
|
|
1873
1913
|
fmt.xaxisTooltipFormatter = (val) => {
|
|
1874
1914
|
return this.defaultGeneralFormatter(val);
|
|
1875
1915
|
};
|
|
@@ -1886,8 +1926,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1886
1926
|
fmt.xLabelFormatter = w.config.xaxis.labels.formatter;
|
|
1887
1927
|
} else {
|
|
1888
1928
|
fmt.xLabelFormatter = (val) => {
|
|
1929
|
+
var _a;
|
|
1889
1930
|
if (Utils$1.isNumber(val)) {
|
|
1890
|
-
if (!w.config.xaxis.convertedCatToNumeric && w.config.xaxis.type === "numeric") {
|
|
1931
|
+
if (!w.config.xaxis.convertedCatToNumeric && (w.config.xaxis.type === "numeric" || inferredNumericX)) {
|
|
1932
|
+
const ticks = (_a = w.globals.xAxisScale) == null ? void 0 : _a.result;
|
|
1933
|
+
if (inferredNumericX && Array.isArray(ticks) && ticks.every(Number.isInteger)) {
|
|
1934
|
+
return val.toFixed(0);
|
|
1935
|
+
}
|
|
1891
1936
|
if (Utils$1.isNumber(w.config.xaxis.decimalsInFloat)) {
|
|
1892
1937
|
return val.toFixed(w.config.xaxis.decimalsInFloat);
|
|
1893
1938
|
} else {
|
|
@@ -1913,6 +1958,12 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1913
1958
|
}
|
|
1914
1959
|
if (typeof w.config.tooltip.x.formatter === "function") {
|
|
1915
1960
|
fmt.ttKeyFormatter = w.config.tooltip.x.formatter;
|
|
1961
|
+
} else if (w.config.xaxis.labels.formatter === void 0 && inferredNumericX) {
|
|
1962
|
+
const xLabelFormatter = (
|
|
1963
|
+
/** @type {(val: any) => any} */
|
|
1964
|
+
fmt.xLabelFormatter
|
|
1965
|
+
);
|
|
1966
|
+
fmt.ttKeyFormatter = (val) => Number.isInteger(val) ? val.toFixed(0) : xLabelFormatter(val);
|
|
1916
1967
|
} else {
|
|
1917
1968
|
fmt.ttKeyFormatter = fmt.xLabelFormatter;
|
|
1918
1969
|
}
|
|
@@ -2771,6 +2822,17 @@ var __async = (__this, __arguments, generator) => {
|
|
|
2771
2822
|
// around the pinch centroid (matching the x-only wheel/toolbar zoom),
|
|
2772
2823
|
// frame-by-frame rather than the 400ms wheel throttle.
|
|
2773
2824
|
pinch: "auto",
|
|
2825
|
+
// Drag-to-zoom is deliberate, so it is not gated the way those two
|
|
2826
|
+
// are: it stays on with the toolbar hidden. The reset button that
|
|
2827
|
+
// undoes it does not, which leaves the viewer in a window with no
|
|
2828
|
+
// exit. So while the chart IS zoomed and nothing else on screen can
|
|
2829
|
+
// reset it, one reset control is drawn where the toolbar would have
|
|
2830
|
+
// been, and it goes when the range does. A chart nobody zooms is
|
|
2831
|
+
// untouched. Set false for a page that supplies its own reset (which
|
|
2832
|
+
// also turns off the Escape shortcut), or true to force the control
|
|
2833
|
+
// on whenever the chart is zoomed, even where `toolbar.tools.reset`
|
|
2834
|
+
// is off.
|
|
2835
|
+
resetControl: "auto",
|
|
2774
2836
|
zoomedArea: {
|
|
2775
2837
|
fill: {
|
|
2776
2838
|
color: "#90CAF9",
|
|
@@ -2837,6 +2899,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
2837
2899
|
borderRadius: 0,
|
|
2838
2900
|
borderRadiusApplication: "around",
|
|
2839
2901
|
// [around, end]
|
|
2902
|
+
// Which segments of a stack round. 'all' caps both ends of the
|
|
2903
|
+
// stack (baseline and far end); 'last' caps only the far end, so
|
|
2904
|
+
// the stack sits square on the baseline. Stacked charts only.
|
|
2905
|
+
borderRadiusWhenStacked: "all",
|
|
2906
|
+
// [all, last]
|
|
2840
2907
|
rangeBarOverlap: true,
|
|
2841
2908
|
rangeBarGroupRows: false,
|
|
2842
2909
|
hideZeroBarsWhenGrouped: false,
|
|
@@ -7625,16 +7692,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
7625
7692
|
* which cannot reach the captured copies because each series object was
|
|
7626
7693
|
* copied at capture time.
|
|
7627
7694
|
*
|
|
7628
|
-
*
|
|
7629
|
-
*
|
|
7630
|
-
*
|
|
7631
|
-
*
|
|
7632
|
-
*
|
|
7633
|
-
* case is not honoured for a separate, older reason: Data.parseData()
|
|
7634
|
-
* re-captures initialSeries unconditionally on the re-render appendData
|
|
7635
|
-
* triggers. Detaching would mean copying the data arrays, which is exactly
|
|
7636
|
-
* the per-point cost this snapshot exists to avoid. The same exception
|
|
7637
|
-
* applies to `initialConfig.series`, which is captured with the same shape.
|
|
7695
|
+
* appendData() used to be the exception, growing the shared data array in
|
|
7696
|
+
* place. It now replaces the array instead (`data = data.concat(newData)`):
|
|
7697
|
+
* one array copy per call, against the per-point cost this snapshot exists
|
|
7698
|
+
* to avoid. With that, no internal edit can reach a captured copy. The same
|
|
7699
|
+
* holds for `initialConfig.series`, which is captured with the same shape.
|
|
7638
7700
|
*
|
|
7639
7701
|
* @param {Record<string, any>} globals
|
|
7640
7702
|
*/
|
|
@@ -8211,7 +8273,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
8211
8273
|
includedIndexes.push(si);
|
|
8212
8274
|
}
|
|
8213
8275
|
});
|
|
8214
|
-
const excludedIndices = w.seriesData.series.map((
|
|
8276
|
+
const excludedIndices = w.seriesData.series.map((_2, fi) => includedIndexes.indexOf(fi) === -1 ? fi : -1).filter((f) => f !== -1);
|
|
8215
8277
|
total.push(this.getStackedSeriesTotals(excludedIndices));
|
|
8216
8278
|
});
|
|
8217
8279
|
return total;
|
|
@@ -8616,7 +8678,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
8616
8678
|
_gl.yLogRatio = yRatio.slice();
|
|
8617
8679
|
_gl.logYRange = /** @type {any[]} */
|
|
8618
8680
|
gl.yRange.map(
|
|
8619
|
-
(
|
|
8681
|
+
(_2, i2) => {
|
|
8620
8682
|
const yAxisIndex = w.globals.seriesYAxisReverseMap[i2];
|
|
8621
8683
|
if (w.config.yaxis[yAxisIndex] && this.w.config.yaxis[yAxisIndex].logarithmic) {
|
|
8622
8684
|
const range = 1;
|
|
@@ -8982,11 +9044,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
8982
9044
|
return false;
|
|
8983
9045
|
}
|
|
8984
9046
|
function arcToBezier(pos, val) {
|
|
8985
|
-
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],
|
|
8986
|
-
if (rx === 0 || ry === 0 ||
|
|
8987
|
-
return [["C",
|
|
9047
|
+
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;
|
|
9048
|
+
if (rx === 0 || ry === 0 || A.x === B.x && A.y === B.y) {
|
|
9049
|
+
return [["C", A.x, A.y, B.x, B.y, B.x, B.y]];
|
|
8988
9050
|
}
|
|
8989
|
-
primedCoord = new Point((
|
|
9051
|
+
primedCoord = new Point((A.x - B.x) / 2, (A.y - B.y) / 2).transform(
|
|
8990
9052
|
// Start with the identity matrix (no args → Matrix defaults a=d=1, others 0).
|
|
8991
9053
|
// Passing all-zero args here would produce a degenerate zero matrix, since
|
|
8992
9054
|
// `0 ?? 1` is `0`, not `1` — every subsequent transform then yields (0,0)
|
|
@@ -9002,9 +9064,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
9002
9064
|
}
|
|
9003
9065
|
mat = /** @type {any} */
|
|
9004
9066
|
new Matrix().rotate(xAxisRotation).scale(1 / rx, 1 / ry).rotate(-xAxisRotation);
|
|
9005
|
-
|
|
9067
|
+
A = A.transform(mat);
|
|
9006
9068
|
B = B.transform(mat);
|
|
9007
|
-
k = [B.x -
|
|
9069
|
+
k = [B.x - A.x, B.y - A.y];
|
|
9008
9070
|
cSquare = k[0] * k[0] + k[1] * k[1];
|
|
9009
9071
|
c = Math.sqrt(cSquare);
|
|
9010
9072
|
k[0] /= c;
|
|
@@ -9013,8 +9075,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
9013
9075
|
if (largeArcFlag === sweepFlag) {
|
|
9014
9076
|
t2 *= -1;
|
|
9015
9077
|
}
|
|
9016
|
-
O2 = new Point((B.x +
|
|
9017
|
-
OA = new Point(
|
|
9078
|
+
O2 = new Point((B.x + A.x) / 2 + t2 * -k[1], (B.y + A.y) / 2 + t2 * k[0]);
|
|
9079
|
+
OA = new Point(A.x - O2.x, A.y - O2.y);
|
|
9018
9080
|
OB = new Point(B.x - O2.x, B.y - O2.y);
|
|
9019
9081
|
tetaStart = Math.acos(OA.x / Math.sqrt(OA.x * OA.x + OA.y * OA.y));
|
|
9020
9082
|
if (OA.y < 0) tetaStart *= -1;
|
|
@@ -9645,7 +9707,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
9645
9707
|
_reducedMotionMql = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
9646
9708
|
}
|
|
9647
9709
|
return !!_reducedMotionMql.matches;
|
|
9648
|
-
} catch (
|
|
9710
|
+
} catch (_2) {
|
|
9649
9711
|
return false;
|
|
9650
9712
|
}
|
|
9651
9713
|
}
|
|
@@ -10008,7 +10070,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10008
10070
|
if (typeof node.getTotalLength === "function") {
|
|
10009
10071
|
len = node.getTotalLength();
|
|
10010
10072
|
}
|
|
10011
|
-
} catch (
|
|
10073
|
+
} catch (_2) {
|
|
10012
10074
|
len = 0;
|
|
10013
10075
|
}
|
|
10014
10076
|
if (!len) {
|
|
@@ -15531,7 +15593,17 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15531
15593
|
let ticks = 10;
|
|
15532
15594
|
if (cnf.xaxis.tickAmount === void 0) {
|
|
15533
15595
|
ticks = Math.round(gl.svgWidth / 150);
|
|
15534
|
-
|
|
15596
|
+
const inferredNumericX = this.w.axisFlags.isXNumeric && this.w.axisFlags.dataFormatXNumeric && cnf.xaxis.type !== "datetime" && !cnf.xaxis.convertedCatToNumeric && !gl.isBarHorizontal;
|
|
15597
|
+
const fontSize = parseFloat(cnf.xaxis.labels.style.fontSize) || 12;
|
|
15598
|
+
const widestLabelLength = this.w.labelData.labels.reduce(
|
|
15599
|
+
(widest, seriesLabels) => Array.isArray(seriesLabels) ? seriesLabels.reduce(
|
|
15600
|
+
(seriesWidest, label) => Math.max(seriesWidest, String(label).length),
|
|
15601
|
+
widest
|
|
15602
|
+
) : widest,
|
|
15603
|
+
0
|
|
15604
|
+
);
|
|
15605
|
+
const allPointLabelsFit = gl.dataPoints * widestLabelLength * fontSize * 0.6 <= gl.svgWidth;
|
|
15606
|
+
if ((cnf.xaxis.type === "numeric" || inferredNumericX && allPointLabelsFit) && gl.dataPoints < 30) {
|
|
15535
15607
|
ticks = gl.dataPoints - 1;
|
|
15536
15608
|
}
|
|
15537
15609
|
if (ticks > gl.dataPoints && gl.dataPoints !== 0) {
|
|
@@ -15755,7 +15827,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15755
15827
|
});
|
|
15756
15828
|
Object.entries(stackedPoss).forEach(([key]) => {
|
|
15757
15829
|
stackedPoss[key].forEach(
|
|
15758
|
-
(
|
|
15830
|
+
(_2, stgi) => {
|
|
15759
15831
|
gl.maxY = Math.max(gl.maxY, stackedPoss[key][stgi]);
|
|
15760
15832
|
gl.minY = Math.min(gl.minY, stackedNegs[key][stgi]);
|
|
15761
15833
|
}
|
|
@@ -16226,42 +16298,30 @@ var __async = (__this, __arguments, generator) => {
|
|
|
16226
16298
|
}
|
|
16227
16299
|
setYAxisTextAlignments() {
|
|
16228
16300
|
const w = this.w;
|
|
16229
|
-
|
|
16230
|
-
w.dom.baseEl.getElementsByClassName("apexcharts-yaxis")
|
|
16231
|
-
);
|
|
16232
|
-
yaxis.forEach((y, index) => {
|
|
16233
|
-
const yaxe = w.config.yaxis[index];
|
|
16301
|
+
w.config.yaxis.forEach((yaxe, index) => {
|
|
16234
16302
|
if (yaxe && !yaxe.floating && yaxe.labels.align !== void 0) {
|
|
16235
16303
|
const yAxisInner = w.dom.baseEl.querySelector(
|
|
16236
16304
|
`.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-texts-g`
|
|
16237
16305
|
);
|
|
16306
|
+
if (!yAxisInner) return;
|
|
16238
16307
|
const yAxisTexts = Array.from(
|
|
16239
16308
|
w.dom.baseEl.querySelectorAll(
|
|
16240
16309
|
`.apexcharts-yaxis[rel='${index}'] .apexcharts-yaxis-label`
|
|
16241
16310
|
)
|
|
16242
16311
|
);
|
|
16243
|
-
const rect = (
|
|
16244
|
-
/** @type {Element} */
|
|
16245
|
-
yAxisInner.getBoundingClientRect()
|
|
16246
|
-
);
|
|
16312
|
+
const rect = yAxisInner.getBoundingClientRect();
|
|
16247
16313
|
yAxisTexts.forEach((label) => {
|
|
16248
16314
|
label.setAttribute("text-anchor", yaxe.labels.align);
|
|
16249
16315
|
});
|
|
16250
16316
|
if (yaxe.labels.align === "left" && !yaxe.opposite) {
|
|
16251
|
-
yAxisInner.setAttribute(
|
|
16252
|
-
"transform",
|
|
16253
|
-
`translate(-${rect.width}, 0)`
|
|
16254
|
-
);
|
|
16317
|
+
yAxisInner.setAttribute("transform", `translate(-${rect.width}, 0)`);
|
|
16255
16318
|
} else if (yaxe.labels.align === "center") {
|
|
16256
16319
|
yAxisInner.setAttribute(
|
|
16257
16320
|
"transform",
|
|
16258
16321
|
`translate(${rect.width / 2 * (!yaxe.opposite ? -1 : 1)}, 0)`
|
|
16259
16322
|
);
|
|
16260
16323
|
} else if (yaxe.labels.align === "right" && yaxe.opposite) {
|
|
16261
|
-
yAxisInner.setAttribute(
|
|
16262
|
-
"transform",
|
|
16263
|
-
`translate(${rect.width}, 0)`
|
|
16264
|
-
);
|
|
16324
|
+
yAxisInner.setAttribute("transform", `translate(${rect.width}, 0)`);
|
|
16265
16325
|
}
|
|
16266
16326
|
}
|
|
16267
16327
|
});
|
|
@@ -17121,9 +17181,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17121
17181
|
if (!Array.isArray(oldY) || !Array.isArray(newY)) return null;
|
|
17122
17182
|
if (!oldY.length || !newY.length) return null;
|
|
17123
17183
|
const oldKeys = uniquifyKeys(
|
|
17124
|
-
oldY.map((
|
|
17184
|
+
oldY.map((_2, j2) => frameDatumKey(frame, realIndex, j2))
|
|
17125
17185
|
);
|
|
17126
|
-
const newKeys = uniquifyKeys(newY.map((
|
|
17186
|
+
const newKeys = uniquifyKeys(newY.map((_2, j2) => datumKey(w, realIndex, j2)));
|
|
17127
17187
|
const join = joinKeys(oldKeys, newKeys);
|
|
17128
17188
|
if (!join.ordered && !allowReorder) return null;
|
|
17129
17189
|
if (!join.changed && !includeIdentity) return null;
|
|
@@ -17313,7 +17373,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17313
17373
|
origin = Math.abs(start.y - (bb.y + bb.height)) <= Math.abs(start.y - bb.y) ? "center bottom" : "center top";
|
|
17314
17374
|
}
|
|
17315
17375
|
}
|
|
17316
|
-
} catch (
|
|
17376
|
+
} catch (_2) {
|
|
17317
17377
|
}
|
|
17318
17378
|
const style = node.style;
|
|
17319
17379
|
style.transformBox = "fill-box";
|
|
@@ -17430,7 +17490,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17430
17490
|
xScale: currentXScale(w),
|
|
17431
17491
|
yAnchors: currentYAnchors(w, yLabels)
|
|
17432
17492
|
};
|
|
17433
|
-
} catch (
|
|
17493
|
+
} catch (_2) {
|
|
17434
17494
|
gl.prevChromeFrame = null;
|
|
17435
17495
|
}
|
|
17436
17496
|
}
|
|
@@ -17622,7 +17682,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17622
17682
|
if (!chrome || !gl.axisCharts || !Environment.isBrowser()) return;
|
|
17623
17683
|
if (!lengthTransitionEnabled(w)) return;
|
|
17624
17684
|
const anyMotion = (w.seriesData.series || []).some(
|
|
17625
|
-
(
|
|
17685
|
+
(_2, i2) => seriesJoin(w, i2, true, true) !== null
|
|
17626
17686
|
);
|
|
17627
17687
|
if (!anyMotion) return;
|
|
17628
17688
|
const root = w.dom.baseEl;
|
|
@@ -17663,7 +17723,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17663
17723
|
ease,
|
|
17664
17724
|
project: projY
|
|
17665
17725
|
});
|
|
17666
|
-
} catch (
|
|
17726
|
+
} catch (_2) {
|
|
17667
17727
|
}
|
|
17668
17728
|
}
|
|
17669
17729
|
const DL_GROUP_SEL = ".apexcharts-data-labels[data\\:dlKey]";
|
|
@@ -17723,7 +17783,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17723
17783
|
});
|
|
17724
17784
|
});
|
|
17725
17785
|
gl.prevDataLabels = map.size ? map : null;
|
|
17726
|
-
} catch (
|
|
17786
|
+
} catch (_2) {
|
|
17727
17787
|
gl.prevDataLabels = null;
|
|
17728
17788
|
}
|
|
17729
17789
|
}
|
|
@@ -17786,7 +17846,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17786
17846
|
if (typeof formatter === "function") {
|
|
17787
17847
|
try {
|
|
17788
17848
|
out = formatter(rounded, fmtOpts);
|
|
17789
|
-
} catch (
|
|
17849
|
+
} catch (_2) {
|
|
17790
17850
|
out = rounded;
|
|
17791
17851
|
}
|
|
17792
17852
|
}
|
|
@@ -17900,7 +17960,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17900
17960
|
});
|
|
17901
17961
|
}
|
|
17902
17962
|
});
|
|
17903
|
-
} catch (
|
|
17963
|
+
} catch (_2) {
|
|
17904
17964
|
}
|
|
17905
17965
|
}
|
|
17906
17966
|
class Series {
|
|
@@ -21929,7 +21989,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21929
21989
|
const point = data[j2];
|
|
21930
21990
|
const x = point[0];
|
|
21931
21991
|
const y = point[1];
|
|
21932
|
-
const
|
|
21992
|
+
const z2 = point[2];
|
|
21933
21993
|
if (typeof y !== "undefined") {
|
|
21934
21994
|
if (Array.isArray(y) && y.length === 4 && !isBoxPlot) {
|
|
21935
21995
|
this.twoDSeries.push(Utils$1.parseNumber(y[3]));
|
|
@@ -21946,8 +22006,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21946
22006
|
} else {
|
|
21947
22007
|
this.twoDSeriesX.push(x);
|
|
21948
22008
|
}
|
|
21949
|
-
if (typeof
|
|
21950
|
-
this.threeDSeries.push(
|
|
22009
|
+
if (typeof z2 !== "undefined") {
|
|
22010
|
+
this.threeDSeries.push(z2);
|
|
21951
22011
|
this.w.axisFlags.isDataXYZ = true;
|
|
21952
22012
|
}
|
|
21953
22013
|
}
|
|
@@ -22829,7 +22889,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22829
22889
|
}
|
|
22830
22890
|
const x = this.getNestedValue(item, effectiveParsing.x);
|
|
22831
22891
|
let y;
|
|
22832
|
-
let
|
|
22892
|
+
let z2 = void 0;
|
|
22833
22893
|
if (Array.isArray(effectiveParsing.y)) {
|
|
22834
22894
|
const yValues = effectiveParsing.y.map(
|
|
22835
22895
|
(fieldName) => this.getNestedValue(item, fieldName)
|
|
@@ -22848,7 +22908,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22848
22908
|
y = this.getNestedValue(item, effectiveParsing.y);
|
|
22849
22909
|
}
|
|
22850
22910
|
if (effectiveParsing.z) {
|
|
22851
|
-
|
|
22911
|
+
z2 = this.getNestedValue(item, effectiveParsing.z);
|
|
22852
22912
|
}
|
|
22853
22913
|
if (x === void 0) {
|
|
22854
22914
|
console.warn(
|
|
@@ -22867,8 +22927,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22867
22927
|
result.z = zValue;
|
|
22868
22928
|
}
|
|
22869
22929
|
}
|
|
22870
|
-
if (
|
|
22871
|
-
result.z =
|
|
22930
|
+
if (z2 !== void 0) {
|
|
22931
|
+
result.z = z2;
|
|
22872
22932
|
}
|
|
22873
22933
|
return result;
|
|
22874
22934
|
}
|
|
@@ -23140,8 +23200,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23140
23200
|
// Segregate user provided data into appropriate vars
|
|
23141
23201
|
/**
|
|
23142
23202
|
* @param {any[]} ser
|
|
23203
|
+
* @param {boolean} [overwriteInitialSeries=true] false when the caller hands
|
|
23204
|
+
* back the series the chart already has (an internal re-render), so the
|
|
23205
|
+
* baseline resetSeries() restores must not move.
|
|
23143
23206
|
*/
|
|
23144
|
-
parseData(ser) {
|
|
23207
|
+
parseData(ser, overwriteInitialSeries = true) {
|
|
23145
23208
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
23146
23209
|
const w = this.w;
|
|
23147
23210
|
const cnf = w.config;
|
|
@@ -23174,7 +23237,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23174
23237
|
ser = ser.map((s2) => __spreadValues({}, s2));
|
|
23175
23238
|
}
|
|
23176
23239
|
cnf.series = ser;
|
|
23177
|
-
if (
|
|
23240
|
+
if (!overwriteInitialSeries) ;
|
|
23241
|
+
else if (gl.dataReducerRawSeries && ((_g = cnf.chart.dataReducer) == null ? void 0 : _g.enabled)) {
|
|
23178
23242
|
const stash = gl.dataReducerRawSeries;
|
|
23179
23243
|
gl.initialSeries = ser.map((s2, i2) => {
|
|
23180
23244
|
var _a2, _b2, _c2;
|
|
@@ -23614,7 +23678,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23614
23678
|
);
|
|
23615
23679
|
initialConfig.series = !options2.series && prevInitialSeries ? prevInitialSeries : Utils$1.copySeriesShallow(w.config.series);
|
|
23616
23680
|
w.globals.initialConfig = initialConfig;
|
|
23617
|
-
|
|
23681
|
+
if (options2.series) {
|
|
23682
|
+
w.globals.initialSeries = w.config.series;
|
|
23683
|
+
}
|
|
23618
23684
|
}
|
|
23619
23685
|
if (options2.series && (w.globals.collapsedSeriesIndices.length > 0 || w.globals.ancillaryCollapsedSeriesIndices.length > 0)) {
|
|
23620
23686
|
ch.series.reconcileCollapsedByName();
|
|
@@ -23663,14 +23729,20 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23663
23729
|
w.globals.streamgraphRawSeries = null;
|
|
23664
23730
|
w.globals.treemapRawSeries = null;
|
|
23665
23731
|
}
|
|
23732
|
+
const definedSeries = newSeries;
|
|
23733
|
+
let reconciledCollapses = false;
|
|
23666
23734
|
if (w.globals.axisCharts && (w.globals.collapsedSeriesIndices.length > 0 || w.globals.ancillaryCollapsedSeriesIndices.length > 0)) {
|
|
23667
23735
|
newSeries = newSeries.map(
|
|
23668
23736
|
(s2) => s2 && typeof s2 === "object" ? __spreadValues({}, s2) : s2
|
|
23669
23737
|
);
|
|
23670
23738
|
this.ctx.series.reconcileCollapsedByName(newSeries);
|
|
23739
|
+
reconciledCollapses = true;
|
|
23671
23740
|
}
|
|
23672
23741
|
this.ctx.data.resetParsingFlags();
|
|
23673
|
-
const parsedState = this.ctx.data.parseData(
|
|
23742
|
+
const parsedState = this.ctx.data.parseData(
|
|
23743
|
+
newSeries,
|
|
23744
|
+
overwriteInitialSeries
|
|
23745
|
+
);
|
|
23674
23746
|
this.ctx._writeParsedSeriesData(parsedState.seriesData);
|
|
23675
23747
|
this.ctx._writeParsedRangeData(parsedState.rangeData);
|
|
23676
23748
|
this.ctx._writeParsedCandleData(parsedState.candleData);
|
|
@@ -23679,10 +23751,12 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23679
23751
|
if (overwriteInitialSeries) {
|
|
23680
23752
|
if (w.globals.initialConfig) {
|
|
23681
23753
|
w.globals.initialConfig.series = Utils$1.copySeriesShallow(
|
|
23682
|
-
w.config.series
|
|
23754
|
+
reconciledCollapses ? definedSeries : w.config.series
|
|
23683
23755
|
);
|
|
23684
23756
|
}
|
|
23685
|
-
|
|
23757
|
+
if (reconciledCollapses) {
|
|
23758
|
+
w.globals.initialSeries = definedSeries;
|
|
23759
|
+
}
|
|
23686
23760
|
}
|
|
23687
23761
|
if (this._canUseFastPath(newSeries, prevSeriesCount, prevDataLengths, w)) {
|
|
23688
23762
|
return this.ctx.fastUpdate(animate, prevAxisScaleSig).then(() => {
|
|
@@ -29323,14 +29397,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29323
29397
|
const t2 = __spreadProps(__spreadValues({}, n2), { signatureVerified: true });
|
|
29324
29398
|
return void (this.licenseKey === e2 ? this.publish(t2) : this.notify(t2));
|
|
29325
29399
|
}
|
|
29326
|
-
const
|
|
29327
|
-
this.licenseKey === e2 ? this.publish(
|
|
29400
|
+
const u = "Invalid license key. The license signature does not verify.", h = { data: i2.data, expired: false, message: u, signatureVerified: true, valid: false };
|
|
29401
|
+
this.licenseKey === e2 ? this.publish(h) : this.notify(h), t(`[Apex] ${u}`);
|
|
29328
29402
|
});
|
|
29329
29403
|
}
|
|
29330
29404
|
};
|
|
29331
29405
|
l.publicKeysSpki = ["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="], l.verdicts = /* @__PURE__ */ new Map(), l.verifying = /* @__PURE__ */ new Set(), l.warnedUnverifiable = false, l.epoch = 0;
|
|
29332
29406
|
let o = l;
|
|
29333
|
-
const
|
|
29407
|
+
const j = class {
|
|
29334
29408
|
static applyStyles(e2) {
|
|
29335
29409
|
Object.assign(e2.style, this.CRITICAL_STYLES, { backgroundImage: this.createWatermarkPattern(), backgroundRepeat: "repeat" });
|
|
29336
29410
|
}
|
|
@@ -29388,34 +29462,34 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29388
29462
|
})));
|
|
29389
29463
|
}
|
|
29390
29464
|
};
|
|
29391
|
-
|
|
29392
|
-
let
|
|
29393
|
-
const
|
|
29394
|
-
function
|
|
29465
|
+
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;
|
|
29466
|
+
let C = j;
|
|
29467
|
+
const D = 0.05, K = 0.05, O = 1 / 45;
|
|
29468
|
+
function $(e2, t2, s2, i2) {
|
|
29395
29469
|
const n2 = { value: e2, velocity: 0, target: e2, stiffness: t2, damping: s2 };
|
|
29396
29470
|
return n2;
|
|
29397
29471
|
}
|
|
29398
|
-
function
|
|
29399
|
-
if (t2 <= 0) return
|
|
29472
|
+
function q(e2, t2) {
|
|
29473
|
+
if (t2 <= 0) return W(e2);
|
|
29400
29474
|
let s2 = t2;
|
|
29401
29475
|
for (; s2 > 0; ) {
|
|
29402
|
-
const t3 = Math.min(s2,
|
|
29476
|
+
const t3 = Math.min(s2, O), i2 = -e2.stiffness * (e2.value - e2.target) - e2.damping * e2.velocity;
|
|
29403
29477
|
e2.velocity += i2 * t3, e2.value += e2.velocity * t3, s2 -= t3;
|
|
29404
29478
|
}
|
|
29405
|
-
return !!
|
|
29479
|
+
return !!W(e2) && (e2.value = e2.target, e2.velocity = 0, true);
|
|
29406
29480
|
}
|
|
29407
|
-
function
|
|
29481
|
+
function _(e2, t2) {
|
|
29408
29482
|
e2.target = t2;
|
|
29409
29483
|
}
|
|
29410
|
-
function
|
|
29484
|
+
function W(e2) {
|
|
29411
29485
|
var _a, _b;
|
|
29412
|
-
const t2 = (_a = e2.restVelocity) != null ? _a :
|
|
29486
|
+
const t2 = (_a = e2.restVelocity) != null ? _a : D, s2 = (_b = e2.restDisplacement) != null ? _b : K;
|
|
29413
29487
|
return Math.abs(e2.velocity) < t2 && Math.abs(e2.value - e2.target) < s2;
|
|
29414
29488
|
}
|
|
29415
|
-
const
|
|
29416
|
-
function
|
|
29489
|
+
const V = { crisp: [210, 26], gentle: [120, 20], snappy: [320, 30] };
|
|
29490
|
+
function z(e2) {
|
|
29417
29491
|
var _a;
|
|
29418
|
-
return (_a =
|
|
29492
|
+
return (_a = V[e2 != null ? e2 : "crisp"]) != null ? _a : V.crisp;
|
|
29419
29493
|
}
|
|
29420
29494
|
const PRICING_URL = "https://apexcharts.com/pricing";
|
|
29421
29495
|
let _perspectivesTokenDecoded = false;
|
|
@@ -29469,15 +29543,15 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29469
29543
|
return typeof plan === "string" && PREMIUM_PLANS.has(plan.toLowerCase());
|
|
29470
29544
|
}
|
|
29471
29545
|
function reinstateWatermark(ctx, elWrap) {
|
|
29472
|
-
const node =
|
|
29546
|
+
const node = C.add(elWrap, { manage: false });
|
|
29473
29547
|
if (!node || typeof MutationObserver === "undefined") return;
|
|
29474
29548
|
if (ctx._wmNodeObserver && ctx._wmObservedNode === node) return;
|
|
29475
29549
|
if (ctx._wmNodeObserver) ctx._wmNodeObserver.disconnect();
|
|
29476
29550
|
const nodeObs = new MutationObserver(() => {
|
|
29477
|
-
const n2 =
|
|
29551
|
+
const n2 = C.node(elWrap);
|
|
29478
29552
|
if (!n2) return;
|
|
29479
29553
|
nodeObs.disconnect();
|
|
29480
|
-
|
|
29554
|
+
C.applyStyles(n2);
|
|
29481
29555
|
nodeObs.takeRecords();
|
|
29482
29556
|
nodeObs.observe(n2, { attributes: true, attributeFilter: ["style"] });
|
|
29483
29557
|
});
|
|
@@ -29489,7 +29563,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29489
29563
|
reinstateWatermark(ctx, elWrap);
|
|
29490
29564
|
if (typeof MutationObserver === "undefined" || ctx._wmWrapObserver) return;
|
|
29491
29565
|
const wrapObs = new MutationObserver(() => {
|
|
29492
|
-
if (!
|
|
29566
|
+
if (!C.node(elWrap)) reinstateWatermark(ctx, elWrap);
|
|
29493
29567
|
});
|
|
29494
29568
|
wrapObs.observe(elWrap, { childList: true });
|
|
29495
29569
|
ctx._wmWrapObserver = wrapObs;
|
|
@@ -29505,7 +29579,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29505
29579
|
}
|
|
29506
29580
|
ctx._wmObservedNode = null;
|
|
29507
29581
|
const wrap = elWrap || ctx.w && ctx.w.dom && ctx.w.dom.elWrap;
|
|
29508
|
-
if (wrap)
|
|
29582
|
+
if (wrap) C.remove(wrap, { manage: false });
|
|
29509
29583
|
}
|
|
29510
29584
|
function notifyTrial(ctx, key, features) {
|
|
29511
29585
|
if (ctx._premiumLicenseNotified) return;
|
|
@@ -29882,8 +29956,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29882
29956
|
/**
|
|
29883
29957
|
* @param {any[]} ser
|
|
29884
29958
|
* @param {object} opts
|
|
29959
|
+
* @param {boolean} [overwriteInitialSeries=true]
|
|
29885
29960
|
*/
|
|
29886
|
-
create(ser, opts) {
|
|
29961
|
+
create(ser, opts, overwriteInitialSeries = true) {
|
|
29887
29962
|
var _a, _b, _c, _d, _e, _f;
|
|
29888
29963
|
const w = this.w;
|
|
29889
29964
|
if (!this.core) {
|
|
@@ -29930,7 +30005,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29930
30005
|
if (Environment.isBrowser()) {
|
|
29931
30006
|
this.events.setupEventHandlers();
|
|
29932
30007
|
}
|
|
29933
|
-
const parsedState = this.data.parseData(series);
|
|
30008
|
+
const parsedState = this.data.parseData(series, overwriteInitialSeries);
|
|
29934
30009
|
this._writeParsedSeriesData(parsedState.seriesData);
|
|
29935
30010
|
this._writeParsedRangeData(parsedState.rangeData);
|
|
29936
30011
|
this._writeParsedCandleData(parsedState.candleData);
|
|
@@ -29997,7 +30072,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
29997
30072
|
const me = this;
|
|
29998
30073
|
const w = me.w;
|
|
29999
30074
|
return new Promise((resolve, reject) => {
|
|
30000
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
30075
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
30001
30076
|
if (me.el === null) {
|
|
30002
30077
|
return reject(
|
|
30003
30078
|
new Error("Not enough data to display or target element not found")
|
|
@@ -30095,9 +30170,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
30095
30170
|
}
|
|
30096
30171
|
if (w.config.chart.toolbar.show && !w.globals.allSeriesCollapsed) {
|
|
30097
30172
|
(_k = me.toolbar) == null ? void 0 : _k.createToolbar();
|
|
30173
|
+
} else if (!w.globals.allSeriesCollapsed && ((_l = me.toolbar) == null ? void 0 : _l.resetControlDue())) {
|
|
30174
|
+
me.toolbar.createToolbar({ resetOnly: true });
|
|
30098
30175
|
}
|
|
30099
30176
|
}
|
|
30100
|
-
(
|
|
30177
|
+
(_m = me.weave) == null ? void 0 : _m.dispatch("draw", {
|
|
30101
30178
|
pass: "full",
|
|
30102
30179
|
xyRatios: graphData == null ? void 0 : graphData.xyRatios
|
|
30103
30180
|
});
|
|
@@ -30286,6 +30363,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
30286
30363
|
* @returns {Promise<ApexCharts>} Resolves with the chart instance after re-render.
|
|
30287
30364
|
*/
|
|
30288
30365
|
appendData(newData, overwriteInitialSeries = true) {
|
|
30366
|
+
var _a;
|
|
30289
30367
|
const me = this;
|
|
30290
30368
|
me.data.resetParsingFlags();
|
|
30291
30369
|
me.w.globals.dataChanged = true;
|
|
@@ -30300,14 +30378,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
30300
30378
|
newData[i2]
|
|
30301
30379
|
);
|
|
30302
30380
|
if (src && Array.isArray(src.data) && Array.isArray(derivedRaw[i2].data)) {
|
|
30303
|
-
|
|
30304
|
-
derivedRaw[i2].data.push(src.data[j2]);
|
|
30305
|
-
}
|
|
30381
|
+
derivedRaw[i2].data = derivedRaw[i2].data.concat(src.data);
|
|
30306
30382
|
}
|
|
30307
30383
|
}
|
|
30308
|
-
return this.update();
|
|
30384
|
+
return this.update(void 0, overwriteInitialSeries);
|
|
30309
30385
|
}
|
|
30310
30386
|
const newSeries = me.w.config.series.slice();
|
|
30387
|
+
const reducerRaw = me.w.globals.dataReducerRawSeries;
|
|
30311
30388
|
for (let i2 = 0; i2 < newSeries.length; i2++) {
|
|
30312
30389
|
if (newData[i2] !== null && typeof newData[i2] !== "undefined") {
|
|
30313
30390
|
const srcSerie = (
|
|
@@ -30318,17 +30395,15 @@ var __async = (__this, __arguments, generator) => {
|
|
|
30318
30395
|
/** @type {any} */
|
|
30319
30396
|
newSeries[i2]
|
|
30320
30397
|
);
|
|
30321
|
-
|
|
30322
|
-
|
|
30398
|
+
dstSerie.data = dstSerie.data.concat(srcSerie.data);
|
|
30399
|
+
if (reducerRaw && Array.isArray((_a = reducerRaw[i2]) == null ? void 0 : _a.data)) {
|
|
30400
|
+
reducerRaw[i2].data = reducerRaw[i2].data.concat(srcSerie.data);
|
|
30323
30401
|
}
|
|
30324
30402
|
}
|
|
30325
30403
|
}
|
|
30326
30404
|
trimStreamingSeries(newSeries, me.w);
|
|
30327
30405
|
me.w.config.series = newSeries;
|
|
30328
|
-
|
|
30329
|
-
me.w.globals.initialSeries = me.w.config.series;
|
|
30330
|
-
}
|
|
30331
|
-
return this.update();
|
|
30406
|
+
return this.update(void 0, overwriteInitialSeries);
|
|
30332
30407
|
}
|
|
30333
30408
|
/**
|
|
30334
30409
|
* True when an options object carries enough series data that a
|
|
@@ -30350,15 +30425,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
30350
30425
|
}
|
|
30351
30426
|
/**
|
|
30352
30427
|
* @param {object} [options]
|
|
30428
|
+
* @param {boolean} [overwriteInitialSeries=false] true only when the caller
|
|
30429
|
+
* redefined the series before triggering this re-render, so the parse it
|
|
30430
|
+
* runs is the one that captures the new baseline.
|
|
30353
30431
|
*/
|
|
30354
|
-
update(options2) {
|
|
30432
|
+
update(options2, overwriteInitialSeries = false) {
|
|
30355
30433
|
return new Promise((resolve, reject) => {
|
|
30356
30434
|
if (options2 && this.lastUpdateOptions && !_ApexCharts._optionsTooBigToCompare(options2) && Utils$1.stringifyForCompare(this.lastUpdateOptions) === Utils$1.stringifyForCompare(options2)) {
|
|
30357
30435
|
return resolve(this);
|
|
30358
30436
|
}
|
|
30359
30437
|
this.lastUpdateOptions = options2 && !_ApexCharts._optionsTooBigToCompare(options2) ? Utils$1.clone(options2) : null;
|
|
30360
30438
|
new Destroy(this.ctx).clear({ isUpdating: true });
|
|
30361
|
-
const graphData = this.create(
|
|
30439
|
+
const graphData = this.create(
|
|
30440
|
+
this.w.config.series,
|
|
30441
|
+
options2 != null ? options2 : {},
|
|
30442
|
+
overwriteInitialSeries
|
|
30443
|
+
);
|
|
30362
30444
|
if (!graphData) return resolve(this);
|
|
30363
30445
|
this.mount(graphData).then(() => {
|
|
30364
30446
|
var _a;
|
|
@@ -32668,8 +32750,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
32668
32750
|
}
|
|
32669
32751
|
};
|
|
32670
32752
|
const handleUnequalXValues = () => {
|
|
32671
|
-
const
|
|
32672
|
-
const data = {};
|
|
32753
|
+
const byCategory = /* @__PURE__ */ new Map();
|
|
32673
32754
|
series.forEach((s2, sI) => {
|
|
32674
32755
|
s2 == null ? void 0 : s2.data.forEach((dataItem) => {
|
|
32675
32756
|
let cat, value;
|
|
@@ -32682,23 +32763,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
32682
32763
|
} else {
|
|
32683
32764
|
return;
|
|
32684
32765
|
}
|
|
32685
|
-
|
|
32686
|
-
|
|
32687
|
-
|
|
32688
|
-
|
|
32689
|
-
|
|
32766
|
+
const key = String(cat);
|
|
32767
|
+
let row = byCategory.get(key);
|
|
32768
|
+
if (!row) {
|
|
32769
|
+
row = { cat, values: Array(series.length).fill("") };
|
|
32770
|
+
byCategory.set(key, row);
|
|
32690
32771
|
}
|
|
32691
|
-
|
|
32692
|
-
categories.add(cat);
|
|
32772
|
+
row.values[sI] = getFormattedValue(value);
|
|
32693
32773
|
});
|
|
32694
32774
|
});
|
|
32695
32775
|
if (columns.length) {
|
|
32696
32776
|
rows.push(columns.join(columnDelimiter));
|
|
32697
32777
|
}
|
|
32698
|
-
Array.from(
|
|
32699
|
-
const values = (
|
|
32700
|
-
/** @type {
|
|
32701
|
-
|
|
32778
|
+
Array.from(byCategory.keys()).sort().forEach((key) => {
|
|
32779
|
+
const { cat, values } = (
|
|
32780
|
+
/** @type {{cat: any, values: string[]}} */
|
|
32781
|
+
byCategory.get(key)
|
|
32702
32782
|
);
|
|
32703
32783
|
rows.push([getFormattedCategory(cat), ...values].join(columnDelimiter));
|
|
32704
32784
|
});
|
|
@@ -33714,7 +33794,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
33714
33794
|
"dataPointMouseLeave",
|
|
33715
33795
|
this._onCellLeave
|
|
33716
33796
|
);
|
|
33717
|
-
} catch (
|
|
33797
|
+
} catch (_2) {
|
|
33718
33798
|
}
|
|
33719
33799
|
}
|
|
33720
33800
|
/** Wire mousemove/mouseout on each per-band hit-region (ranges mode). */
|
|
@@ -34133,7 +34213,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34133
34213
|
const isLegendInversed = w.config.legend.inverseOrder;
|
|
34134
34214
|
const legendGroups = [];
|
|
34135
34215
|
if (w.labelData.seriesGroups.length > 1 && w.config.legend.clusterGroupedSeries) {
|
|
34136
|
-
w.labelData.seriesGroups.forEach((
|
|
34216
|
+
w.labelData.seriesGroups.forEach((_2, gi) => {
|
|
34137
34217
|
legendGroups[gi] = BrowserAPIs.createElement("div");
|
|
34138
34218
|
legendGroups[gi].classList.add(
|
|
34139
34219
|
"apexcharts-legend-group",
|
|
@@ -34458,10 +34538,49 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34458
34538
|
this.elMenu = null;
|
|
34459
34539
|
this.elMenuItems = [];
|
|
34460
34540
|
this.t = null;
|
|
34541
|
+
this._drawnForZoom = null;
|
|
34461
34542
|
}
|
|
34462
|
-
|
|
34463
|
-
|
|
34543
|
+
/**
|
|
34544
|
+
* Whether this chart's built-in ways back out of a zoom are switched on.
|
|
34545
|
+
*
|
|
34546
|
+
* The gate `chart.zoom.resetControl` opens, and the one the Escape shortcut
|
|
34547
|
+
* reads too, so a page that says it supplies its own reset gets neither.
|
|
34548
|
+
* 'auto' means "supply one when nothing else on screen can": a toolbar
|
|
34549
|
+
* showing its reset tool is a way back, and anything else is not.
|
|
34550
|
+
*
|
|
34551
|
+
* @returns {boolean}
|
|
34552
|
+
*/
|
|
34553
|
+
resetControlAllowed() {
|
|
34554
|
+
const c = this.w.config.chart;
|
|
34555
|
+
if (!c.zoom || !c.zoom.enabled) return false;
|
|
34556
|
+
const setting = c.zoom.resetControl === void 0 ? "auto" : c.zoom.resetControl;
|
|
34557
|
+
if (setting !== "auto") return !!setting;
|
|
34558
|
+
const onScreen = c.toolbar && c.toolbar.show && c.toolbar.tools && c.toolbar.tools.reset;
|
|
34559
|
+
return !onScreen;
|
|
34560
|
+
}
|
|
34561
|
+
/**
|
|
34562
|
+
* Whether a reset control has to be drawn for the state the chart is in now.
|
|
34563
|
+
*
|
|
34564
|
+
* Only while the chart is actually zoomed, which is the whole idea: the
|
|
34565
|
+
* control appears at the moment the viewer changed the view, where they are
|
|
34566
|
+
* already looking, and goes again when the range does. A page that never
|
|
34567
|
+
* zooms never sees it, so `toolbar: { show: false }` still means an empty
|
|
34568
|
+
* chart for everyone who does not zoom.
|
|
34569
|
+
*
|
|
34570
|
+
* @returns {boolean}
|
|
34571
|
+
*/
|
|
34572
|
+
resetControlDue() {
|
|
34573
|
+
return !!this.w.interact.zoomed && this.resetControlAllowed();
|
|
34574
|
+
}
|
|
34575
|
+
/**
|
|
34576
|
+
* @param {{ resetOnly?: boolean }} [opts] `resetOnly` draws the on-demand
|
|
34577
|
+
* reset control and nothing else, for a chart whose page asked for no
|
|
34578
|
+
* toolbar at all. See {@link Toolbar#resetControlDue}.
|
|
34579
|
+
*/
|
|
34580
|
+
createToolbar(opts = {}) {
|
|
34581
|
+
var _a, _b, _c;
|
|
34464
34582
|
const w = this.w;
|
|
34583
|
+
const resetOnly = !!opts.resetOnly;
|
|
34465
34584
|
const createDiv = () => {
|
|
34466
34585
|
return BrowserAPIs.createElementNS("http://www.w3.org/1999/xhtml", "div");
|
|
34467
34586
|
};
|
|
@@ -34489,6 +34608,24 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34489
34608
|
this.elMenu = createDiv();
|
|
34490
34609
|
this.elCustomIcons = [];
|
|
34491
34610
|
this.t = w.config.chart.toolbar.tools;
|
|
34611
|
+
this._drawnForZoom = null;
|
|
34612
|
+
if (resetOnly) {
|
|
34613
|
+
this.t = {
|
|
34614
|
+
zoom: false,
|
|
34615
|
+
zoomin: false,
|
|
34616
|
+
zoomout: false,
|
|
34617
|
+
selection: false,
|
|
34618
|
+
pan: false,
|
|
34619
|
+
measure: false,
|
|
34620
|
+
download: false,
|
|
34621
|
+
customIcons: [],
|
|
34622
|
+
reset: true
|
|
34623
|
+
};
|
|
34624
|
+
this._drawnForZoom = "wrap";
|
|
34625
|
+
} else if (!this.t.reset && this.resetControlDue()) {
|
|
34626
|
+
this.t = __spreadProps(__spreadValues({}, this.t), { reset: true });
|
|
34627
|
+
this._drawnForZoom = "control";
|
|
34628
|
+
}
|
|
34492
34629
|
if (Array.isArray(this.t.customIcons)) {
|
|
34493
34630
|
for (let i2 = 0; i2 < this.t.customIcons.length; i2++) {
|
|
34494
34631
|
this.elCustomIcons.push(createBtn());
|
|
@@ -34511,16 +34648,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34511
34648
|
};
|
|
34512
34649
|
appendZoomControl("zoomIn", this.elZoomIn, icoZoomIn);
|
|
34513
34650
|
appendZoomControl("zoomOut", this.elZoomOut, icoZoomOut);
|
|
34514
|
-
const zoomSelectionCtrls = (
|
|
34515
|
-
if (this.t[
|
|
34651
|
+
const zoomSelectionCtrls = (z2) => {
|
|
34652
|
+
if (this.t[z2] && w.config.chart[z2].enabled) {
|
|
34516
34653
|
toolbarControls.push({
|
|
34517
|
-
el:
|
|
34518
|
-
icon: typeof this.t[
|
|
34654
|
+
el: z2 === "zoom" ? this.elZoom : this.elSelection,
|
|
34655
|
+
icon: typeof this.t[z2] === "string" ? this.t[z2] : z2 === "zoom" ? icoZoom : icoSelect,
|
|
34519
34656
|
title: (
|
|
34520
34657
|
/** @type {any} */
|
|
34521
|
-
this.localeValues[
|
|
34658
|
+
this.localeValues[z2 === "zoom" ? "selectionZoom" : "selection"]
|
|
34522
34659
|
),
|
|
34523
|
-
class: `apexcharts-${
|
|
34660
|
+
class: `apexcharts-${z2}-icon`
|
|
34524
34661
|
});
|
|
34525
34662
|
}
|
|
34526
34663
|
};
|
|
@@ -34599,7 +34736,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34599
34736
|
this.elMenuIcon.setAttribute("aria-haspopup", "true");
|
|
34600
34737
|
this.elMenuIcon.setAttribute("aria-expanded", "false");
|
|
34601
34738
|
}
|
|
34602
|
-
this._createHamburgerMenu(elToolbarWrap);
|
|
34739
|
+
if (!resetOnly) this._createHamburgerMenu(elToolbarWrap);
|
|
34740
|
+
if (resetOnly) {
|
|
34741
|
+
(_a = this.elZoomReset) == null ? void 0 : _a.addEventListener(
|
|
34742
|
+
"click",
|
|
34743
|
+
this.handleZoomReset.bind(this)
|
|
34744
|
+
);
|
|
34745
|
+
return;
|
|
34746
|
+
}
|
|
34603
34747
|
if (w.interact.zoomEnabled) {
|
|
34604
34748
|
this.elZoom.classList.add(this.selectedClass);
|
|
34605
34749
|
} else if (w.interact.panEnabled) {
|
|
@@ -34608,7 +34752,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34608
34752
|
this.elSelection.classList.add(this.selectedClass);
|
|
34609
34753
|
} else if (w.interact.measureEnabled && this.elMeasure) {
|
|
34610
34754
|
this.elMeasure.classList.add(this.selectedClass);
|
|
34611
|
-
(
|
|
34755
|
+
(_c = (_b = this.ctx.measure) == null ? void 0 : _b.startMeasure) == null ? void 0 : _c.call(_b);
|
|
34612
34756
|
}
|
|
34613
34757
|
this.addToolbarEventListeners();
|
|
34614
34758
|
}
|
|
@@ -35014,9 +35158,28 @@ var __async = (__this, __arguments, generator) => {
|
|
|
35014
35158
|
break;
|
|
35015
35159
|
}
|
|
35016
35160
|
}
|
|
35161
|
+
/**
|
|
35162
|
+
* Take down whatever the zoom alone put on screen.
|
|
35163
|
+
*
|
|
35164
|
+
* By hand, and not left to the next render, because of the order in
|
|
35165
|
+
* {@link Toolbar#handleZoomReset}: the re-render happens while
|
|
35166
|
+
* `interact.zoomed` is still true, so the control is drawn once more and then
|
|
35167
|
+
* the flag clears with no further pass to notice. Reversing that order would
|
|
35168
|
+
* change what every listener downstream of the update sees, which is a much
|
|
35169
|
+
* larger promise than this control is worth.
|
|
35170
|
+
*/
|
|
35171
|
+
clearZoomAffordance() {
|
|
35172
|
+
const drawn = this._drawnForZoom;
|
|
35173
|
+
this._drawnForZoom = null;
|
|
35174
|
+
if (!drawn || !this.elZoomReset) return;
|
|
35175
|
+
const parent = this.elZoomReset.parentNode;
|
|
35176
|
+
const gone = drawn === "wrap" ? parent : this.elZoomReset;
|
|
35177
|
+
if (gone && gone.parentNode) gone.parentNode.removeChild(gone);
|
|
35178
|
+
}
|
|
35017
35179
|
handleZoomReset() {
|
|
35018
35180
|
const charts = this.ctx.getSyncedCharts();
|
|
35019
35181
|
charts.forEach((ch) => {
|
|
35182
|
+
var _a;
|
|
35020
35183
|
const w = ch.w;
|
|
35021
35184
|
if (!w.interact.zoomed) return;
|
|
35022
35185
|
w.globals.lastXAxis.min = w.globals.initialConfig.xaxis.min;
|
|
@@ -35042,6 +35205,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
35042
35205
|
w.config.chart.animations.dynamicAnimation.enabled
|
|
35043
35206
|
);
|
|
35044
35207
|
w.interact.zoomed = false;
|
|
35208
|
+
(_a = ch.ctx.toolbar) == null ? void 0 : _a.clearZoomAffordance();
|
|
35045
35209
|
});
|
|
35046
35210
|
}
|
|
35047
35211
|
destroy() {
|
|
@@ -35141,6 +35305,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
35141
35305
|
passive: false
|
|
35142
35306
|
});
|
|
35143
35307
|
}
|
|
35308
|
+
this.hoverArea.addEventListener("keydown", me.escapeResetEvent.bind(me), {
|
|
35309
|
+
capture: false,
|
|
35310
|
+
passive: true
|
|
35311
|
+
});
|
|
35144
35312
|
if (this._momentumEnabled()) {
|
|
35145
35313
|
["touchstart", "touchmove", "touchend", "touchcancel"].forEach(
|
|
35146
35314
|
(event) => {
|
|
@@ -35273,12 +35441,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
35273
35441
|
/**
|
|
35274
35442
|
* A wheel or pinch zoom is an incidental gesture: the viewer can land in a
|
|
35275
35443
|
* zoomed window without meaning to (a page scroll over the chart, a two-finger
|
|
35276
|
-
* swipe), so it is only offered when there is a way back out of it.
|
|
35277
|
-
*
|
|
35278
|
-
*
|
|
35279
|
-
*
|
|
35280
|
-
*
|
|
35281
|
-
*
|
|
35444
|
+
* swipe), so it is only offered when there is a way back out of it. 'auto'
|
|
35445
|
+
* (the default for both allowMouseWheelZoom and pinch) resolves against a
|
|
35446
|
+
* reset button that is already on screen. A page that builds its own reset
|
|
35447
|
+
* control sets the option to true and gets the gesture with no toolbar.
|
|
35448
|
+
* Drag-to-zoom is deliberate, so it is not gated this way.
|
|
35449
|
+
*
|
|
35450
|
+
* `chart.zoom.resetControl` supplies a reset of its own once a chart IS
|
|
35451
|
+
* zoomed, and deliberately does NOT open this gate. It arrives after the
|
|
35452
|
+
* fact, and what an incidental wheel zoom takes from the viewer first is the
|
|
35453
|
+
* page scroll it swallowed, which no button hands back.
|
|
35282
35454
|
*
|
|
35283
35455
|
* @param {boolean|'auto'} setting
|
|
35284
35456
|
*/
|
|
@@ -35293,6 +35465,58 @@ var __async = (__this, __arguments, generator) => {
|
|
|
35293
35465
|
const { zoom } = this.w.config.chart;
|
|
35294
35466
|
return this._incidentalZoomEnabled(zoom && zoom.allowMouseWheelZoom);
|
|
35295
35467
|
}
|
|
35468
|
+
/**
|
|
35469
|
+
* Put keyboard focus on the chart, where the chart is focusable at all.
|
|
35470
|
+
*
|
|
35471
|
+
* A drag is swallowed by the zoom handlers before the browser can move focus,
|
|
35472
|
+
* so a viewer who has just zoomed by hand leaves nothing focused, and every
|
|
35473
|
+
* key the chart offers is out of reach: Escape to reset (see
|
|
35474
|
+
* {@link ZoomPanSelection#escapeResetEvent}) and the +, - and 0 the keyboard
|
|
35475
|
+
* module already binds. Focusing what they just acted on puts those in reach.
|
|
35476
|
+
*
|
|
35477
|
+
* Pointer-driven focus, which keyboard navigation expects and does not read
|
|
35478
|
+
* as a request to start navigating, and which the stylesheet draws no ring
|
|
35479
|
+
* around (`svg:focus:not(:focus-visible)`).
|
|
35480
|
+
*
|
|
35481
|
+
* Only where the accessibility module has made the SVG focusable, which is
|
|
35482
|
+
* the default: a page that turned keyboard support off is not handed a tab
|
|
35483
|
+
* stop it never asked for, and still has the reset control as its way back.
|
|
35484
|
+
*/
|
|
35485
|
+
_focusForKeyboard() {
|
|
35486
|
+
var _a, _b;
|
|
35487
|
+
const node = this.w.dom.Paper && this.w.dom.Paper.node;
|
|
35488
|
+
if (!node || typeof node.focus !== "function") return;
|
|
35489
|
+
if (node.getAttribute("tabindex") === null) return;
|
|
35490
|
+
(_b = (_a = this.ctx.keyboardNavigation) == null ? void 0 : _a.notePointerFocus) == null ? void 0 : _b.call(_a);
|
|
35491
|
+
try {
|
|
35492
|
+
node.focus({ preventScroll: true });
|
|
35493
|
+
} catch (e2) {
|
|
35494
|
+
node.focus();
|
|
35495
|
+
}
|
|
35496
|
+
}
|
|
35497
|
+
/**
|
|
35498
|
+
* Escape, on a zoomed chart, puts the range back.
|
|
35499
|
+
*
|
|
35500
|
+
* The quiet half of the same answer the on-demand reset control gives, and
|
|
35501
|
+
* gated on it, so a page that says it supplies its own way back gets neither.
|
|
35502
|
+
*
|
|
35503
|
+
* It defers to keyboard navigation, whose Escape dismisses the tooltip and
|
|
35504
|
+
* which offers `0` for this, so the key means one thing at a time. It does
|
|
35505
|
+
* not stop the event either, so a page listening for Escape still hears it.
|
|
35506
|
+
*
|
|
35507
|
+
* Reachable because a completed drag-zoom puts focus on the chart; see
|
|
35508
|
+
* {@link ZoomPanSelection#_focusForKeyboard}.
|
|
35509
|
+
*
|
|
35510
|
+
* @param {any} e
|
|
35511
|
+
*/
|
|
35512
|
+
escapeResetEvent(e2) {
|
|
35513
|
+
if (e2.key !== "Escape" && e2.key !== "Esc") return;
|
|
35514
|
+
if (!this.w.interact.zoomed) return;
|
|
35515
|
+
const nav = this.ctx.keyboardNavigation;
|
|
35516
|
+
if (nav && nav.active) return;
|
|
35517
|
+
if (!this.resetControlAllowed()) return;
|
|
35518
|
+
this.handleZoomReset();
|
|
35519
|
+
}
|
|
35296
35520
|
/** Lazily-created, re-render-surviving wheel-gesture state. */
|
|
35297
35521
|
_wheel() {
|
|
35298
35522
|
const it = this.w.interact;
|
|
@@ -35775,11 +35999,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
35775
35999
|
if (!w.config.chart.group) {
|
|
35776
36000
|
options2.yaxis = yaxis;
|
|
35777
36001
|
}
|
|
35778
|
-
me.ctx.updateHelpers._updateOptions(
|
|
36002
|
+
const applied = me.ctx.updateHelpers._updateOptions(
|
|
35779
36003
|
options2,
|
|
35780
36004
|
false,
|
|
35781
36005
|
me.w.config.chart.animations.dynamicAnimation.enabled
|
|
35782
36006
|
);
|
|
36007
|
+
if (applied && typeof applied.then === "function") {
|
|
36008
|
+
applied.then(() => me._focusForKeyboard());
|
|
36009
|
+
} else {
|
|
36010
|
+
me._focusForKeyboard();
|
|
36011
|
+
}
|
|
35783
36012
|
if (typeof w.config.chart.events.zoomed === "function") {
|
|
35784
36013
|
toolbar.zoomCallback(xaxis, yaxis);
|
|
35785
36014
|
}
|
|
@@ -37532,6 +37761,19 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37532
37761
|
_onPointerDown() {
|
|
37533
37762
|
this._lastPointerDownAt = Date.now();
|
|
37534
37763
|
}
|
|
37764
|
+
/**
|
|
37765
|
+
* Note that a pointer gesture is about to move focus into the chart.
|
|
37766
|
+
*
|
|
37767
|
+
* The 100 ms window above catches the browser's own click-to-focus, which
|
|
37768
|
+
* lands immediately. A drag-zoom moves focus deliberately, and only once its
|
|
37769
|
+
* re-render is done (ZoomPanSelection#_focusForKeyboard), which is far
|
|
37770
|
+
* outside that window. Without this it reads as a viewer asking to navigate
|
|
37771
|
+
* by keyboard, which activates nav and flashes a tooltip at the first visible
|
|
37772
|
+
* point after every zoom.
|
|
37773
|
+
*/
|
|
37774
|
+
notePointerFocus() {
|
|
37775
|
+
this._lastPointerDownAt = Date.now();
|
|
37776
|
+
}
|
|
37535
37777
|
/**
|
|
37536
37778
|
* Called from Events.js keydown handler. Navigation keys are already handled
|
|
37537
37779
|
* by the direct SVG listener (which can call preventDefault). This entry
|
|
@@ -41076,7 +41318,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41076
41318
|
}
|
|
41077
41319
|
}
|
|
41078
41320
|
ApexCharts.registerFeatures({ drilldown: Drilldown });
|
|
41079
|
-
const WEAVE_API_VERSION =
|
|
41321
|
+
const WEAVE_API_VERSION = 5;
|
|
41080
41322
|
const PLUGIN_CHART_METHODS = [
|
|
41081
41323
|
"updateOptions",
|
|
41082
41324
|
"updateSeries",
|
|
@@ -41307,6 +41549,19 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41307
41549
|
enabledOnSeries: Array.isArray(
|
|
41308
41550
|
w.config.dataLabels && w.config.dataLabels.enabledOnSeries
|
|
41309
41551
|
) ? w.config.dataLabels.enabledOnSeries.slice() : null
|
|
41552
|
+
}),
|
|
41553
|
+
// The caller's own dashing, reported for the same reason and against
|
|
41554
|
+
// the same trap (v5). `stroke.dashArray` is indexed by series position
|
|
41555
|
+
// with no per-series escape hatch, so a plugin that wants ITS OWN
|
|
41556
|
+
// computed series dashed has to write the whole array, and writing one
|
|
41557
|
+
// without knowing what was there discards the caller's dashed lines
|
|
41558
|
+
// with nothing to restore them from.
|
|
41559
|
+
//
|
|
41560
|
+
// A scalar applies to every series and an array is per series. There is
|
|
41561
|
+
// no "unset" to report: the option defaults to 0, and 0 already means
|
|
41562
|
+
// no dashing, so restoring it restores exactly what was there.
|
|
41563
|
+
stroke: Object.freeze({
|
|
41564
|
+
dashArray: Array.isArray(w.config.stroke && w.config.stroke.dashArray) ? w.config.stroke.dashArray.slice() : w.config.stroke && w.config.stroke.dashArray || 0
|
|
41310
41565
|
})
|
|
41311
41566
|
});
|
|
41312
41567
|
},
|
|
@@ -41570,7 +41825,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41570
41825
|
_setScales(xyRatios) {
|
|
41571
41826
|
const w = this.w;
|
|
41572
41827
|
const gl = w.globals;
|
|
41573
|
-
const
|
|
41828
|
+
const L = w.layout;
|
|
41574
41829
|
if (!xyRatios || !gl.axisCharts) {
|
|
41575
41830
|
this._currentScales = null;
|
|
41576
41831
|
return;
|
|
@@ -41581,7 +41836,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41581
41836
|
const maxY = (axis) => gl.maxYArr[axis] != null ? gl.maxYArr[axis] : gl.maxY;
|
|
41582
41837
|
const minY = (axis) => gl.minYArr[axis] != null ? gl.minYArr[axis] : gl.minY;
|
|
41583
41838
|
const banded = !w.axisFlags.isXNumeric && !gl.isBarHorizontal && gl.dataPoints > 0;
|
|
41584
|
-
const band = banded ?
|
|
41839
|
+
const band = banded ? L.gridWidth / gl.dataPoints : 0;
|
|
41585
41840
|
this._currentScales = {
|
|
41586
41841
|
x: banded ? (v) => band * (v + 0.5) : (v) => (v - gl.minX) / xRatio,
|
|
41587
41842
|
/**
|
|
@@ -41592,8 +41847,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41592
41847
|
domainX: banded ? [-0.5, gl.dataPoints - 0.5] : [gl.minX, gl.maxX],
|
|
41593
41848
|
/** @param {number} [axis] */
|
|
41594
41849
|
domainY: (axis = 0) => [minY(axis), maxY(axis)],
|
|
41595
|
-
gridWidth:
|
|
41596
|
-
gridHeight:
|
|
41850
|
+
gridWidth: L.gridWidth,
|
|
41851
|
+
gridHeight: L.gridHeight,
|
|
41597
41852
|
ratios: xyRatios
|
|
41598
41853
|
};
|
|
41599
41854
|
}
|
|
@@ -41958,14 +42213,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41958
42213
|
* @param {string} name
|
|
41959
42214
|
* @param {{ z?: 'front'|'behind', className?: string }} opts
|
|
41960
42215
|
*/
|
|
41961
|
-
_layer(name2, { z = "front", className = "" } = {}) {
|
|
42216
|
+
_layer(name2, { z: z2 = "front", className = "" } = {}) {
|
|
41962
42217
|
let g = this._layers.get(name2);
|
|
41963
42218
|
if (!g) {
|
|
41964
42219
|
g = this.ctx.graphics.group({
|
|
41965
42220
|
class: `apexcharts-plugin-${name2} ${className}`.trim()
|
|
41966
42221
|
});
|
|
41967
42222
|
const parent = this.w.dom.elGraphical.node;
|
|
41968
|
-
if (
|
|
42223
|
+
if (z2 === "behind") parent.insertBefore(g.node, parent.firstChild);
|
|
41969
42224
|
else parent.appendChild(g.node);
|
|
41970
42225
|
g.node.setAttribute("aria-hidden", "true");
|
|
41971
42226
|
this._layers.set(name2, g);
|
|
@@ -42609,8 +42864,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
42609
42864
|
const x = lo + g * step;
|
|
42610
42865
|
let sum = 0;
|
|
42611
42866
|
for (let i2 = 0; i2 < n2; i2++) {
|
|
42612
|
-
const
|
|
42613
|
-
sum += Math.exp(-0.5 *
|
|
42867
|
+
const z2 = (x - sorted[i2]) / h;
|
|
42868
|
+
sum += Math.exp(-0.5 * z2 * z2);
|
|
42614
42869
|
}
|
|
42615
42870
|
density.push([x, sum * norm]);
|
|
42616
42871
|
}
|
|
@@ -43268,7 +43523,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
43268
43523
|
values,
|
|
43269
43524
|
order,
|
|
43270
43525
|
carrier: visible.length ? visible[0] : 0,
|
|
43271
|
-
hidden: raw.map((
|
|
43526
|
+
hidden: raw.map((_2, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
|
|
43272
43527
|
};
|
|
43273
43528
|
const carrier = w.dumbbellData.carrier;
|
|
43274
43529
|
return raw.map((s2, k) => __spreadProps(__spreadValues({}, s2), {
|
|
@@ -44073,7 +44328,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
44073
44328
|
highs,
|
|
44074
44329
|
order: bandOrder,
|
|
44075
44330
|
offset,
|
|
44076
|
-
hidden: raw.map((
|
|
44331
|
+
hidden: raw.map((_2, k) => k).filter((k) => collapsed.indexOf(k) !== -1)
|
|
44077
44332
|
};
|
|
44078
44333
|
return raw.map((s2, k) => {
|
|
44079
44334
|
const lo = lows[k];
|
|
@@ -44822,7 +45077,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
44822
45077
|
/**
|
|
44823
45078
|
* @param {any} _
|
|
44824
45079
|
*/
|
|
44825
|
-
brArr.map((
|
|
45080
|
+
brArr.map((_2) => "none")
|
|
44826
45081
|
)
|
|
44827
45082
|
);
|
|
44828
45083
|
}
|
|
@@ -45163,7 +45418,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
45163
45418
|
) : null;
|
|
45164
45419
|
const isBar = (i2) => !barIndices || barIndices.has(i2);
|
|
45165
45420
|
if (!groups || groups.length < 2) {
|
|
45166
|
-
const bucket = Array.from({ length: numSeries }, (
|
|
45421
|
+
const bucket = Array.from({ length: numSeries }, (_2, i2) => i2).filter(isBar);
|
|
45167
45422
|
return bucket.length ? [bucket] : [];
|
|
45168
45423
|
}
|
|
45169
45424
|
const buckets = Array.from({ length: groups.length }, () => []);
|
|
@@ -45194,6 +45449,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
45194
45449
|
* second at the top, and nothing else touched. Stacked totals already resolve
|
|
45195
45450
|
* per group (see drawsStackedTotal, #4173); corners never got the same fix.
|
|
45196
45451
|
*
|
|
45452
|
+
* plotOptions.bar.borderRadiusWhenStacked picks which ends round: 'all'
|
|
45453
|
+
* caps both the baseline and the far end, 'last' only the far end (#4845).
|
|
45454
|
+
*
|
|
45455
|
+
* A single-data-point chart used to hand its baseline segment 'top' (and a
|
|
45456
|
+
* solo segment 'top' instead of 'both'), which on a horizontal stack rounded
|
|
45457
|
+
* the first segment on its INNER edge and left a pill in the middle of the
|
|
45458
|
+
* bar (#4845). One data point is resolved like any other now.
|
|
45459
|
+
*
|
|
45197
45460
|
* @param {any[]} series
|
|
45198
45461
|
* @returns {string[][]}
|
|
45199
45462
|
*/
|
|
@@ -45208,9 +45471,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
45208
45471
|
() => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
|
|
45209
45472
|
);
|
|
45210
45473
|
if (alwaysApplyRadius) return output;
|
|
45211
|
-
const
|
|
45212
|
-
const
|
|
45213
|
-
const
|
|
45474
|
+
const lastOnly = w.config.plotOptions.bar.borderRadiusWhenStacked === "last";
|
|
45475
|
+
const soloPositive = lastOnly ? "top" : "both";
|
|
45476
|
+
const soloNegative = lastOnly ? "bottom" : "both";
|
|
45477
|
+
const positiveBase = lastOnly ? "none" : "bottom";
|
|
45478
|
+
const negativeBase = lastOnly ? "none" : "top";
|
|
45214
45479
|
for (const stack of this.getStackedSeriesIndices(numSeries)) {
|
|
45215
45480
|
for (let j2 = 0; j2 < numColumns; j2++) {
|
|
45216
45481
|
const positiveIndices = [];
|
|
@@ -45222,22 +45487,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
45222
45487
|
}
|
|
45223
45488
|
if (positiveIndices.length > 0 && negativeIndices.length === 0) {
|
|
45224
45489
|
if (positiveIndices.length === 1) {
|
|
45225
|
-
output[positiveIndices[0]][j2] =
|
|
45490
|
+
output[positiveIndices[0]][j2] = soloPositive;
|
|
45226
45491
|
} else {
|
|
45227
45492
|
const first = positiveIndices[0];
|
|
45228
45493
|
const last = positiveIndices[positiveIndices.length - 1];
|
|
45229
45494
|
for (const i2 of positiveIndices) {
|
|
45230
|
-
output[i2][j2] = i2 === first ?
|
|
45495
|
+
output[i2][j2] = i2 === first ? positiveBase : i2 === last ? "top" : "none";
|
|
45231
45496
|
}
|
|
45232
45497
|
}
|
|
45233
45498
|
} else if (negativeIndices.length > 0 && positiveIndices.length === 0) {
|
|
45234
45499
|
if (negativeIndices.length === 1) {
|
|
45235
|
-
output[negativeIndices[0]][j2] =
|
|
45500
|
+
output[negativeIndices[0]][j2] = soloNegative;
|
|
45236
45501
|
} else {
|
|
45237
|
-
const
|
|
45238
|
-
const
|
|
45502
|
+
const nearest = Math.min(...negativeIndices);
|
|
45503
|
+
const farthest = Math.max(...negativeIndices);
|
|
45239
45504
|
for (const i2 of negativeIndices) {
|
|
45240
|
-
output[i2][j2] = i2 ===
|
|
45505
|
+
output[i2][j2] = i2 === nearest ? negativeBase : i2 === farthest ? "bottom" : "none";
|
|
45241
45506
|
}
|
|
45242
45507
|
}
|
|
45243
45508
|
} else if (positiveIndices.length > 0 && negativeIndices.length > 0) {
|
|
@@ -45873,7 +46138,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
45873
46138
|
const w = this.w;
|
|
45874
46139
|
let nonZeroColumns = 0;
|
|
45875
46140
|
let zeroEncounters = 0;
|
|
45876
|
-
const seriesIndices = w.config.plotOptions.bar.horizontal ? w.seriesData.series.map((
|
|
46141
|
+
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)) || [];
|
|
45877
46142
|
seriesIndices.forEach((_si) => {
|
|
45878
46143
|
const val = w.globals.seriesPercent[_si][j2];
|
|
45879
46144
|
if (val) {
|
|
@@ -46960,7 +47225,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
46960
47225
|
series = w.globals.comboCharts ? (
|
|
46961
47226
|
/** @type {any} */
|
|
46962
47227
|
seriesIndex.map(
|
|
46963
|
-
(
|
|
47228
|
+
(_2) => w.globals.seriesPercent[_2]
|
|
46964
47229
|
)
|
|
46965
47230
|
) : w.globals.seriesPercent.slice();
|
|
46966
47231
|
}
|
|
@@ -47759,17 +48024,17 @@ var __async = (__this, __arguments, generator) => {
|
|
|
47759
48024
|
if (this.isHorizontal) {
|
|
47760
48025
|
const yRatio = this.invertedYRatio;
|
|
47761
48026
|
const bh = barHeight != null ? barHeight : 0;
|
|
47762
|
-
const
|
|
48027
|
+
const z2 = zeroW != null ? zeroW : 0;
|
|
47763
48028
|
center = paths.barYPosition + bh / 2;
|
|
47764
48029
|
halfExtent = bh / 2;
|
|
47765
|
-
alongFn = (v) =>
|
|
48030
|
+
alongFn = (v) => z2 + logVal(v) / yRatio;
|
|
47766
48031
|
} else {
|
|
47767
48032
|
const yRatio = this.yRatio[translationsIndex];
|
|
47768
48033
|
const bw = barWidth != null ? barWidth : 0;
|
|
47769
|
-
const
|
|
48034
|
+
const z2 = zeroH != null ? zeroH : 0;
|
|
47770
48035
|
center = paths.barXPosition + bw / 2;
|
|
47771
48036
|
halfExtent = bw / 2;
|
|
47772
|
-
alongFn = (v) =>
|
|
48037
|
+
alongFn = (v) => z2 - logVal(v) / yRatio;
|
|
47773
48038
|
}
|
|
47774
48039
|
const groups = buildJitterGroups({
|
|
47775
48040
|
w,
|
|
@@ -48503,7 +48768,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
48503
48768
|
return { nodes: [], maxWeight: 0 };
|
|
48504
48769
|
}
|
|
48505
48770
|
const order = d.values.map(
|
|
48506
|
-
(
|
|
48771
|
+
(_2, k) => k
|
|
48507
48772
|
);
|
|
48508
48773
|
order.sort(
|
|
48509
48774
|
(a2, b) => d.values[a2] - d.values[b]
|
|
@@ -50466,15 +50731,15 @@ var __async = (__this, __arguments, generator) => {
|
|
|
50466
50731
|
case "monotoneCubic": {
|
|
50467
50732
|
const yAj = isRangeStart ? yArrj : y2Arrj;
|
|
50468
50733
|
const getSmoothInputs = (xArr, yArr) => {
|
|
50469
|
-
return xArr.map((
|
|
50470
|
-
return [
|
|
50471
|
-
}).filter((
|
|
50734
|
+
return xArr.map((_2, i3) => {
|
|
50735
|
+
return [_2, yArr[i3]];
|
|
50736
|
+
}).filter((_2) => _2[1] !== null);
|
|
50472
50737
|
};
|
|
50473
50738
|
const getSegmentLengths = (yArr) => {
|
|
50474
50739
|
const segLens = [];
|
|
50475
50740
|
let count = 0;
|
|
50476
|
-
yArr.forEach((
|
|
50477
|
-
if (
|
|
50741
|
+
yArr.forEach((_2) => {
|
|
50742
|
+
if (_2 !== null) {
|
|
50478
50743
|
count++;
|
|
50479
50744
|
} else if (count > 0) {
|
|
50480
50745
|
segLens.push(count);
|
|
@@ -50521,11 +50786,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
50521
50786
|
}
|
|
50522
50787
|
let segmentCount = 0;
|
|
50523
50788
|
let smoothInputsIndex = 0;
|
|
50524
|
-
getSegments(_yAj, points).forEach((
|
|
50789
|
+
getSegments(_yAj, points).forEach((_2) => {
|
|
50525
50790
|
segmentCount++;
|
|
50526
|
-
const svgPoints = svgPath(
|
|
50791
|
+
const svgPoints = svgPath(_2);
|
|
50527
50792
|
const _start = smoothInputsIndex;
|
|
50528
|
-
smoothInputsIndex +=
|
|
50793
|
+
smoothInputsIndex += _2.length;
|
|
50529
50794
|
const _end = smoothInputsIndex - 1;
|
|
50530
50795
|
if (isLowerRangeAreaPath) {
|
|
50531
50796
|
linePath = graphics.move(
|
|
@@ -51008,13 +51273,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51008
51273
|
function sharpDonutSegmentPath({ cx, cy, rIn, rOut, a0, a1, spanDeg }) {
|
|
51009
51274
|
const ptAt = (radius, deg) => arcPoint(cx, cy, radius, deg);
|
|
51010
51275
|
const largeArc = spanDeg > 180 ? 1 : 0;
|
|
51011
|
-
const
|
|
51276
|
+
const A = ptAt(rOut, a0);
|
|
51012
51277
|
const B = ptAt(rOut, a1);
|
|
51013
|
-
const
|
|
51278
|
+
const C2 = ptAt(rIn, a1);
|
|
51014
51279
|
const Din = ptAt(rIn, a0);
|
|
51015
51280
|
return [
|
|
51016
51281
|
"M",
|
|
51017
|
-
xy(
|
|
51282
|
+
xy(A),
|
|
51018
51283
|
"A",
|
|
51019
51284
|
rOut,
|
|
51020
51285
|
rOut,
|
|
@@ -51023,7 +51288,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51023
51288
|
1,
|
|
51024
51289
|
xy(B),
|
|
51025
51290
|
"L",
|
|
51026
|
-
xy(
|
|
51291
|
+
xy(C2),
|
|
51027
51292
|
"A",
|
|
51028
51293
|
rIn,
|
|
51029
51294
|
rIn,
|
|
@@ -51143,7 +51408,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51143
51408
|
const w = this.w;
|
|
51144
51409
|
const helpers = new CircularChartsHelpers(w);
|
|
51145
51410
|
const lineSets = (w.seriesData.seriesNames || []).map(
|
|
51146
|
-
(
|
|
51411
|
+
(_2, i2) => this.getExternalLabelLines(i2)
|
|
51147
51412
|
);
|
|
51148
51413
|
const maxLabelWidth = helpers.getMaxLabelWidth(lineSets.flat(), {
|
|
51149
51414
|
fontSize: this.externalLabelStyle.fontSize,
|
|
@@ -53836,7 +54101,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
53836
54101
|
(_d = (_c = w.config.series[i2].data) == null ? void 0 : _c[j2]) == null ? void 0 : _d.x
|
|
53837
54102
|
);
|
|
53838
54103
|
const labelX = Array.isArray(x) ? x.join(" ") : x;
|
|
53839
|
-
const rowIndex = w.labelData.labels.map((
|
|
54104
|
+
const rowIndex = w.labelData.labels.map((_2) => Array.isArray(_2) ? _2.join(" ") : _2).indexOf(labelX);
|
|
53840
54105
|
const overlappedIndex = w.rangeData.seriesRange[i2].findIndex(
|
|
53841
54106
|
(tx) => {
|
|
53842
54107
|
var _a2;
|
|
@@ -55034,8 +55299,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55034
55299
|
*/
|
|
55035
55300
|
_zoomEnabled() {
|
|
55036
55301
|
const w = this.w;
|
|
55037
|
-
const
|
|
55038
|
-
if (!
|
|
55302
|
+
const z2 = w.config.plotOptions.treemap.zoom;
|
|
55303
|
+
if (!z2 || !z2.enabled || !this.showParents) return false;
|
|
55039
55304
|
const dd = w.config.drilldown;
|
|
55040
55305
|
if (dd && dd.enabled && Array.isArray(dd.series) && dd.series.length) {
|
|
55041
55306
|
if (!this._warnedZoomConflict) {
|
|
@@ -55127,8 +55392,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55127
55392
|
}
|
|
55128
55393
|
/** The breadcrumb config: a treemap-local override on the shared block. */
|
|
55129
55394
|
_breadcrumbCfg() {
|
|
55130
|
-
const
|
|
55131
|
-
return breadcrumbConfig(this.w,
|
|
55395
|
+
const z2 = this.w.config.plotOptions.treemap.zoom;
|
|
55396
|
+
return breadcrumbConfig(this.w, z2 && z2.breadcrumb);
|
|
55132
55397
|
}
|
|
55133
55398
|
/**
|
|
55134
55399
|
* Breadcrumb back out of a zoom. Markup, config and accessible semantics are
|
|
@@ -55327,7 +55592,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55327
55592
|
if (typeof fmt === "function") {
|
|
55328
55593
|
try {
|
|
55329
55594
|
return String(fmt(v, { seriesIndex: 0, dataPointIndex: 0, w }));
|
|
55330
|
-
} catch (
|
|
55595
|
+
} catch (_2) {
|
|
55331
55596
|
}
|
|
55332
55597
|
}
|
|
55333
55598
|
return String(v);
|
|
@@ -55572,7 +55837,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55572
55837
|
const PK_CORNER = 1;
|
|
55573
55838
|
const PK_GLYPH = 2;
|
|
55574
55839
|
function springParams(preset, speed) {
|
|
55575
|
-
const [stiffness, damping] =
|
|
55840
|
+
const [stiffness, damping] = z(
|
|
55576
55841
|
/** @type {import('apex-commons').SpringPreset|undefined} */
|
|
55577
55842
|
preset
|
|
55578
55843
|
);
|
|
@@ -55816,7 +56081,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55816
56081
|
r: typeof p.r === "number" && p.r > 0 ? p.r : void 0
|
|
55817
56082
|
});
|
|
55818
56083
|
});
|
|
55819
|
-
const clusters = counts.map((
|
|
56084
|
+
const clusters = counts.map((_2, i2) => ({
|
|
55820
56085
|
i: i2,
|
|
55821
56086
|
cx: gw / 2,
|
|
55822
56087
|
cy: gh / 2,
|
|
@@ -55923,7 +56188,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55923
56188
|
const gw = w.layout.gridWidth;
|
|
55924
56189
|
const gh = w.layout.gridHeight;
|
|
55925
56190
|
const labelSpace = opts.clusterLabels && opts.clusterLabels.show ? 30 : 6;
|
|
55926
|
-
const visible = counts.map((
|
|
56191
|
+
const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
|
|
55927
56192
|
const Kv = Math.max(1, visible.length);
|
|
55928
56193
|
const slotOf = new Array(counts.length).fill(-1);
|
|
55929
56194
|
visible.forEach((i2, s2) => slotOf[i2] = s2);
|
|
@@ -55938,7 +56203,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55938
56203
|
const cy = labelSpace + availH / 2;
|
|
55939
56204
|
const outerRs = counts.map((n2) => step * Math.sqrt(Math.max(1, n2)) + dotR);
|
|
55940
56205
|
const cellCentre = (i2) => slotOf[i2] >= 0 ? cellW * (slotOf[i2] + 0.5) : gw / 2;
|
|
55941
|
-
let centers = counts.map((
|
|
56206
|
+
let centers = counts.map((_2, i2) => cellCentre(i2));
|
|
55942
56207
|
const visOuter = visible.map((i2) => outerRs[i2]);
|
|
55943
56208
|
let overlap = false;
|
|
55944
56209
|
for (let s2 = 1; s2 < Kv; s2++) {
|
|
@@ -55963,10 +56228,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55963
56228
|
} else {
|
|
55964
56229
|
const lo = visOuter[0];
|
|
55965
56230
|
const hi = gw - visOuter[Kv - 1];
|
|
55966
|
-
visCenters = visOuter.map((
|
|
56231
|
+
visCenters = visOuter.map((_2, s2) => lo + (hi - lo) * s2 / (Kv - 1));
|
|
55967
56232
|
}
|
|
55968
56233
|
centers = counts.map(
|
|
55969
|
-
(
|
|
56234
|
+
(_2, i2) => slotOf[i2] >= 0 ? visCenters[slotOf[i2]] : gw / 2
|
|
55970
56235
|
);
|
|
55971
56236
|
}
|
|
55972
56237
|
return counts.map((n2, i2) => ({
|
|
@@ -55998,11 +56263,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55998
56263
|
this._lastDotR = this._dotRadiusFromStep(step, opts);
|
|
55999
56264
|
const cx = gw / 2;
|
|
56000
56265
|
const cy = labelSpace + (gh - labelSpace) / 2;
|
|
56001
|
-
const order = counts.map((
|
|
56266
|
+
const order = counts.map((_2, i2) => i2);
|
|
56002
56267
|
if (opts.sortByGroup !== false) {
|
|
56003
56268
|
order.sort((a2, b) => counts[a2] - counts[b]);
|
|
56004
56269
|
}
|
|
56005
|
-
const clusters = counts.map((
|
|
56270
|
+
const clusters = counts.map((_2, i2) => ({
|
|
56006
56271
|
i: i2,
|
|
56007
56272
|
cx,
|
|
56008
56273
|
cy,
|
|
@@ -56074,7 +56339,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56074
56339
|
}
|
|
56075
56340
|
}
|
|
56076
56341
|
seats.sort((s1, s2) => s1.a - s2.a);
|
|
56077
|
-
const clusters = counts.map((
|
|
56342
|
+
const clusters = counts.map((_2, i2) => ({
|
|
56078
56343
|
i: i2,
|
|
56079
56344
|
cx,
|
|
56080
56345
|
cy,
|
|
@@ -56135,11 +56400,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56135
56400
|
const spacing = opts.spacing > 0 ? opts.spacing : 1.05;
|
|
56136
56401
|
const absSpan = Math.abs(span) || Math.PI;
|
|
56137
56402
|
const fixed = this._fixedRadius(opts);
|
|
56138
|
-
const evalR = (
|
|
56139
|
-
|
|
56403
|
+
const evalR = (R) => {
|
|
56404
|
+
R = Math.max(1, Math.round(R));
|
|
56140
56405
|
const radii = [];
|
|
56141
|
-
for (let r2 = 0; r2 <
|
|
56142
|
-
radii.push(
|
|
56406
|
+
for (let r2 = 0; r2 < R; r2++) {
|
|
56407
|
+
radii.push(R === 1 ? (r0 + r1) / 2 : r0 + (r1 - r0) * (r2 / (R - 1)));
|
|
56143
56408
|
}
|
|
56144
56409
|
const weightSum = radii.reduce((a2, x) => a2 + x, 0) || 1;
|
|
56145
56410
|
const raw = radii.map((rho) => total * rho / weightSum);
|
|
@@ -56152,19 +56417,19 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56152
56417
|
}
|
|
56153
56418
|
});
|
|
56154
56419
|
while (left > 0) {
|
|
56155
|
-
seatsPerRow[
|
|
56420
|
+
seatsPerRow[R - 1]++;
|
|
56156
56421
|
left--;
|
|
56157
56422
|
}
|
|
56158
|
-
const radialPitch =
|
|
56423
|
+
const radialPitch = R === 1 ? r1 - r0 || r1 : (r1 - r0) / (R - 1);
|
|
56159
56424
|
let minArcPitch = Infinity;
|
|
56160
|
-
for (let r2 = 0; r2 <
|
|
56425
|
+
for (let r2 = 0; r2 < R; r2++) {
|
|
56161
56426
|
const n2 = seatsPerRow[r2];
|
|
56162
56427
|
if (n2 <= 0) continue;
|
|
56163
56428
|
const arcPitch = radii[r2] * absSpan / n2;
|
|
56164
56429
|
if (arcPitch < minArcPitch) minArcPitch = arcPitch;
|
|
56165
56430
|
}
|
|
56166
56431
|
const pitch = Math.min(radialPitch, minArcPitch);
|
|
56167
|
-
return { R
|
|
56432
|
+
return { R, radii, seatsPerRow, dotR: Math.max(1, pitch / (2 * spacing)) };
|
|
56168
56433
|
};
|
|
56169
56434
|
const arcRows = opts.arc && opts.arc.rows;
|
|
56170
56435
|
let res;
|
|
@@ -56176,8 +56441,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56176
56441
|
} else {
|
|
56177
56442
|
const maxR = Math.max(1, Math.min(40, Math.ceil(Math.sqrt(total)) + 6));
|
|
56178
56443
|
res = evalR(1);
|
|
56179
|
-
for (let
|
|
56180
|
-
const cand = evalR(
|
|
56444
|
+
for (let R = 2; R <= maxR; R++) {
|
|
56445
|
+
const cand = evalR(R);
|
|
56181
56446
|
if (cand.dotR > res.dotR) res = cand;
|
|
56182
56447
|
}
|
|
56183
56448
|
}
|
|
@@ -56201,7 +56466,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56201
56466
|
const labelsOn = !!(opts.clusterLabels && opts.clusterLabels.show);
|
|
56202
56467
|
const labelsBelow = labelsOn && opts.clusterLabels.position === "bottom";
|
|
56203
56468
|
const topPad = labelsOn && !labelsBelow ? 30 : 6;
|
|
56204
|
-
const visible = counts.map((
|
|
56469
|
+
const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
|
|
56205
56470
|
const Kv = Math.max(1, visible.length);
|
|
56206
56471
|
const slotOf = new Array(counts.length).fill(-1);
|
|
56207
56472
|
visible.forEach((i2, s2) => slotOf[i2] = s2);
|
|
@@ -56316,7 +56581,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56316
56581
|
const originX = (gw - blockW) / 2 + pitch / 2;
|
|
56317
56582
|
const topY = labelSpace + (availH - blockH) / 2;
|
|
56318
56583
|
const rowY = (rowIdx) => fillFrom === "bottom" ? topY + blockH - pitch / 2 - rowIdx * pitch : topY + pitch / 2 + rowIdx * pitch;
|
|
56319
|
-
const clusters = counts.map((
|
|
56584
|
+
const clusters = counts.map((_2, i2) => ({
|
|
56320
56585
|
i: i2,
|
|
56321
56586
|
cx: gw / 2,
|
|
56322
56587
|
cy: labelSpace + availH / 2,
|
|
@@ -56362,14 +56627,14 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56362
56627
|
const fillFrom = gcfg.fillFrom === "top" ? "top" : "bottom";
|
|
56363
56628
|
const cellsPerTile = Math.max(1, Math.round(gcfg.total > 0 ? gcfg.total : 100));
|
|
56364
56629
|
const rowsPerTile = Math.max(1, Math.ceil(cellsPerTile / cols));
|
|
56365
|
-
const visible = counts.map((
|
|
56366
|
-
const
|
|
56630
|
+
const visible = counts.map((_2, i2) => i2).filter((i2) => counts[i2] > 0);
|
|
56631
|
+
const K2 = Math.max(1, visible.length);
|
|
56367
56632
|
const denom = gcfg.max > 0 ? gcfg.max : Math.max(1, ...counts);
|
|
56368
56633
|
const tileCols = Math.max(
|
|
56369
56634
|
1,
|
|
56370
|
-
Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(
|
|
56635
|
+
Math.round(gcfg.tileColumns > 0 ? gcfg.tileColumns : Math.ceil(Math.sqrt(K2)))
|
|
56371
56636
|
);
|
|
56372
|
-
const tileRows = Math.max(1, Math.ceil(
|
|
56637
|
+
const tileRows = Math.max(1, Math.ceil(K2 / tileCols));
|
|
56373
56638
|
const labelsOn = !(opts.clusterLabels && opts.clusterLabels.show === false);
|
|
56374
56639
|
const labelsBelow = labelsOn && opts.clusterLabels && opts.clusterLabels.position === "bottom";
|
|
56375
56640
|
const topBand = labelsOn && !labelsBelow ? 22 : 4;
|
|
@@ -56489,7 +56754,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56489
56754
|
(cat) => Array.isArray(cat) ? cat.map(valueOf) : []
|
|
56490
56755
|
);
|
|
56491
56756
|
const isNum = (v) => v != null && isFinite(v);
|
|
56492
|
-
const visible = catVals.map((
|
|
56757
|
+
const visible = catVals.map((_2, i2) => i2).filter((i2) => catVals[i2].some(isNum));
|
|
56493
56758
|
const Kv = Math.max(1, visible.length);
|
|
56494
56759
|
let vmin = Infinity;
|
|
56495
56760
|
let vmax = -Infinity;
|
|
@@ -56608,7 +56873,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56608
56873
|
(cat) => Array.isArray(cat) ? cat.map(valueOf) : []
|
|
56609
56874
|
);
|
|
56610
56875
|
const isNum = (v) => v != null && isFinite(v);
|
|
56611
|
-
const visible = catVals.map((
|
|
56876
|
+
const visible = catVals.map((_2, i2) => i2).filter((i2) => catVals[i2].some(isNum));
|
|
56612
56877
|
const Kv = Math.max(1, visible.length);
|
|
56613
56878
|
let vmin = Infinity;
|
|
56614
56879
|
let vmax = -Infinity;
|
|
@@ -56725,7 +56990,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56725
56990
|
const isNum = (v) => typeof v === "number" && isFinite(v);
|
|
56726
56991
|
const xOf = (d) => d && typeof d === "object" ? d.x : null;
|
|
56727
56992
|
const yOf = (d) => d && typeof d === "object" ? d.y != null ? d.y : d.value : null;
|
|
56728
|
-
const visible = unitData.map((
|
|
56993
|
+
const visible = unitData.map((_2, i2) => i2).filter(
|
|
56729
56994
|
(i2) => (unitData[i2] || []).some((d) => isNum(xOf(d)) && isNum(yOf(d)))
|
|
56730
56995
|
);
|
|
56731
56996
|
let xmn = Infinity;
|
|
@@ -56863,10 +57128,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56863
57128
|
let zmax = -Infinity;
|
|
56864
57129
|
unitData.forEach(
|
|
56865
57130
|
(cat) => (cat || []).forEach((d) => {
|
|
56866
|
-
const
|
|
56867
|
-
if (typeof
|
|
56868
|
-
if (
|
|
56869
|
-
if (
|
|
57131
|
+
const z2 = d && typeof d === "object" ? d[field] : null;
|
|
57132
|
+
if (typeof z2 === "number" && isFinite(z2)) {
|
|
57133
|
+
if (z2 < zmin) zmin = z2;
|
|
57134
|
+
if (z2 > zmax) zmax = z2;
|
|
56870
57135
|
}
|
|
56871
57136
|
})
|
|
56872
57137
|
);
|
|
@@ -56883,9 +57148,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56883
57148
|
*/
|
|
56884
57149
|
_scatterRadius(d, st, fallback) {
|
|
56885
57150
|
if (!st) return fallback;
|
|
56886
|
-
const
|
|
56887
|
-
if (typeof
|
|
56888
|
-
const t2 = st.zmax > st.zmin ? (
|
|
57151
|
+
const z2 = d && typeof d === "object" ? d[st.field] : null;
|
|
57152
|
+
if (typeof z2 !== "number" || !isFinite(z2)) return st.rMin;
|
|
57153
|
+
const t2 = st.zmax > st.zmin ? (z2 - st.zmin) / (st.zmax - st.zmin) : 1;
|
|
56889
57154
|
const tc = Math.max(0, Math.min(1, t2));
|
|
56890
57155
|
const aMin = st.rMin * st.rMin;
|
|
56891
57156
|
const aMax = st.rMax * st.rMax;
|
|
@@ -57681,8 +57946,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
57681
57946
|
for (let k = 0; k < dots.length; k++) {
|
|
57682
57947
|
const d = dots[k];
|
|
57683
57948
|
const carried = live && !d.isEnter && d.key != null ? live.get(d.key) : null;
|
|
57684
|
-
const sx = carried ? carried.x :
|
|
57685
|
-
const sy = carried ? carried.y :
|
|
57949
|
+
const sx = carried ? carried.x : $(d.cx0, stiffness, damping);
|
|
57950
|
+
const sy = carried ? carried.y : $(d.cy0, stiffness, damping);
|
|
57686
57951
|
if (carried) {
|
|
57687
57952
|
sx.stiffness = stiffness;
|
|
57688
57953
|
sy.stiffness = stiffness;
|
|
@@ -57766,12 +58031,12 @@ var __async = (__this, __arguments, generator) => {
|
|
|
57766
58031
|
let cx, cy;
|
|
57767
58032
|
if (d.sx && d.sy) {
|
|
57768
58033
|
if (elapsed >= 0 && !d.released) {
|
|
57769
|
-
|
|
57770
|
-
|
|
58034
|
+
_(d.sx, d.x);
|
|
58035
|
+
_(d.sy, d.y);
|
|
57771
58036
|
d.released = true;
|
|
57772
58037
|
}
|
|
57773
|
-
const restX =
|
|
57774
|
-
const restY =
|
|
58038
|
+
const restX = q(d.sx, dt);
|
|
58039
|
+
const restY = q(d.sy, dt);
|
|
57775
58040
|
if (!d.released || !restX || !restY) done = false;
|
|
57776
58041
|
cx = d.sx.value;
|
|
57777
58042
|
cy = d.sy.value;
|
|
@@ -58103,14 +58368,14 @@ ${percent.toFixed(1)}%`;
|
|
|
58103
58368
|
textEl.setAttribute("font-weight", String(cfg.fontWeight || 600));
|
|
58104
58369
|
textEl.setAttribute("fill", cfg.color || color);
|
|
58105
58370
|
const bottom = cfg.position === "bottom";
|
|
58106
|
-
const
|
|
58371
|
+
const R = cluster.outerR + fontSize * 0.6 + 3 + (cfg.offsetY || 0);
|
|
58107
58372
|
const estWidth = str.length * fontSize * 0.55;
|
|
58108
|
-
const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI *
|
|
58373
|
+
const curved = !bottom && !cluster.flat && cfg.curved !== false && estWidth <= Math.PI * R * 0.95;
|
|
58109
58374
|
if (curved) {
|
|
58110
58375
|
const yMid = cluster.cy;
|
|
58111
|
-
const x1 = cluster.cx -
|
|
58112
|
-
const x2 = cluster.cx +
|
|
58113
|
-
const d = `M ${x1} ${yMid} A ${
|
|
58376
|
+
const x1 = cluster.cx - R;
|
|
58377
|
+
const x2 = cluster.cx + R;
|
|
58378
|
+
const d = `M ${x1} ${yMid} A ${R} ${R} 0 0 1 ${x2} ${yMid}`;
|
|
58114
58379
|
const arcId = `apexcharts-unit-label-${w.globals.chartID}-${cluster.i}`;
|
|
58115
58380
|
const pathEl = BrowserAPIs.createElementNS(NS, "path");
|
|
58116
58381
|
pathEl.setAttribute("id", arcId);
|