Skip to content

Commit e1a4400

Browse files
committed
build - 3.45.2
1 parent c908bbe commit e1a4400

File tree

6 files changed

+94
-58
lines changed

6 files changed

+94
-58
lines changed

dist/apexcharts.amd.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apexcharts.common.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apexcharts.esm.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apexcharts.js

+81-45
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
2-
* ApexCharts v3.45.1
3-
* (c) 2018-2023 ApexCharts
2+
* ApexCharts v3.45.2
3+
* (c) 2018-2024 ApexCharts
44
* Released under the MIT License.
55
*/
66
(function (global, factory) {
@@ -2418,7 +2418,6 @@
24182418
var yRatio = [];
24192419
var invertedYRatio = 0;
24202420
var xRatio = 0;
2421-
var initialXRatio = 0;
24222421
var invertedXRatio = 0;
24232422
var zRatio = 0;
24242423
var baseLineY = [];
@@ -2443,7 +2442,6 @@
24432442
}
24442443

24452444
xRatio = gl.xRange / gl.gridWidth;
2446-
initialXRatio = Math.abs(gl.initialMaxX - gl.initialMinX) / gl.gridWidth;
24472445
invertedYRatio = gl.yRange / gl.gridWidth;
24482446
invertedXRatio = gl.xRange / gl.gridHeight;
24492447
zRatio = gl.zRange / gl.gridHeight * 16;
@@ -2478,7 +2476,6 @@
24782476
invertedYRatio: invertedYRatio,
24792477
zRatio: zRatio,
24802478
xRatio: xRatio,
2481-
initialXRatio: initialXRatio,
24822479
invertedXRatio: invertedXRatio,
24832480
baseLineInvertedY: baseLineInvertedY,
24842481
baseLineY: baseLineY,
@@ -3712,6 +3709,7 @@
37123709
distributed: false,
37133710
reverseNegativeShade: false,
37143711
useFillColorAsStroke: false,
3712+
borderRadius: 4,
37153713
dataLabels: {
37163714
format: 'scale' // scale | truncate
37173715

@@ -4186,7 +4184,7 @@
41864184
enabled: true,
41874185
enabledOnSeries: undefined,
41884186
shared: true,
4189-
hideEmptySeries: true,
4187+
hideEmptySeries: false,
41904188
followCursor: false,
41914189
// when disabled, the tooltip will show on top of the series instead of mouse position
41924190
intersect: false,
@@ -6242,7 +6240,7 @@
62426240
var newDefaults = {};
62436241

62446242
if (opts && _typeof(opts) === 'object') {
6245-
var _opts$plotOptions, _opts$plotOptions$bar, _opts$chart$brush, _opts$plotOptions2, _opts$plotOptions2$ba, _opts, _opts$stroke, _opts$chart$sparkline, _window$Apex$chart, _window$Apex$chart$sp;
6243+
var _opts$plotOptions, _opts$plotOptions$bar, _opts$chart$brush, _opts$plotOptions2, _opts$plotOptions2$ba, _opts$chart$sparkline, _window$Apex$chart, _window$Apex$chart$sp;
62466244

62476245
var chartDefaults = {};
62486246
var chartTypes = ['line', 'area', 'bar', 'candlestick', 'boxPlot', 'rangeBar', 'rangeArea', 'bubble', 'scatter', 'heatmap', 'treemap', 'pie', 'polarArea', 'donut', 'radar', 'radialBar'];
@@ -6271,10 +6269,6 @@
62716269

62726270
if ((_opts$plotOptions2 = opts.plotOptions) !== null && _opts$plotOptions2 !== void 0 && (_opts$plotOptions2$ba = _opts$plotOptions2.bar) !== null && _opts$plotOptions2$ba !== void 0 && _opts$plotOptions2$ba.isDumbbell) {
62736271
opts = defaults.dumbbell(opts);
6274-
}
6275-
6276-
if (((_opts = opts) === null || _opts === void 0 ? void 0 : (_opts$stroke = _opts.stroke) === null || _opts$stroke === void 0 ? void 0 : _opts$stroke.curve) === 'monotoneCubic') {
6277-
opts.stroke.curve = 'smooth';
62786272
} // If user has specified a dark theme, make the tooltip dark too
62796273

62806274

@@ -13974,7 +13968,7 @@
1397413968
stylesheet.setAttribute('nonce', nonce);
1397513969
}
1397613970

13977-
var text = "\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }";
13971+
var text = "\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n }\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: inline-block;\n cursor: pointer;\n margin-right: 3px;\n border-style: solid;\n }\n\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\n display: inline-block;\n }\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }";
1397813972
var rules = document.createTextNode(text);
1397913973
stylesheet.appendChild(rules);
1398013974
return stylesheet;
@@ -19182,10 +19176,6 @@
1918219176
// max barwidth should be equal to minXDiff to avoid overlap
1918319177
var xRatio = this.barCtx.xRatio;
1918419178

19185-
if (w.config.xaxis.convertedCatToNumeric) {
19186-
xRatio = this.barCtx.initialXRatio;
19187-
}
19188-
1918919179
if (w.globals.minXDiff && w.globals.minXDiff !== 0.5 && w.globals.minXDiff / xRatio > 0) {
1919019180
xDivision = w.globals.minXDiff / xRatio;
1919119181
}
@@ -19315,7 +19305,7 @@
1931519305
var strokeWidth = 0;
1931619306
var w = this.w;
1931719307

19318-
if (!this.barCtx.series[i][j]) {
19308+
if (typeof this.barCtx.series[i][j] === 'undefined' || this.barCtx.series[i][j] === null) {
1931919309
this.barCtx.isNullValue = true;
1932019310
} else {
1932119311
this.barCtx.isNullValue = false;
@@ -19707,7 +19697,6 @@
1970719697

1970819698
if (this.xyRatios !== null) {
1970919699
this.xRatio = xyRatios.xRatio;
19710-
this.initialXRatio = xyRatios.initialXRatio;
1971119700
this.yRatio = xyRatios.yRatio;
1971219701
this.invertedXRatio = xyRatios.invertedXRatio;
1971319702
this.invertedYRatio = xyRatios.invertedYRatio;
@@ -23869,28 +23858,20 @@
2386923858
* @returns {String}
2387023859
*/
2387123860

23872-
var svgPath = function svgPath(points, chartWidth) {
23861+
var svgPath = function svgPath(points) {
2387323862
var p = '';
2387423863

2387523864
for (var i = 0; i < points.length; i++) {
2387623865
var point = points[i];
23877-
var prevPoint = points[i - 1];
2387823866
var n = point.length;
23879-
var pn = prevPoint === null || prevPoint === void 0 ? void 0 : prevPoint.length;
2388023867

23881-
if (i > 1 && Math.abs(point[n - 2] - prevPoint[pn - 2]) < chartWidth / 25) {
23882-
// fallback to straight line if the x distance is too small
23883-
// or if the curve goes backward too much
23884-
p += "L".concat(point[2], ", ").concat(point[3]);
23885-
} else {
23886-
if (n > 4) {
23887-
p += "C".concat(point[0], ", ").concat(point[1]);
23888-
p += ", ".concat(point[2], ", ").concat(point[3]);
23889-
p += ", ".concat(point[4], ", ").concat(point[5]);
23890-
} else if (n > 2) {
23891-
p += "S".concat(point[0], ", ").concat(point[1]);
23892-
p += ", ".concat(point[2], ", ").concat(point[3]);
23893-
}
23868+
if (n > 4) {
23869+
p += "C".concat(point[0], ", ").concat(point[1]);
23870+
p += ", ".concat(point[2], ", ").concat(point[3]);
23871+
p += ", ".concat(point[4], ", ").concat(point[5]);
23872+
} else if (n > 2) {
23873+
p += "S".concat(point[0], ", ").concat(point[1]);
23874+
p += ", ".concat(point[2], ", ").concat(point[3]);
2389423875
}
2389523876
}
2389623877

@@ -24046,7 +24027,10 @@
2404624027
}
2404724028

2404824029
xArrj.push(x);
24049-
var prevX = x;
24030+
var pX = x;
24031+
var pY = void 0;
24032+
var pY2 = void 0;
24033+
var prevX = pX;
2405024034
var prevY = this.zeroY;
2405124035
var prevY2 = this.zeroY;
2405224036
var lineYPosition = 0; // the first value in the current series is not null or undefined
@@ -24059,13 +24043,14 @@
2405924043
});
2406024044
prevY = firstPrevY.prevY;
2406124045

24062-
if (w.config.stroke.curve === 'smooth' && series[i][0] === null) {
24046+
if (w.config.stroke.curve === 'monotonCubic' && series[i][0] === null) {
2406324047
// we have to discard the y position if 1st dataPoint is null as it causes issues with monotoneCubic path creation
2406424048
yArrj.push(null);
2406524049
} else {
2406624050
yArrj.push(prevY);
24067-
} // y2 are needed for range-area charts
24051+
}
2406824052

24053+
pY = prevY; // y2 are needed for range-area charts
2406924054

2407024055
var firstPrevY2 = void 0;
2407124056

@@ -24077,6 +24062,7 @@
2407724062
lineYPosition: lineYPosition
2407824063
});
2407924064
prevY2 = firstPrevY2.prevY;
24065+
pY2 = prevY2;
2408024066
y2Arrj.push(prevY2);
2408124067
}
2408224068

@@ -24097,6 +24083,8 @@
2409724083
i: i,
2409824084
x: x,
2409924085
y: y,
24086+
pX: pX,
24087+
pY: pY,
2410024088
pathsFrom: pathsFrom,
2410124089
linePaths: linePaths,
2410224090
areaPaths: areaPaths,
@@ -24124,6 +24112,7 @@
2412424112

2412524113
var rangePaths = this._iterateOverDataPoints(_objectSpread2(_objectSpread2({}, iteratingOpts), {}, {
2412624114
series: seriesRangeEnd,
24115+
pY: pY2,
2412724116
pathsFrom: pathsFrom2,
2412824117
iterations: seriesRangeEnd[i].length - 1,
2412924118
isRangeStart: false
@@ -24403,6 +24392,8 @@
2440324392
i = _ref3.i,
2440424393
x = _ref3.x,
2440524394
y = _ref3.y,
24395+
pX = _ref3.pX,
24396+
pY = _ref3.pY,
2440624397
pathsFrom = _ref3.pathsFrom,
2440724398
linePaths = _ref3.linePaths,
2440824399
areaPaths = _ref3.areaPaths,
@@ -24517,6 +24508,8 @@
2451724508
xArrj: xArrj,
2451824509
yArrj: yArrj,
2451924510
y2Arrj: y2Arrj,
24511+
pX: pX,
24512+
pY: pY,
2452024513
linePath: linePath,
2452124514
areaPath: areaPath,
2452224515
linePaths: linePaths,
@@ -24527,10 +24520,12 @@
2452724520

2452824521
areaPaths = calculatedPaths.areaPaths;
2452924522
linePaths = calculatedPaths.linePaths;
24523+
pX = calculatedPaths.pX;
24524+
pY = calculatedPaths.pY;
2453024525
areaPath = calculatedPaths.areaPath;
2453124526
linePath = calculatedPaths.linePath;
2453224527

24533-
if (this.appendPathFrom && !(w.config.stroke.curve === 'smooth' && type === 'rangeArea')) {
24528+
if (this.appendPathFrom && !(w.config.stroke.curve === 'monotoneCubic' && type === 'rangeArea')) {
2453424529
pathFromLine = pathFromLine + graphics.line(x, this.zeroY);
2453524530
pathFromArea = pathFromArea + graphics.line(x, this.zeroY);
2453624531
}
@@ -24616,6 +24611,8 @@
2461624611
yArrj = _ref5.yArrj,
2461724612
y2 = _ref5.y2,
2461824613
y2Arrj = _ref5.y2Arrj,
24614+
pX = _ref5.pX,
24615+
pY = _ref5.pY,
2461924616
linePath = _ref5.linePath,
2462024617
areaPath = _ref5.areaPath,
2462124618
linePaths = _ref5.linePaths,
@@ -24635,11 +24632,11 @@
2463524632
}
2463624633
}
2463724634

24638-
if (type === 'rangeArea' && (w.globals.hasNullValues || w.config.forecastDataPoints.count > 0) && curve === 'smooth') {
24635+
if (type === 'rangeArea' && (w.globals.hasNullValues || w.config.forecastDataPoints.count > 0) && curve === 'monotoneCubic') {
2463924636
curve = 'straight';
2464024637
}
2464124638

24642-
if (curve === 'smooth') {
24639+
if (curve === 'monotoneCubic') {
2464324640
var shouldRenderMonotone = type === 'rangeArea' ? xArrj.length === w.globals.dataPoints : j === series[i].length - 2;
2464424641
var smoothInputs = xArrj.map(function (_, i) {
2464524642
return [xArrj[i], yArrj[i]];
@@ -24649,14 +24646,14 @@
2464924646

2465024647
if (shouldRenderMonotone && smoothInputs.length > 1) {
2465124648
var points = spline.points(smoothInputs);
24652-
linePath += svgPath(points, w.globals.gridWidth);
24649+
linePath += svgPath(points);
2465324650

2465424651
if (series[i][0] === null) {
2465524652
// if the first dataPoint is null, we use the linePath directly
2465624653
areaPath = linePath;
2465724654
} else {
2465824655
// else, we append the areaPath
24659-
areaPath += svgPath(points, w.globals.gridWidth);
24656+
areaPath += svgPath(points);
2466024657
}
2466124658

2466224659
if (type === 'rangeArea' && isRangeStart) {
@@ -24668,7 +24665,7 @@
2466824665
return [xArrjInversed[i], y2ArrjInversed[i]];
2466924666
});
2467024667
var pointsY2 = spline.points(smoothInputsY2);
24671-
linePath += svgPath(pointsY2, w.globals.gridWidth); // in range area, we don't have separate line and area path
24668+
linePath += svgPath(pointsY2); // in range area, we don't have separate line and area path
2467224669

2467324670
areaPath = linePath;
2467424671
} else {
@@ -24678,6 +24675,43 @@
2467824675
linePaths.push(linePath);
2467924676
areaPaths.push(areaPath);
2468024677
}
24678+
} else if (curve === 'smooth') {
24679+
var length = (x - pX) * 0.35;
24680+
24681+
if (w.globals.hasNullValues) {
24682+
if (series[i][j] !== null) {
24683+
if (series[i][j + 1] !== null) {
24684+
linePath = graphics.move(pX, pY) + graphics.curve(pX + length, pY, x - length, y, x + 1, y);
24685+
areaPath = graphics.move(pX + 1, pY) + graphics.curve(pX + length, pY, x - length, y, x + 1, y) + graphics.line(x, areaBottomY) + graphics.line(pX, areaBottomY) + 'z';
24686+
} else {
24687+
linePath = graphics.move(pX, pY);
24688+
areaPath = graphics.move(pX, pY) + 'z';
24689+
}
24690+
}
24691+
24692+
linePaths.push(linePath);
24693+
areaPaths.push(areaPath);
24694+
} else {
24695+
linePath = linePath + graphics.curve(pX + length, pY, x - length, y, x, y);
24696+
areaPath = areaPath + graphics.curve(pX + length, pY, x - length, y, x, y);
24697+
}
24698+
24699+
pX = x;
24700+
pY = y;
24701+
24702+
if (j === series[i].length - 2) {
24703+
// last loop, close path
24704+
areaPath = areaPath + graphics.curve(pX, pY, x, y, x, areaBottomY) + graphics.move(x, y) + 'z';
24705+
24706+
if (type === 'rangeArea' && isRangeStart) {
24707+
linePath = linePath + graphics.curve(pX, pY, x, y, x, y2) + graphics.move(x, y2) + 'z';
24708+
} else {
24709+
if (!w.globals.hasNullValues) {
24710+
linePaths.push(linePath);
24711+
areaPaths.push(areaPath);
24712+
}
24713+
}
24714+
}
2468124715
} else {
2468224716
if (series[i][j + 1] === null) {
2468324717
linePath = linePath + graphics.move(x, y);
@@ -24714,6 +24748,8 @@
2471424748
return {
2471524749
linePaths: linePaths,
2471624750
areaPaths: areaPaths,
24751+
pX: pX,
24752+
pY: pY,
2471724753
linePath: linePath,
2471824754
areaPath: areaPath
2471924755
};
@@ -25055,7 +25091,7 @@
2505525091
var y1 = r[1];
2505625092
var x2 = r[2];
2505725093
var y2 = r[3];
25058-
var elRect = graphics.drawRect(x1, y1, x2 - x1, y2 - y1, 0, '#fff', 1, _this.strokeWidth, w.config.plotOptions.treemap.useFillColorAsStroke ? color : w.globals.stroke.colors[i]);
25094+
var elRect = graphics.drawRect(x1, y1, x2 - x1, y2 - y1, w.config.plotOptions.treemap.borderRadius, '#fff', 1, _this.strokeWidth, w.config.plotOptions.treemap.useFillColorAsStroke ? color : w.globals.stroke.colors[i]);
2505925095
elRect.attr({
2506025096
cx: x1,
2506125097
cy: y1,
@@ -26716,7 +26752,7 @@
2671626752

2671726753

2671826754
if (typeof w.config.chart.events.selection !== 'function') {
26719-
var targets = Array.isArray(w.config.chart.brush.targets) || [w.config.chart.brush.target]; // retro compatibility with single target option
26755+
var targets = Array.isArray(w.config.chart.brush.targets) ? w.config.chart.brush.targets : [w.config.chart.brush.target]; // retro compatibility with single target option
2672026756

2672126757
targets.forEach(function (target) {
2672226758
var targetChart = ApexCharts.getChartByID(target);

dist/apexcharts.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/locales/pt.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
],
4141
"shortDays": ["Do", "Se", "Te", "Qa", "Qi", "Sx", "Sa"],
4242
"toolbar": {
43-
"exportToSVG": "Baixar SVG",
44-
"exportToPNG": "Baixar PNG",
45-
"exportToCSV": "Baixar CSV",
43+
"exportToSVG": "Transferir SVG",
44+
"exportToPNG": "Transferir PNG",
45+
"exportToCSV": "Transferir CSV",
4646
"menu": "Menu",
4747
"selection": "Selecionar",
4848
"selectionZoom": "Zoom: Selecionar",

0 commit comments

Comments
 (0)