diff --git a/met-web/src/components/publicDashboard/SubmissionTrend/SubmissionTrend.tsx b/met-web/src/components/publicDashboard/SubmissionTrend/SubmissionTrend.tsx index 0101a9d71..0fa1d4590 100644 --- a/met-web/src/components/publicDashboard/SubmissionTrend/SubmissionTrend.tsx +++ b/met-web/src/components/publicDashboard/SubmissionTrend/SubmissionTrend.tsx @@ -35,6 +35,7 @@ export const dashboardCustomStyles = { const SubmissionTrend = ({ engagement, engagementIsLoading }: SubmissionTrendProps) => { const isTablet = useMediaQuery((theme: Theme) => theme.breakpoints.down('md')); + const isExtraSmall = useMediaQuery('(max-width:299px)'); const isBetweenMdAndLg = useMediaQuery((theme: Theme) => theme.breakpoints.between('lg', 'xl')); const HEIGHT = isTablet ? 200 : 250; const [data, setData] = useState(createDefaultByMonthData()); @@ -43,6 +44,12 @@ const SubmissionTrend = ({ engagement, engagementIsLoading }: SubmissionTrendPro const [chartBy, setChartBy] = React.useState('monthly'); const [fromDate, setFromDate] = React.useState(null); const [toDate, setToDate] = React.useState(null); + const marginXStyling = { marginX: isTablet ? 1 : 0 }; + const extraSmallStyling = { + fontSize: isExtraSmall ? '12px' : 'inherit', + width: isExtraSmall ? '40%' : 'auto', + }; + const fetchData = async () => { setIsLoading(true); try { @@ -137,10 +144,23 @@ const SubmissionTrend = ({ engagement, engagementIsLoading }: SubmissionTrendPro rowSpacing={isTablet ? 1 : 0} md={isBetweenMdAndLg ? 3 : 4} > - + Select Date Range - + From: - + To: Reset All Filters @@ -201,16 +231,24 @@ const SubmissionTrend = ({ engagement, engagementIsLoading }: SubmissionTrendPro width="100%" justifyContent="flex-end" alignItems={'flex-end'} + mb={1} > - Weekly - Monthly + + Weekly + + + Monthly +