Skip to content

Commit 4454e10

Browse files
committed
build - 3.40.0
1 parent 3794b6c commit 4454e10

File tree

5 files changed

+110
-22
lines changed

5 files changed

+110
-22
lines changed

dist/apexcharts.amd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apexcharts.common.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apexcharts.esm.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apexcharts.js

Lines changed: 103 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ApexCharts v3.39.0
2+
* ApexCharts v3.40.0
33
* (c) 2018-2023 ApexCharts
44
* Released under the MIT License.
55
*/
@@ -1218,6 +1218,8 @@
12181218
_createClass(Graphics, [{
12191219
key: "roundPathCorners",
12201220
value: function roundPathCorners(pathString, radius) {
1221+
if (pathString.indexOf('NaN') > -1) pathString = '';
1222+
12211223
function moveTowardsLength(movingPoint, targetPoint, amount) {
12221224
var width = targetPoint.x - movingPoint.x;
12231225
var height = targetPoint.y - movingPoint.y;
@@ -3583,6 +3585,8 @@
35833585
rangeBarOverlap: true,
35843586
rangeBarGroupRows: false,
35853587
hideZeroBarsWhenGrouped: false,
3588+
isDumbbell: false,
3589+
dumbbellColors: undefined,
35863590
colors: {
35873591
ranges: [],
35883592
backgroundBarColors: [],
@@ -5414,6 +5418,11 @@
54145418
};
54155419

54165420
return {
5421+
chart: {
5422+
animations: {
5423+
animateGradually: false
5424+
}
5425+
},
54175426
stroke: {
54185427
width: 0,
54195428
lineCap: 'square'
@@ -5457,6 +5466,9 @@
54575466
colors: ['#fff']
54585467
}
54595468
},
5469+
markers: {
5470+
size: 10
5471+
},
54605472
tooltip: {
54615473
shared: false,
54625474
followCursor: true,
@@ -5481,6 +5493,21 @@
54815493
}
54825494
};
54835495
}
5496+
}, {
5497+
key: "dumbbell",
5498+
value: function dumbbell(opts) {
5499+
var _opts$plotOptions$bar, _opts$plotOptions$bar2;
5500+
5501+
if (!((_opts$plotOptions$bar = opts.plotOptions.bar) !== null && _opts$plotOptions$bar !== void 0 && _opts$plotOptions$bar.barHeight)) {
5502+
opts.plotOptions.bar.barHeight = 2;
5503+
}
5504+
5505+
if (!((_opts$plotOptions$bar2 = opts.plotOptions.bar) !== null && _opts$plotOptions$bar2 !== void 0 && _opts$plotOptions$bar2.columnWidth)) {
5506+
opts.plotOptions.bar.columnWidth = 2;
5507+
}
5508+
5509+
return opts;
5510+
}
54845511
}, {
54855512
key: "area",
54865513
value: function area() {
@@ -6082,6 +6109,8 @@
60826109
var newDefaults = {};
60836110

60846111
if (opts && _typeof(opts) === 'object') {
6112+
var _opts$chart$brush, _opts$plotOptions, _opts$plotOptions$bar, _opts$chart$sparkline, _window$Apex$chart, _window$Apex$chart$sp;
6113+
60856114
var chartDefaults = {};
60866115
var chartTypes = ['line', 'area', 'bar', 'candlestick', 'boxPlot', 'rangeBar', 'rangeArea', 'bubble', 'scatter', 'heatmap', 'treemap', 'pie', 'polarArea', 'donut', 'radar', 'radialBar'];
60876116

@@ -6095,12 +6124,16 @@
60956124
chartDefaults = defaults.stackedBars();
60966125
}
60976126

6098-
if (opts.chart.brush && opts.chart.brush.enabled) {
6127+
if ((_opts$chart$brush = opts.chart.brush) !== null && _opts$chart$brush !== void 0 && _opts$chart$brush.enabled) {
60996128
chartDefaults = defaults.brush(chartDefaults);
61006129
}
61016130

61026131
if (opts.chart.stacked && opts.chart.stackType === '100%') {
61036132
opts = defaults.stacked100(opts);
6133+
}
6134+
6135+
if ((_opts$plotOptions = opts.plotOptions) !== null && _opts$plotOptions !== void 0 && (_opts$plotOptions$bar = _opts$plotOptions.bar) !== null && _opts$plotOptions$bar !== void 0 && _opts$plotOptions$bar.isDumbbell) {
6136+
opts = defaults.dumbbell(opts);
61046137
} // If user has specified a dark theme, make the tooltip dark too
61056138

61066139

@@ -6117,7 +6150,7 @@
61176150

61186151
opts = this.checkForCatToNumericXAxis(this.chartType, chartDefaults, opts);
61196152

6120-
if (opts.chart.sparkline && opts.chart.sparkline.enabled || window.Apex.chart && window.Apex.chart.sparkline && window.Apex.chart.sparkline.enabled) {
6153+
if ((_opts$chart$sparkline = opts.chart.sparkline) !== null && _opts$chart$sparkline !== void 0 && _opts$chart$sparkline.enabled || (_window$Apex$chart = window.Apex.chart) !== null && _window$Apex$chart !== void 0 && (_window$Apex$chart$sp = _window$Apex$chart.sparkline) !== null && _window$Apex$chart$sp !== void 0 && _window$Apex$chart$sp.enabled) {
61216154
chartDefaults = defaults.sparkline(chartDefaults);
61226155
}
61236156

@@ -6137,8 +6170,10 @@
61376170
}, {
61386171
key: "checkForCatToNumericXAxis",
61396172
value: function checkForCatToNumericXAxis(chartType, chartDefaults, opts) {
6173+
var _opts$plotOptions2, _opts$plotOptions2$ba;
6174+
61406175
var defaults = new Defaults(opts);
6141-
var isBarHorizontal = (chartType === 'bar' || chartType === 'boxPlot') && opts.plotOptions && opts.plotOptions.bar && opts.plotOptions.bar.horizontal;
6176+
var isBarHorizontal = (chartType === 'bar' || chartType === 'boxPlot') && ((_opts$plotOptions2 = opts.plotOptions) === null || _opts$plotOptions2 === void 0 ? void 0 : (_opts$plotOptions2$ba = _opts$plotOptions2.bar) === null || _opts$plotOptions2$ba === void 0 ? void 0 : _opts$plotOptions2$ba.horizontal);
61426177
var unsupportedZoom = chartType === 'pie' || chartType === 'polarArea' || chartType === 'donut' || chartType === 'radar' || chartType === 'radialBar' || chartType === 'heatmap';
61436178
var notNumericXAxis = opts.xaxis.type !== 'datetime' && opts.xaxis.type !== 'numeric';
61446179
var tickPlacement = opts.xaxis.tickPlacement ? opts.xaxis.tickPlacement : chartDefaults.xaxis && chartDefaults.xaxis.tickPlacement;
@@ -9556,7 +9591,7 @@
95569591
var offX = w.globals.barPadForNumericAxis;
95579592
var elHorzLine = graphics.drawLine(w.globals.padHorizontal + w.config.xaxis.axisBorder.offsetX - offX, this.offY, this.xaxisBorderWidth + offX, this.offY, w.config.xaxis.axisBorder.color, 0, this.xaxisBorderHeight);
95589593

9559-
if (this.elgrid && this.elgrid.elGridBorders) {
9594+
if (this.elgrid && this.elgrid.elGridBorders && w.config.grid.show) {
95609595
this.elgrid.elGridBorders.add(elHorzLine);
95619596
} else {
95629597
elXaxis.add(elHorzLine);
@@ -9824,7 +9859,7 @@
98249859
if (axisBorder.show) {
98259860
var elVerticalLine = graphics.drawLine(w.globals.padHorizontal + axisBorder.offsetX + offX, 1 + axisBorder.offsetY, w.globals.padHorizontal + axisBorder.offsetX + offX, w.globals.gridHeight + axisBorder.offsetY, axisBorder.color, 0);
98269861

9827-
if (this.elgrid && this.elgrid.elGridBorders) {
9862+
if (this.elgrid && this.elgrid.elGridBorders && w.config.grid.show) {
98289863
this.elgrid.elGridBorders.add(elVerticalLine);
98299864
} else {
98309865
elYaxis.add(elVerticalLine);
@@ -10166,7 +10201,7 @@
1016610201
var line = graphics.drawLine(x1 - (isHorzLine ? offX : 0), y1, x2 + (isHorzLine ? offX : 0), y2, w.config.grid.borderColor, strokeDashArray);
1016710202
line.node.classList.add('apexcharts-gridline');
1016810203

10169-
if (excludeBorders) {
10204+
if (excludeBorders && w.config.grid.show) {
1017010205
this.elGridBorders.add(line);
1017110206
} else {
1017210207
parent.add(line);
@@ -10408,6 +10443,7 @@
1040810443
xCount = this.xaxisLabels.length;
1040910444

1041010445
if (this.isRangeBar) {
10446+
xCount--;
1041110447
yTickAmount = w.globals.labels.length;
1041210448

1041310449
if (w.config.xaxis.tickAmount && w.config.xaxis.labels.formatter) {
@@ -11858,7 +11894,7 @@
1185811894

1185911895
var elHorzLine = graphics.drawLine(w.globals.padHorizontal + lineCorrection + axisBorder.offsetX, this.xAxisoffX, w.globals.gridWidth, this.xAxisoffX, axisBorder.color, 0, axisBorder.height); // in horizontal bars, we append axisBorder to elGridBorders element to avoid z-index issues
1186011896

11861-
if (this.elgrid && this.elgrid.elGridBorders) {
11897+
if (this.elgrid && this.elgrid.elGridBorders && w.config.grid.show) {
1186211898
this.elgrid.elGridBorders.add(elHorzLine);
1186311899
} else {
1186411900
parent.add(elHorzLine);
@@ -18813,6 +18849,11 @@
1881318849
}
1881418850

1881518851
barHeight = barHeight * parseInt(this.barCtx.barOptions.barHeight, 10) / 100;
18852+
18853+
if (String(this.barCtx.barOptions.barHeight).indexOf('%') === -1) {
18854+
barHeight = parseInt(this.barCtx.barOptions.barHeight, 10);
18855+
}
18856+
1881618857
zeroW = this.barCtx.baseLineInvertedY + w.globals.padHorizontal + (this.barCtx.isReversed ? w.globals.gridWidth : 0) - (this.barCtx.isReversed ? this.barCtx.baseLineInvertedY * 2 : 0);
1881718858
y = (yDivision - barHeight * this.barCtx.seriesLen) / 2;
1881818859
} else {
@@ -18844,6 +18885,10 @@
1884418885
}
1884518886
}
1884618887

18888+
if (String(this.barCtx.barOptions.columnWidth).indexOf('%') === -1) {
18889+
barWidth = parseInt(this.barCtx.barOptions.columnWidth, 10);
18890+
}
18891+
1884718892
zeroH = w.globals.gridHeight - this.barCtx.baseLineY[this.barCtx.yaxisIndex] - (this.barCtx.isReversed ? w.globals.gridHeight : 0) + (this.barCtx.isReversed ? this.barCtx.baseLineY[this.barCtx.yaxisIndex] * 2 : 0);
1884818893
x = w.globals.padHorizontal + (xDivision - barWidth * this.barCtx.seriesLen) / 2;
1884918894
}
@@ -19200,14 +19245,33 @@
1920019245
var w = this.w;
1920119246
var goals = [];
1920219247

19248+
var pushGoal = function pushGoal(value, attrs) {
19249+
var _goals$push;
19250+
19251+
goals.push((_goals$push = {}, _defineProperty(_goals$push, type, type === 'x' ? _this.getXForValue(value, zeroW, false) : _this.getYForValue(value, zeroH, false)), _defineProperty(_goals$push, "attrs", attrs), _goals$push));
19252+
};
19253+
1920319254
if (w.globals.seriesGoals[i] && w.globals.seriesGoals[i][j] && Array.isArray(w.globals.seriesGoals[i][j])) {
1920419255
w.globals.seriesGoals[i][j].forEach(function (goal) {
19205-
var _goals$push;
19206-
19207-
goals.push((_goals$push = {}, _defineProperty(_goals$push, type, type === 'x' ? _this.getXForValue(goal.value, zeroW, false) : _this.getYForValue(goal.value, zeroH, false)), _defineProperty(_goals$push, "attrs", goal), _goals$push));
19256+
pushGoal(goal.value, goal);
1920819257
});
1920919258
}
1921019259

19260+
if (this.barCtx.barOptions.isDumbbell && w.globals.seriesRange.length) {
19261+
var colors = this.barCtx.barOptions.dumbbellColors ? this.barCtx.barOptions.dumbbellColors : w.globals.colors;
19262+
var commonAttrs = {
19263+
strokeHeight: type === 'x' ? 0 : w.globals.markers.size[i],
19264+
strokeWidth: type === 'x' ? w.globals.markers.size[i] : 0,
19265+
strokeDashArray: 0,
19266+
strokeLineCap: 'round',
19267+
strokeColor: Array.isArray(colors[i]) ? colors[i][0] : colors[i]
19268+
};
19269+
pushGoal(w.globals.seriesRangeStart[i][j], commonAttrs);
19270+
pushGoal(w.globals.seriesRangeEnd[i][j], _objectSpread2(_objectSpread2({}, commonAttrs), {}, {
19271+
strokeColor: Array.isArray(colors[i]) ? colors[i][1] : colors[i]
19272+
}));
19273+
}
19274+
1921119275
return goals;
1921219276
}
1921319277
}, {
@@ -19223,6 +19287,11 @@
1922319287
var lineGroup = graphics.group({
1922419288
className: 'apexcharts-bar-goals-groups'
1922519289
});
19290+
lineGroup.node.classList.add('apexcharts-element-hidden');
19291+
this.barCtx.w.globals.delayedElements.push({
19292+
el: lineGroup.node
19293+
});
19294+
lineGroup.attr('clip-path', "url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid, ")"));
1922619295
var line = null;
1922719296

1922819297
if (this.barCtx.isHorizontal) {
@@ -20007,20 +20076,31 @@
2000720076
}, {
2000820077
key: "initialPositions",
2000920078
value: function initialPositions(x, y, xDivision, yDivision, zeroH, zeroW) {
20010-
var _w$globals$seriesGrou, _w$globals$seriesGrou2;
20011-
2001220079
var w = this.w;
2001320080
var barHeight, barWidth;
2001420081

2001520082
if (this.isHorizontal) {
20083+
var _w$globals$seriesGrou;
20084+
2001620085
// height divided into equal parts
2001720086
yDivision = w.globals.gridHeight / w.globals.dataPoints;
2001820087
barHeight = yDivision;
2001920088
barHeight = barHeight * parseInt(w.config.plotOptions.bar.barHeight, 10) / 100;
20089+
20090+
if ((_w$globals$seriesGrou = w.globals.seriesGroups) !== null && _w$globals$seriesGrou !== void 0 && _w$globals$seriesGrou.length) {
20091+
barHeight = barHeight / w.globals.seriesGroups.length;
20092+
}
20093+
20094+
if (String(w.config.plotOptions.bar.barHeight).indexOf('%') === -1) {
20095+
barHeight = parseInt(w.config.plotOptions.bar.barHeight, 10);
20096+
}
20097+
2002020098
zeroW = this.baseLineInvertedY + w.globals.padHorizontal + (this.isReversed ? w.globals.gridWidth : 0) - (this.isReversed ? this.baseLineInvertedY * 2 : 0); // initial y position is half of barHeight * half of number of Bars
2002120099

2002220100
y = (yDivision - barHeight) / 2;
2002320101
} else {
20102+
var _w$globals$seriesGrou2;
20103+
2002420104
// width divided into equal parts
2002520105
xDivision = w.globals.gridWidth / w.globals.dataPoints;
2002620106
barWidth = xDivision;
@@ -20033,6 +20113,14 @@
2003320113
barWidth = barWidth * parseInt(w.config.plotOptions.bar.columnWidth, 10) / 100;
2003420114
}
2003520115

20116+
if ((_w$globals$seriesGrou2 = w.globals.seriesGroups) !== null && _w$globals$seriesGrou2 !== void 0 && _w$globals$seriesGrou2.length) {
20117+
barWidth = barWidth / w.globals.seriesGroups.length;
20118+
}
20119+
20120+
if (String(w.config.plotOptions.bar.columnWidth).indexOf('%') === -1) {
20121+
barWidth = parseInt(w.config.plotOptions.bar.columnWidth, 10);
20122+
}
20123+
2003620124
zeroH = w.globals.gridHeight - this.baseLineY[this.yaxisIndex] - (this.isReversed ? w.globals.gridHeight : 0) + (this.isReversed ? this.baseLineY[this.yaxisIndex] * 2 : 0); // initial x position is one third of barWidth
2003720125

2003820126
x = w.globals.padHorizontal + (xDivision - barWidth) / 2;
@@ -20043,8 +20131,8 @@
2004320131
y: y,
2004420132
yDivision: yDivision,
2004520133
xDivision: xDivision,
20046-
barHeight: (_w$globals$seriesGrou = w.globals.seriesGroups) !== null && _w$globals$seriesGrou !== void 0 && _w$globals$seriesGrou.length ? barHeight / w.globals.seriesGroups.length : barHeight,
20047-
barWidth: (_w$globals$seriesGrou2 = w.globals.seriesGroups) !== null && _w$globals$seriesGrou2 !== void 0 && _w$globals$seriesGrou2.length ? barWidth / w.globals.seriesGroups.length : barWidth,
20134+
barHeight: barHeight,
20135+
barWidth: barWidth,
2004820136
zeroH: zeroH,
2004920137
zeroW: zeroW
2005020138
};

dist/apexcharts.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)