@ammarkhalidfarooq/dashboard-package 0.3.20 → 0.3.22
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 +37 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +37 -27
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4854,39 +4854,49 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
4854
4854
|
var mainChart = extendedCharts.find(function (c) {
|
|
4855
4855
|
return c.label === selectedInfo.label;
|
|
4856
4856
|
}) || primaryCharts[0];
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
return item.
|
|
4865
|
-
})
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4857
|
+
console.log("OverallSection - activeMetric:", activeMetric);
|
|
4858
|
+
console.log("OverallSection - apiData keys:", Object.keys(apiData || {}));
|
|
4859
|
+
if (activeMetric === "Total Raised") {
|
|
4860
|
+
var hasStackedData = (apiData === null || apiData === void 0 ? void 0 : apiData.paidAds) || (apiData === null || apiData === void 0 ? void 0 : apiData.email) || (apiData === null || apiData === void 0 ? void 0 : apiData.organic);
|
|
4861
|
+
console.log("OverallSection - hasStackedData:", !!hasStackedData);
|
|
4862
|
+
if (hasStackedData) {
|
|
4863
|
+
var categories = ((apiData === null || apiData === void 0 ? void 0 : apiData.organic) || (apiData === null || apiData === void 0 ? void 0 : apiData.paidAds) || (apiData === null || apiData === void 0 ? void 0 : apiData.email) || []).map(function (item) {
|
|
4864
|
+
return item.date;
|
|
4865
|
+
});
|
|
4866
|
+
var series = [{
|
|
4867
|
+
name: "Paid Ads",
|
|
4868
|
+
data: ((apiData === null || apiData === void 0 ? void 0 : apiData.paidAds) || []).map(function (item) {
|
|
4869
|
+
return item.value;
|
|
4870
|
+
})
|
|
4871
|
+
}, {
|
|
4872
|
+
name: "Organic",
|
|
4873
|
+
data: ((apiData === null || apiData === void 0 ? void 0 : apiData.organic) || []).map(function (item) {
|
|
4874
|
+
return item.value;
|
|
4875
|
+
})
|
|
4876
|
+
}, {
|
|
4877
|
+
name: "Email",
|
|
4878
|
+
data: ((apiData === null || apiData === void 0 ? void 0 : apiData.email) || []).map(function (item) {
|
|
4879
|
+
return item.value;
|
|
4880
|
+
})
|
|
4881
|
+
}];
|
|
4882
|
+
console.log("OverallSection - transformed series:", series);
|
|
4883
|
+
mainChart = _objectSpread2(_objectSpread2({}, mainChart), {}, {
|
|
4884
|
+
label: "Total revenue trend",
|
|
4885
|
+
data: undefined,
|
|
4886
|
+
// Clear single data property to force series usage
|
|
4887
|
+
series: series,
|
|
4888
|
+
categories: categories,
|
|
4889
|
+
stacked: true,
|
|
4890
|
+
colors: ["#6366F1", "#10B981", "#06B6D4"]
|
|
4891
|
+
});
|
|
4892
|
+
}
|
|
4884
4893
|
}
|
|
4885
4894
|
mainChart = _objectSpread2(_objectSpread2({}, mainChart), {}, {
|
|
4886
4895
|
label: mainChart.label || activeMetric,
|
|
4887
4896
|
value: selectedInfo.value,
|
|
4888
4897
|
trend: selectedInfo.subValue
|
|
4889
4898
|
});
|
|
4899
|
+
console.log("OverallSection - Final mainChart:", mainChart);
|
|
4890
4900
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
4891
4901
|
children: [/*#__PURE__*/jsx(Box, {
|
|
4892
4902
|
sx: {
|