Skip to content

Commit 434cade

Browse files
committed
build - 3.23.1
1 parent 420771d commit 434cade

File tree

5 files changed

+74
-35
lines changed

5 files changed

+74
-35
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: 67 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ApexCharts v3.23.0
2+
* ApexCharts v3.23.1
33
* (c) 2018-2020 Juned Chhipa
44
* Released under the MIT License.
55
*/
@@ -430,9 +430,11 @@
430430
key: "getDimensions",
431431
value: function getDimensions(el) {
432432
var computedStyle = getComputedStyle(el, null);
433-
var height = parseFloat(computedStyle.height);
434-
var width = parseFloat(computedStyle.width);
435-
return [width, height];
433+
var elementHeight = el.clientHeight;
434+
var elementWidth = el.clientWidth;
435+
elementHeight -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);
436+
elementWidth -= parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);
437+
return [elementWidth, elementHeight];
436438
}
437439
}, {
438440
key: "getBoundingClientRect",
@@ -5559,7 +5561,7 @@
55595561
}();
55605562

55615563
/**
5562-
* ApexCharts Series Class for interation with the Series of the chart.
5564+
* ApexCharts Series Class for interaction with the Series of the chart.
55635565
*
55645566
* @module Series
55655567
**/
@@ -6737,14 +6739,15 @@
67376739
strokeWidth = _ref3.strokeWidth,
67386740
elSeries = _ref3.elSeries;
67396741
var w = this.w;
6742+
var realIndex = indexes.realIndex;
67406743
var i = indexes.i;
67416744
var j = indexes.j;
67426745
var bc = indexes.bc;
67436746

67446747
if (w.globals.isXNumeric) {
6745-
var sxI = i;
6748+
var sxI = realIndex;
67466749

6747-
if (!w.globals.seriesX[i].length) {
6750+
if (!w.globals.seriesX[realIndex].length) {
67486751
sxI = w.globals.maxValsInArrayIndex;
67496752
}
67506753

@@ -9862,7 +9865,7 @@
98629865
if (!Utils.isIE11()) {
98639866
// not IE11 - noop
98649867
return svgData;
9865-
} // replace second occurence of "xmlns" attribute with "xmlns:xlink" with correct url + add xmlns:svgjs
9868+
} // replace second occurrence of "xmlns" attribute with "xmlns:xlink" with correct url + add xmlns:svgjs
98669869

98679870

98689871
var nXmlnsSeen = 0;
@@ -10465,7 +10468,7 @@
1046510468

1046610469
if (w.config.xaxis.axisTicks.show) {
1046710470
var graphics = new Graphics(this.ctx);
10468-
var line = graphics.drawLine(x1 + w.config.xaxis.axisTicks.offsetX, y1 + w.config.xaxis.offsetY, x2 + w.config.xaxis.axisTicks.offsetX, y2 + w.config.xaxis.offsetY, w.config.xaxis.axisTicks.color); // we are not returning anything, but appending directly to the element pased in param
10471+
var line = graphics.drawLine(x1 + w.config.xaxis.axisTicks.offsetX, y1 + w.config.xaxis.offsetY, x2 + w.config.xaxis.axisTicks.offsetX, y2 + w.config.xaxis.offsetY, w.config.xaxis.axisTicks.color); // we are not returning anything, but appending directly to the element passed in param
1046910472

1047010473
appendToElement.add(line);
1047110474
line.node.classList.add('apexcharts-xaxis-tick');
@@ -11731,7 +11734,7 @@
1173111734
) {
1173211735
var diff = gl.maxY - lowestYInAllSeries;
1173311736

11734-
if (lowestYInAllSeries >= 0 && lowestYInAllSeries <= 10) {
11737+
if (lowestYInAllSeries >= 0 && lowestYInAllSeries <= 10 || cnf.yaxis[0].min !== undefined || cnf.yaxis[0].max !== undefined) {
1173511738
// if minY is already 0/low value, we don't want to go negatives here - so this check is essential.
1173611739
diff = 0;
1173711740
}
@@ -12205,7 +12208,7 @@
1220512208
}
1220612209

1220712210
return elYaxis;
12208-
} // This actually becomes horizonal axis (for bar charts)
12211+
} // This actually becomes horizontal axis (for bar charts)
1220912212

1221012213
}, {
1221112214
key: "drawYaxisInversed",
@@ -12915,7 +12918,7 @@
1291512918
return c;
1291612919
});
1291712920
}
12918-
} // user defined colors in series aray
12921+
} // user defined colors in series array
1291912922

1292012923

1292112924
w.globals.seriesColors.map(function (c, i) {
@@ -12954,7 +12957,7 @@
1295412957
w.globals.colors = monoArr.slice();
1295512958
}
1295612959

12957-
var defaultColors = w.globals.colors.slice(); // if user specfied less colors than no. of series, push the same colors again
12960+
var defaultColors = w.globals.colors.slice(); // if user specified fewer colors than no. of series, push the same colors again
1295812961

1295912962
this.pushExtraColors(w.globals.colors);
1296012963
var colorTypes = ['fill', 'stroke'];
@@ -13638,7 +13641,7 @@
1363813641
padForLabelTitle(yTitleCoord, index);
1363913642
});
1364013643

13641-
if (w.globals.isBarHorizontal) {
13644+
if (w.globals.isBarHorizontal && !w.config.yaxis[0].floating) {
1364213645
yAxisWidth = w.globals.yLabelsCoords[0].width + w.globals.yTitleCoords[0].width + 15;
1364313646
}
1364413647

@@ -15704,8 +15707,8 @@
1570415707
x: me.clientX,
1570515708
y: me.clientY
1570615709
};
15707-
var xLowestValue = w.globals.minX;
15708-
var xHighestValue = w.globals.maxX; // on a category, we don't pan continuosly as it causes bugs
15710+
var xLowestValue = w.globals.isTimelineBar ? w.globals.minY : w.globals.minX;
15711+
var xHighestValue = w.globals.isTimelineBar ? w.globals.maxY : w.globals.maxX; // on a category, we don't pan continuosly as it causes bugs
1570915712

1571015713
if (!w.config.xaxis.convertedCatToNumeric) {
1571115714
me.panScrolled(xLowestValue, xHighestValue);
@@ -15742,18 +15745,29 @@
1574215745
var w = this.w;
1574315746
var xyRatios = this.xyRatios;
1574415747
var yaxis = Utils.clone(w.globals.initialConfig.yaxis);
15748+
var xRatio = xyRatios.xRatio;
15749+
var minX = w.globals.minX;
15750+
var maxX = w.globals.maxX;
15751+
15752+
if (w.globals.isTimelineBar) {
15753+
xRatio = xyRatios.invertedYRatio;
15754+
minX = w.globals.minY;
15755+
maxX = w.globals.maxY;
15756+
}
1574515757

1574615758
if (this.moveDirection === 'left') {
15747-
xLowestValue = w.globals.minX + w.globals.gridWidth / 15 * xyRatios.xRatio;
15748-
xHighestValue = w.globals.maxX + w.globals.gridWidth / 15 * xyRatios.xRatio;
15759+
xLowestValue = minX + w.globals.gridWidth / 15 * xRatio;
15760+
xHighestValue = maxX + w.globals.gridWidth / 15 * xRatio;
1574915761
} else if (this.moveDirection === 'right') {
15750-
xLowestValue = w.globals.minX - w.globals.gridWidth / 15 * xyRatios.xRatio;
15751-
xHighestValue = w.globals.maxX - w.globals.gridWidth / 15 * xyRatios.xRatio;
15762+
xLowestValue = minX - w.globals.gridWidth / 15 * xRatio;
15763+
xHighestValue = maxX - w.globals.gridWidth / 15 * xRatio;
1575215764
}
1575315765

15754-
if (xLowestValue < w.globals.initialMinX || xHighestValue > w.globals.initialMaxX) {
15755-
xLowestValue = w.globals.minX;
15756-
xHighestValue = w.globals.maxX;
15766+
if (!w.globals.isTimelineBar) {
15767+
if (xLowestValue < w.globals.initialMinX || xHighestValue > w.globals.initialMaxX) {
15768+
xLowestValue = minX;
15769+
xHighestValue = maxX;
15770+
}
1575715771
}
1575815772

1575915773
var xaxis = {
@@ -18098,8 +18112,27 @@
1809818112
var y = w.globals.clientY - seriesBound.top - tooltipRect.ttHeight - 10;
1809918113
tooltipEl.style.left = x + 'px';
1810018114
tooltipEl.style.top = y + 'px';
18115+
18116+
if (w.config.legend.tooltipHoverFormatter) {
18117+
var legendFormatter = w.config.legend.tooltipHoverFormatter;
18118+
var i = rel - 1;
18119+
var legendName = this.legendLabels[i].getAttribute('data:default-text');
18120+
var text = legendFormatter(legendName, {
18121+
seriesIndex: i,
18122+
dataPointIndex: i,
18123+
w: w
18124+
});
18125+
this.legendLabels[i].innerHTML = text;
18126+
}
1810118127
} else if (e.type === 'mouseout' || e.type === 'touchend') {
1810218128
tooltipEl.classList.remove('apexcharts-active');
18129+
18130+
if (w.config.legend.tooltipHoverFormatter) {
18131+
this.legendLabels.forEach(function (l) {
18132+
var defaultText = l.getAttribute('data:default-text');
18133+
l.innerHTML = decodeURIComponent(defaultText);
18134+
});
18135+
}
1810318136
}
1810418137
}
1810518138
}, {
@@ -19603,7 +19636,7 @@
1960319636
seriesNumber: i,
1960419637
size: this.sliceSizes[i],
1960519638
value: series[i]
19606-
}); // additionaly, pass size for gradient drawing in the fillPath function
19639+
}); // additionally, pass size for gradient drawing in the fillPath function
1960719640

1960819641
var path = this.getChangedPath(prevStartAngle, prevEndAngle);
1960919642
var elPath = graphics.drawPath({
@@ -19618,6 +19651,7 @@
1961819651
index: 0,
1961919652
j: i
1962019653
});
19654+
filters.setSelectionFilter(elPath, 0, i);
1962119655

1962219656
if (w.config.chart.dropShadow.enabled) {
1962319657
var shadow = w.config.chart.dropShadow;
@@ -19685,6 +19719,10 @@
1968519719
elPath.click(this.pieClicked.bind(this, i));
1968619720
}
1968719721

19722+
if (typeof w.globals.selectedDataPoints[0] !== 'undefined' && w.globals.selectedDataPoints[0].indexOf(i) > -1) {
19723+
this.pieClicked(i);
19724+
}
19725+
1968819726
if (w.config.dataLabels.enabled) {
1968919727
var xPos = labelPosition.x;
1969019728
var yPos = labelPosition.y;
@@ -20960,6 +20998,7 @@
2096020998
filters.dropShadow(elPath, _shadow, i);
2096120999
}
2096221000

21001+
filters.setSelectionFilter(elPath, 0, i);
2096321002
this.addListeners(elPath, this.radialDataLabels);
2096421003
elRadialBarArc.add(elPath);
2096521004
elPath.attr({
@@ -22281,7 +22320,7 @@
2228122320
// the font size should be proportional to the size of the box (and the value)
2228222321
// otherwise you can end up creating a visual distortion where two boxes of identical
2228322322
// size have different sized labels, and thus make it look as if the two boxes
22284-
// represent diffferent sizes
22323+
// represent different sizes
2228522324
var area = width * height;
2228622325
var arearoot = Math.pow(area, 0.5);
2228722326
return Math.min(arearoot / averagelabelsize, parseInt(w.config.dataLabels.style.fontSize, 10));
@@ -23255,7 +23294,7 @@
2325523294
candlestickSeries.i.push(st);
2325623295
} else {
2325723296
// user has specified type, but it is not valid (other than line/area/column)
23258-
console.warn('You have specified an unrecognized chart type. Available types for this propery are line/area/column/bar/scatter/bubble');
23297+
console.warn('You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble');
2325923298
}
2326023299

2326123300
gl.comboCharts = true;
@@ -29994,7 +30033,7 @@
2999430033
this.formatters.setLabelFormatters();
2999530034
}
2999630035
} // we need to generate yaxis for heatmap separately as we are not showing numerics there, but seriesNames. There are some tweaks which are required for heatmap to align labels correctly which are done in below function
29997-
// Also we need to do this before calcuting Dimentions plotCoords() method of Dimensions
30036+
// Also we need to do this before calculating Dimensions plotCoords() method of Dimensions
2999830037

2999930038

3000030039
this.formatters.heatmapLabelFormatters(); // We got plottable area here, next task would be to calculate axis areas
@@ -30559,7 +30598,7 @@
3055930598
}
3056030599
/**
3056130600
* This static method allows users to call chart methods without necessarily from the
30562-
* instance of the chart in case user has assigned chartID to the targetted chart.
30601+
* instance of the chart in case user has assigned chartID to the targeted chart.
3056330602
* The chartID is used for mapping the instance stored in Apex._chartInstances global variable
3056430603
*
3056530604
* This is helpful in cases when you don't have reference of the chart instance

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)