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