|
1 | 1 | /*! |
2 | | - * ApexCharts v3.44.1 |
| 2 | + * ApexCharts v3.44.2 |
3 | 3 | * (c) 2018-2023 ApexCharts |
4 | 4 | * Released under the MIT License. |
5 | 5 | */ |
|
8750 | 8750 | if (cnf.chart.type === 'rangeBar' || cnf.chart.type === 'rangeArea' || ser[i].type === 'rangeBar' || ser[i].type === 'rangeArea') { |
8751 | 8751 | gl.isRangeData = true; |
8752 | 8752 |
|
8753 | | - if (gl.isComboCharts) { |
8754 | | - if (ser[i].type === 'rangeBar' || ser[i].type === 'rangeArea') { |
8755 | | - this.handleRangeData(ser, i); |
8756 | | - } |
8757 | | - } else if (cnf.chart.type === 'rangeBar' || cnf.chart.type === 'rangeArea') { |
| 8753 | + if (cnf.chart.type === 'rangeBar' || cnf.chart.type === 'rangeArea') { |
8758 | 8754 | this.handleRangeData(ser, i); |
8759 | 8755 | } |
8760 | 8756 | } |
|
9546 | 9542 | } |
9547 | 9543 | }; |
9548 | 9544 |
|
9549 | | - var handleUnequalDatetimeSeries = function handleUnequalDatetimeSeries() { |
| 9545 | + var handleUnequalXValues = function handleUnequalXValues() { |
9550 | 9546 | var categories = new Set(); |
9551 | 9547 | var data = {}; |
9552 | 9548 | series.forEach(function (s, sI) { |
|
9577 | 9573 | } |
9578 | 9574 |
|
9579 | 9575 | Array.from(categories).sort().forEach(function (cat) { |
9580 | | - rows.push([isTimeStamp(cat) ? w.config.chart.toolbar.export.csv.dateFormatter(cat) : Utils$1.isNumber(cat) ? cat : cat.split(columnDelimiter).join(''), data[cat].join(columnDelimiter)]); |
| 9576 | + rows.push([isTimeStamp(cat) && w.config.xaxis.type === 'datetime' ? w.config.chart.toolbar.export.csv.dateFormatter(cat) : Utils$1.isNumber(cat) ? cat : cat.split(columnDelimiter).join(''), data[cat].join(columnDelimiter)]); |
9581 | 9577 | }); |
9582 | 9578 | }; |
9583 | 9579 |
|
|
9612 | 9608 | rows.push(columns.join(columnDelimiter)); |
9613 | 9609 | } |
9614 | 9610 |
|
9615 | | - if (!w.globals.allSeriesHasEqualX && w.globals.axisCharts && w.config.xaxis.type === 'datetime' && !w.config.xaxis.categories.length && !w.config.labels.length) { |
9616 | | - handleUnequalDatetimeSeries(); |
| 9611 | + if (!w.globals.allSeriesHasEqualX && w.globals.axisCharts && !w.config.xaxis.categories.length && !w.config.labels.length) { |
| 9612 | + handleUnequalXValues(); |
9617 | 9613 | } else { |
9618 | 9614 | series.map(function (s, sI) { |
9619 | 9615 | if (w.globals.axisCharts) { |
@@ -11790,14 +11786,14 @@ |
11790 | 11786 |
|
11791 | 11787 | indicesOfSeriesInGroup.forEach(function (i) { |
11792 | 11788 | for (var j = 0; j < gl.series[gl.maxValsInArrayIndex].length; j++) { |
11793 | | - var _gl$series, _gl$series$i; |
| 11789 | + var _this$w$config$series, _this$w$config$series2; |
11794 | 11790 |
|
11795 | 11791 | if (typeof stackedPoss[group][j] === 'undefined') { |
11796 | 11792 | stackedPoss[group][j] = 0; |
11797 | 11793 | stackedNegs[group][j] = 0; |
11798 | 11794 | } |
11799 | 11795 |
|
11800 | | - var stackSeries = !_this.w.config.chart.stackOnlyBar || ((_gl$series = gl.series) === null || _gl$series === void 0 ? void 0 : (_gl$series$i = _gl$series[i]) === null || _gl$series$i === void 0 ? void 0 : _gl$series$i.type) === 'bar' || _this.w.config.chart.type === 'bar'; |
| 11796 | + var stackSeries = _this.w.config.chart.stacked && !gl.comboCharts || _this.w.config.chart.stacked && gl.comboCharts && (!_this.w.config.chart.stackOnlyBar || ((_this$w$config$series = _this.w.config.series) === null || _this$w$config$series === void 0 ? void 0 : (_this$w$config$series2 = _this$w$config$series[i]) === null || _this$w$config$series2 === void 0 ? void 0 : _this$w$config$series2.type) === 'bar'); |
11801 | 11797 |
|
11802 | 11798 | if (stackSeries) { |
11803 | 11799 | if (gl.series[i][j] !== null && Utils$1.isNumber(gl.series[i][j])) { |
|
14671 | 14667 | title: this.localeValues.exportToCSV |
14672 | 14668 | }]; |
14673 | 14669 |
|
14674 | | - if (!this.w.globals.allSeriesHasEqualX && !(this.w.globals.axisCharts && this.w.config.xaxis.type === 'datetime' && !this.w.config.xaxis.categories.length && !this.w.config.labels.length)) { |
14675 | | - // if it is a multi series, and all series have variable x values, export CSV won't work |
14676 | | - // unless it is a simple datetime chart |
14677 | | - menuItems.splice(2, 1); |
14678 | | - } |
14679 | | - |
14680 | 14670 | for (var i = 0; i < menuItems.length; i++) { |
14681 | 14671 | this.elMenuItems.push(document.createElement('div')); |
14682 | 14672 | this.elMenuItems[i].innerHTML = menuItems[i].title; |
@@ -23727,16 +23717,16 @@ |
23727 | 23717 | }, { |
23728 | 23718 | key: "determineFirstPrevY", |
23729 | 23719 | value: function determineFirstPrevY(_ref3) { |
23730 | | - var _series$i, _series$i2; |
| 23720 | + var _this$w$config$series, _series$i; |
23731 | 23721 |
|
23732 | 23722 | var i = _ref3.i, |
23733 | 23723 | series = _ref3.series, |
23734 | 23724 | prevY = _ref3.prevY, |
23735 | 23725 | lineYPosition = _ref3.lineYPosition; |
23736 | 23726 | var w = this.w; |
23737 | | - var stackSeries = w.config.chart.stacked && (!w.config.chart.stackOnlyBar || (series === null || series === void 0 ? void 0 : (_series$i = series[i]) === null || _series$i === void 0 ? void 0 : _series$i.type) === 'bar'); |
| 23727 | + var stackSeries = w.config.chart.stacked && !w.globals.comboCharts || w.config.chart.stacked && w.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || ((_this$w$config$series = this.w.config.series[i]) === null || _this$w$config$series === void 0 ? void 0 : _this$w$config$series.type) === 'bar'); |
23738 | 23728 |
|
23739 | | - if (typeof ((_series$i2 = series[i]) === null || _series$i2 === void 0 ? void 0 : _series$i2[0]) !== 'undefined') { |
| 23729 | + if (typeof ((_series$i = series[i]) === null || _series$i === void 0 ? void 0 : _series$i[0]) !== 'undefined') { |
23740 | 23730 | if (stackSeries) { |
23741 | 23731 | if (i > 0) { |
23742 | 23732 | // 1st y value of previous series |
|
24407 | 24397 | }; |
24408 | 24398 |
|
24409 | 24399 | var y2 = y; |
24410 | | - var stackSeries = w.config.chart.stacked && (!this.w.config.chart.stackOnlyBar || ((_this$w$config$series = this.w.config.series[realIndex]) === null || _this$w$config$series === void 0 ? void 0 : _this$w$config$series.type) === 'bar'); |
| 24400 | + var stackSeries = w.config.chart.stacked && !w.globals.comboCharts || w.config.chart.stacked && w.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || ((_this$w$config$series = this.w.config.series[realIndex]) === null || _this$w$config$series === void 0 ? void 0 : _this$w$config$series.type) === 'bar'); |
24411 | 24401 |
|
24412 | 24402 | for (var j = 0; j < iterations; j++) { |
24413 | 24403 | var isNull = typeof series[i][j + 1] === 'undefined' || series[i][j + 1] === null; |
|
0 commit comments