From 81ad6a0e5c8ed4f35ccac0cd271b8923e686c060 Mon Sep 17 00:00:00 2001 From: Ashutosh Bishnoi Date: Mon, 24 May 2021 14:47:57 +0530 Subject: Resolved some comments on the reports --- modern/src/reports/ChartReportPage.js | 16 +++++++--------- modern/src/reports/Graph.js | 28 ++++++++++++++-------------- modern/src/reports/ReportLayoutPage.js | 14 ++++---------- 3 files changed, 25 insertions(+), 33 deletions(-) (limited to 'modern/src/reports') diff --git a/modern/src/reports/ChartReportPage.js b/modern/src/reports/ChartReportPage.js index c75c9b7..0a5c8e1 100644 --- a/modern/src/reports/ChartReportPage.js +++ b/modern/src/reports/ChartReportPage.js @@ -61,15 +61,13 @@ const ChartReportPage = () => { const [type, setType] = useState('speed'); return ( - <> - - - - }> - - - + + + + }> + + ) } diff --git a/modern/src/reports/Graph.js b/modern/src/reports/Graph.js index af54e10..b785e06 100644 --- a/modern/src/reports/Graph.js +++ b/modern/src/reports/Graph.js @@ -3,6 +3,10 @@ import { Box, Paper } from '@material-ui/core'; import {LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'; const CustomizedAxisTick = ({ x, y, payload }) =>{ + console.log('inside customized tick ', payload.value) + if(!payload.value) { + return payload.value; + } const parts = payload.value.split(' '); return ( @@ -15,20 +19,16 @@ const CustomizedAxisTick = ({ x, y, payload }) =>{ const Graph = ({ type, items }) => { return ( - - - - - } height={60} /> - - - - - - - - - + + + } height={60} /> + + + + + + + ); } diff --git a/modern/src/reports/ReportLayoutPage.js b/modern/src/reports/ReportLayoutPage.js index 23ac6d7..ed7fe54 100644 --- a/modern/src/reports/ReportLayoutPage.js +++ b/modern/src/reports/ReportLayoutPage.js @@ -1,5 +1,6 @@ import React, { useState } from 'react'; -import { Grid, Box, Typography, Divider, Drawer, makeStyles, IconButton, Hidden } from '@material-ui/core'; +import { useHistory } from 'react-router-dom'; +import { Grid, Typography, Divider, Drawer, makeStyles, IconButton, Hidden } from '@material-ui/core'; import TimelineIcon from '@material-ui/icons/Timeline'; import PauseCircleFilledIcon from '@material-ui/icons/PauseCircleFilled'; import PlayCircleFilledIcon from '@material-ui/icons/PlayCircleFilled'; @@ -10,9 +11,6 @@ import ArrowBackIcon from '@material-ui/icons/ArrowBack'; import ReportSidebar from '../components/reports/ReportSidebar' import ReportNavbar from '../components/reports/ReportNavbar' - -import { Link, useHistory, useLocation } from 'react-router-dom'; - import t from '../common/localization'; const useStyles = makeStyles(theme => ({ @@ -60,7 +58,7 @@ const routes = [ { name: t('reportChart'), href: '/reports/chart', icon: }, ]; -const ReportLayoutPage = ({ children, filter }) => { +const ReportLayoutPage = ({ children, filter, }) => { const classes = useStyles(); const history = useHistory(); const [openDrawer, setOpenDrawer] = useState(false); @@ -102,11 +100,7 @@ const ReportLayoutPage = ({ children, filter }) => {
{filter} - - - {children} - - + {children}
-- cgit v1.2.3