@ammarkhalidfarooq/dashboard-package 0.3.24 → 0.3.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 +29 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +29 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -346,10 +346,20 @@ var RevenueChart = function RevenueChart(_ref) {
|
|
|
346
346
|
axisTicks: {
|
|
347
347
|
show: false
|
|
348
348
|
},
|
|
349
|
+
tickAmount: 7,
|
|
349
350
|
labels: {
|
|
350
351
|
style: {
|
|
351
352
|
colors: '#A1A1A8',
|
|
352
353
|
fontSize: '12px'
|
|
354
|
+
},
|
|
355
|
+
formatter: function formatter(val) {
|
|
356
|
+
if (!val || typeof val !== 'string') return val;
|
|
357
|
+
var date = new Date(val);
|
|
358
|
+
if (isNaN(date.getTime())) return val;
|
|
359
|
+
return date.toLocaleDateString('en-US', {
|
|
360
|
+
month: 'short',
|
|
361
|
+
day: 'numeric'
|
|
362
|
+
});
|
|
353
363
|
}
|
|
354
364
|
}
|
|
355
365
|
},
|
|
@@ -547,7 +557,7 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
547
557
|
gap: 1,
|
|
548
558
|
alignItems: "center"
|
|
549
559
|
},
|
|
550
|
-
children: item.hideControls ? /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
560
|
+
children: item.hideControls ? item.series && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
551
561
|
sx: {
|
|
552
562
|
display: "flex",
|
|
553
563
|
gap: 2,
|
|
@@ -4936,6 +4946,24 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
4936
4946
|
});
|
|
4937
4947
|
}
|
|
4938
4948
|
}
|
|
4949
|
+
if (activeMetric === "Net Raised") {
|
|
4950
|
+
var netData = apiData === null || apiData === void 0 ? void 0 : apiData.netRaised;
|
|
4951
|
+
if (Array.isArray(netData) && netData.length > 0) {
|
|
4952
|
+
mainChart = _objectSpread2(_objectSpread2({}, mainChart), {}, {
|
|
4953
|
+
label: "Net revenue trend",
|
|
4954
|
+
data: netData.map(function (item) {
|
|
4955
|
+
return item.value;
|
|
4956
|
+
}),
|
|
4957
|
+
categories: netData.map(function (item) {
|
|
4958
|
+
return item.date;
|
|
4959
|
+
}),
|
|
4960
|
+
series: undefined,
|
|
4961
|
+
// Ensure we use single data
|
|
4962
|
+
stacked: false,
|
|
4963
|
+
hideControls: true
|
|
4964
|
+
});
|
|
4965
|
+
}
|
|
4966
|
+
}
|
|
4939
4967
|
mainChart = _objectSpread2(_objectSpread2({}, mainChart), {}, {
|
|
4940
4968
|
label: mainChart.label || activeMetric,
|
|
4941
4969
|
value: selectedInfo.value,
|