@ammarkhalidfarooq/dashboard-package 0.6.122 → 0.6.123

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
@@ -1,5 +1,5 @@
1
1
  import React, { Suspense, lazy, useState, useRef, useEffect, useMemo } from 'react';
2
- import { Box, Button, Menu, MenuItem, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, Avatar, LinearProgress, Stack, TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Skeleton } from '@mui/material';
2
+ import { Box, Button, Menu, MenuItem, useTheme as useTheme$1, useMediaQuery, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, Avatar, LinearProgress, Stack, TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Skeleton } from '@mui/material';
3
3
  import { MoreHoriz, TrendingDown, TrendingUp, MoreVert, Check, InfoOutlined, Settings, PeopleAltOutlined, RequestQuoteOutlined, PaidOutlined, PersonOutlined, IndeterminateCheckBoxOutlined, FavoriteOutlined, SearchOutlined, HighlightOff, Email } from '@mui/icons-material';
4
4
  import { createTheme, useTheme } from '@mui/material/styles';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -462,7 +462,9 @@ var RevenueChart = function RevenueChart(_ref) {
462
462
  _ref$showLegend = _ref.showLegend,
463
463
  showLegend = _ref$showLegend === void 0 ? true : _ref$showLegend,
464
464
  _ref$isAmount = _ref.isAmount,
465
- isAmount = _ref$isAmount === void 0 ? false : _ref$isAmount;
465
+ isAmount = _ref$isAmount === void 0 ? false : _ref$isAmount,
466
+ _ref$xAxisTickAmount = _ref.xAxisTickAmount,
467
+ xAxisTickAmount = _ref$xAxisTickAmount === void 0 ? 5 : _ref$xAxisTickAmount;
466
468
  var theme = useTheme();
467
469
  var isRadial = type === 'donut' || type === 'pie';
468
470
  var isCurrency = isAmount || (metric === null || metric === void 0 ? void 0 : metric.toLowerCase()) === 'revenue';
@@ -559,7 +561,7 @@ var RevenueChart = function RevenueChart(_ref) {
559
561
  axisTicks: {
560
562
  show: false
561
563
  },
562
- tickAmount: 5,
564
+ tickAmount: xAxisTickAmount,
563
565
  labels: {
564
566
  rotate: 0,
565
567
  rotateAlways: false,
@@ -657,6 +659,8 @@ var RenderChartCard = function RenderChartCard(_ref) {
657
659
  cardSx = _ref$cardSx === void 0 ? {} : _ref$cardSx,
658
660
  _ref$contentSx = _ref.contentSx,
659
661
  contentSx = _ref$contentSx === void 0 ? {} : _ref$contentSx;
662
+ var theme = useTheme$1();
663
+ var isMobile = useMediaQuery(theme.breakpoints.down("sm"));
660
664
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
661
665
  var trendText = item.trend || "18%";
662
666
  var trendColor = getTrendColor(trendText, {
@@ -884,7 +888,8 @@ var RenderChartCard = function RenderChartCard(_ref) {
884
888
  stacked: item.stacked,
885
889
  type: type || item.type || "area",
886
890
  colors: item.colors,
887
- showLegend: !item.hideControls
891
+ showLegend: !item.hideControls,
892
+ xAxisTickAmount: isMobile ? 3 : 5
888
893
  }), item.hideControls && item.series && /*#__PURE__*/jsx(Box, {
889
894
  sx: {
890
895
  display: {