diff --git a/frontend/src/components/navigation.js b/frontend/src/components/navigation.js index d4e0f2d..0598abe 100644 --- a/frontend/src/components/navigation.js +++ b/frontend/src/components/navigation.js @@ -44,6 +44,9 @@ const useStyles = makeStyles((theme) => ({ easing: theme.transitions.easing.easeOut, duration: theme.transitions.duration.enteringScreen, }), + [theme.breakpoints.down('xs')]: { + width: `calc(100% - ${drawerWidth}px)`, + }, }, menuButton: { marginRight: theme.spacing(2), @@ -54,7 +57,10 @@ const useStyles = makeStyles((theme) => ({ drawer: { width: drawerWidth, flexShrink: 0, - whiteSpace: 'nowrap' + whiteSpace: 'nowrap', + [theme.breakpoints.down('xs')]: { + width: 0, + }, }, drawerOpen: { width: drawerWidthOpen, @@ -62,6 +68,9 @@ const useStyles = makeStyles((theme) => ({ easing: theme.transitions.easing.sharp, duration: theme.transitions.duration.enteringScreen, }), + [theme.breakpoints.down('xs')]: { + width: drawerWidth, + }, }, drawerClose: { transition: theme.transitions.create('width', { @@ -70,6 +79,9 @@ const useStyles = makeStyles((theme) => ({ }), overflowX: 'hidden', width: drawerWidth, + [theme.breakpoints.down('xs')]: { + width: 0, + }, }, drawerHeader: { display: 'flex', diff --git a/frontend/src/components/resourcechart/chart.js b/frontend/src/components/resourcechart/chart.js index 12016e1..8962982 100644 --- a/frontend/src/components/resourcechart/chart.js +++ b/frontend/src/components/resourcechart/chart.js @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import { - LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, + LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'; import { makeStyles } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; @@ -12,11 +12,15 @@ import Checkbox from '@material-ui/core/Checkbox'; const useStyles = makeStyles((theme) => ({ root: { - display: 'flex', + padding: 0, + margin: 0, }, formControl: { margin: theme.spacing(2), }, + chart: { + width: 0, + } })); export default function Chart(props) { @@ -62,23 +66,26 @@ export default function Chart(props) { const { q0, q1, q2, q3, q4, q5, q6, q7 } = state; return ( - - - - - - - - - {lines} - + + + + + + + + + + {lines} + + + + + @@ -119,7 +126,7 @@ export default function Chart(props) { - + ); } diff --git a/frontend/src/components/resourcechart/resourcechart.js b/frontend/src/components/resourcechart/resourcechart.js index 5b81528..83228f7 100644 --- a/frontend/src/components/resourcechart/resourcechart.js +++ b/frontend/src/components/resourcechart/resourcechart.js @@ -103,7 +103,7 @@ export default function ResourceChart(props) { - + {output(data)}