@ammarkhalidfarooq/dashboard-package 0.6.25 → 0.6.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +5 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5909,8 +5909,9 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
5909
5909
|
var chargebackSeries = chartData.map(function (item) {
|
|
5910
5910
|
return parseFloat((item.chargebackRate || 0).toFixed(2));
|
|
5911
5911
|
});
|
|
5912
|
-
var
|
|
5913
|
-
var
|
|
5912
|
+
var dataMax = Math.max.apply(Math, [0].concat(_toConsumableArray(chargebackSeries), _toConsumableArray(refundSeries)));
|
|
5913
|
+
var hasChartData = dataMax > 0;
|
|
5914
|
+
var yAxisMax = hasChartData ? Math.ceil(Math.max(dataMax, 1) * 1.2) : 0.5;
|
|
5914
5915
|
var chartOptions = {
|
|
5915
5916
|
chart: {
|
|
5916
5917
|
type: "area",
|
|
@@ -5996,7 +5997,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
5996
5997
|
legend: {
|
|
5997
5998
|
show: false
|
|
5998
5999
|
},
|
|
5999
|
-
annotations: {
|
|
6000
|
+
annotations: hasChartData ? {
|
|
6000
6001
|
yaxis: [{
|
|
6001
6002
|
y: 1,
|
|
6002
6003
|
borderColor: "#EF4444",
|
|
@@ -6014,7 +6015,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
6014
6015
|
offsetX: 10
|
|
6015
6016
|
}
|
|
6016
6017
|
}]
|
|
6017
|
-
},
|
|
6018
|
+
} : {},
|
|
6018
6019
|
tooltip: {
|
|
6019
6020
|
shared: true,
|
|
6020
6021
|
y: {
|