@ammarkhalidfarooq/dashboard-package 0.6.24 → 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 +6 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -5
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5911,8 +5911,9 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
5911
5911
|
var chargebackSeries = chartData.map(function (item) {
|
|
5912
5912
|
return parseFloat((item.chargebackRate || 0).toFixed(2));
|
|
5913
5913
|
});
|
|
5914
|
-
var
|
|
5915
|
-
var
|
|
5914
|
+
var dataMax = Math.max.apply(Math, [0].concat(_toConsumableArray(chargebackSeries), _toConsumableArray(refundSeries)));
|
|
5915
|
+
var hasChartData = dataMax > 0;
|
|
5916
|
+
var yAxisMax = hasChartData ? Math.ceil(Math.max(dataMax, 1) * 1.2) : 0.5;
|
|
5916
5917
|
var chartOptions = {
|
|
5917
5918
|
chart: {
|
|
5918
5919
|
type: "area",
|
|
@@ -5998,7 +5999,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
5998
5999
|
legend: {
|
|
5999
6000
|
show: false
|
|
6000
6001
|
},
|
|
6001
|
-
annotations: {
|
|
6002
|
+
annotations: hasChartData ? {
|
|
6002
6003
|
yaxis: [{
|
|
6003
6004
|
y: 1,
|
|
6004
6005
|
borderColor: "#EF4444",
|
|
@@ -6016,7 +6017,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
6016
6017
|
offsetX: 10
|
|
6017
6018
|
}
|
|
6018
6019
|
}]
|
|
6019
|
-
},
|
|
6020
|
+
} : {},
|
|
6020
6021
|
tooltip: {
|
|
6021
6022
|
shared: true,
|
|
6022
6023
|
y: {
|
|
@@ -6403,7 +6404,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
6403
6404
|
title: "Upsell",
|
|
6404
6405
|
subtitle: "Acceptance & raised",
|
|
6405
6406
|
acceptanceRate: (upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceRate) || 0,
|
|
6406
|
-
acceptanceVal: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.
|
|
6407
|
+
acceptanceVal: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceRate) || 0), "%"),
|
|
6407
6408
|
acceptanceTrend: "".concat((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceGrowth) || 0).toFixed(1), "%"),
|
|
6408
6409
|
raisedVal: "$".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raised) || 0)),
|
|
6409
6410
|
raisedTrend: "".concat((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) || 0).toFixed(1), "%"),
|