Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
ettoredn committed Feb 23, 2023
1 parent c16efb6 commit 247f7c1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
4 changes: 2 additions & 2 deletions dist/apexcharts.common.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/apexcharts.esm.js

Large diffs are not rendered by default.

39 changes: 23 additions & 16 deletions dist/apexcharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15697,7 +15697,11 @@
}
}, {
key: "getElMarkers",
value: function getElMarkers() {
value: function getElMarkers(capturedSeries) {
if (typeof capturedSeries == 'number') {
return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(capturedSeries, "'] .apexcharts-series-markers"));
}

return this.w.globals.dom.baseEl.querySelectorAll(' .apexcharts-series-markers');
}
}, {
Expand All @@ -15720,8 +15724,8 @@
}
}, {
key: "hasMarkers",
value: function hasMarkers() {
var markers = this.getElMarkers();
value: function hasMarkers(capturedSeries) {
var markers = this.getElMarkers(capturedSeries);
return markers.length > 0;
}
}, {
Expand Down Expand Up @@ -16610,7 +16614,7 @@
}
}, {
key: "moveStickyTooltipOverBars",
value: function moveStickyTooltipOverBars(j) {
value: function moveStickyTooltipOverBars(j, capturedSeries) {
var w = this.w;
var ttCtx = this.ttCtx;
var barLen = w.globals.columnSeries ? w.globals.columnSeries.length : w.globals.series.length;
Expand All @@ -16623,10 +16627,8 @@

var jBar = w.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(i, "'] path[j='").concat(j, "'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(i, "'] path[j='").concat(j, "'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(i, "'] path[j='").concat(j, "'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(i, "'] path[j='").concat(j, "']"));

if (!jBar) {
if (!jBar && typeof capturedSeries == 'number') {
// Try with captured series index
var capturedSeries = w.globals.capturedSeriesIndex; // :number|undefined

jBar = w.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(capturedSeries, "'] path[j='").concat(j, "'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(capturedSeries, "'] path[j='").concat(j, "'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(capturedSeries, "'] path[j='").concat(j, "'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(capturedSeries, "'] path[j='").concat(j, "'],\n .apexcharts-line-series .apexcharts-series[data\\:realIndex='").concat(capturedSeries, "'] path[j='").concat(j, "']"));
}

Expand All @@ -16636,7 +16638,7 @@
var bh = jBar ? parseFloat(jBar.getAttribute('barHeight')) : 0;
var elGrid = ttCtx.getElGrid();
var seriesBound = elGrid.getBoundingClientRect();
var isBoxOrCandle = jBar.classList.contains('apexcharts-candlestick-area') || jBar.classList.contains('apexcharts-boxPlot-area');
var isBoxOrCandle = jBar && (jBar.classList.contains('apexcharts-candlestick-area') || jBar.classList.contains('apexcharts-boxPlot-area'));

if (w.globals.isXNumeric) {
if (jBar && !isBoxOrCandle) {
Expand Down Expand Up @@ -17950,6 +17952,7 @@
});
var j = capj.j;
var capturedSeries = capj.capturedSeries;
if (w.globals.collapsedSeriesIndices.includes(capturedSeries)) capturedSeries = null;
var bounds = opt.elGrid.getBoundingClientRect();

if (capj.hoverX < 0 || capj.hoverX > bounds.width) {
Expand All @@ -17963,7 +17966,10 @@
// couldn't capture any series. check if shared X is same,
// if yes, draw a grouped tooltip
if (this.tooltipUtil.isXoverlap(j) || w.globals.isBarHorizontal) {
this.create(e, this, 0, j, opt.ttItems);
var firstVisibleSeries = w.globals.series.findIndex(function (s, i) {
return !w.globals.collapsedSeriesIndices.includes(i);
});
this.create(e, this, firstVisibleSeries, j, opt.ttItems);
}
}
}
Expand All @@ -17989,7 +17995,10 @@
}
} else {
if (this.tooltipUtil.isXoverlap(j)) {
this.create(e, this, 0, j, opt.ttItems);
var firstVisibleSeries = w.globals.series.findIndex(function (s, i) {
return !w.globals.collapsedSeriesIndices.includes(i);
});
this.create(e, this, firstVisibleSeries, j, opt.ttItems);
}
}
}
Expand Down Expand Up @@ -18076,7 +18085,7 @@
}

if (shared === null) shared = this.tConfig.shared;
var hasMarkers = this.tooltipUtil.hasMarkers();
var hasMarkers = this.tooltipUtil.hasMarkers(capturedSeries);
var bars = this.tooltipUtil.getElBars();

if (w.config.legend.tooltipHoverFormatter) {
Expand Down Expand Up @@ -18124,9 +18133,7 @@
} else {
ttCtx.tooltipPosition.moveDynamicPointsOnHover(j);
}
}

if (this.tooltipUtil.hasBars()) {
} else if (this.tooltipUtil.hasBars()) {
this.barSeriesHeight = this.tooltipUtil.getBarsHeight(bars);

if (this.barSeriesHeight > 0) {
Expand All @@ -18135,7 +18142,7 @@
var paths = w.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(j, "']")); // de-activate first

this.deactivateHoverFilter();
this.tooltipPosition.moveStickyTooltipOverBars(j);
this.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);

for (var b = 0; b < paths.length; b++) {
graphics.pathMouseEnter(paths[b]);
Expand All @@ -18151,7 +18158,7 @@
});

if (this.tooltipUtil.hasBars()) {
ttCtx.tooltipPosition.moveStickyTooltipOverBars(j);
ttCtx.tooltipPosition.moveStickyTooltipOverBars(j, capturedSeries);
}

if (hasMarkers) {
Expand Down
4 changes: 2 additions & 2 deletions dist/apexcharts.min.js

Large diffs are not rendered by default.

0 comments on commit 247f7c1

Please sign in to comment.