Skip to content

Commit

Permalink
added visibility buttonIcon to reopen chart
Browse files Browse the repository at this point in the history
  • Loading branch information
mmt456 committed Aug 9, 2024
1 parent a70e78d commit c83a824
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions src/vis/Vis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import IconButton from '@mui/material/IconButton';
import Container from '@mui/material/Container';
import MenuIcon from '@mui/icons-material/Menu';
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
import Visibility from '@mui/icons-material/Visibility';
import { homeListItems } from '../ListItems';
import MapSelectionRadio, { MapType } from './MapSelectionRadio';
import DisplaySelection from './DisplaySelection';
Expand All @@ -25,6 +26,7 @@ import LineChart from './LineChart';
import axios from 'axios';
import { API_URL } from '../utils/config';
import { UNITS, MAP_TYPE_CONVERT } from './MeasurementMap';
import { solveDisplayOptions } from './DisplaySelection';

// import { setOptions } from 'leaflet';

Expand Down Expand Up @@ -317,6 +319,33 @@ export default function Vis() {
</Card>
</Fade>
</Box>

<Box
// new box
component='main'
sx={{
backgroundColor: 'transparent',
overflow: 'none',
position: 'absolute',
right: '8px',
bottom:
20 +
(displayValue(displayOptions, 'displayGraph')
? chartHeight + 10
: 0),
zIndex: '4',
}}>
<IconButton
onClick={() => {
setDisplayOptions(
solveDisplayOptions(displayOptions, 'displayGraph', true),
);
}}
>
<Visibility>
</Visibility>
</IconButton>
</Box>
<Box
component='main'
sx={{
Expand All @@ -328,8 +357,8 @@ export default function Vis() {
20 +
(displayValue(displayOptions, 'displayGraph')
? chartHeight + 10
: 0),
zIndex: '4',
: + 50),
zIndex: '5',
}}
>
<Fade
Expand All @@ -348,6 +377,7 @@ export default function Vis() {
</Typography>
</Card>
</Fade>

</Box>
</ThemeProvider>
);
Expand Down

0 comments on commit c83a824

Please sign in to comment.