Skip to content

Commit c83a824

Browse files
committed
added visibility buttonIcon to reopen chart
1 parent a70e78d commit c83a824

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

src/vis/Vis.tsx

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import IconButton from '@mui/material/IconButton';
1414
import Container from '@mui/material/Container';
1515
import MenuIcon from '@mui/icons-material/Menu';
1616
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
17+
import Visibility from '@mui/icons-material/Visibility';
1718
import { homeListItems } from '../ListItems';
1819
import MapSelectionRadio, { MapType } from './MapSelectionRadio';
1920
import DisplaySelection from './DisplaySelection';
@@ -25,6 +26,7 @@ import LineChart from './LineChart';
2526
import axios from 'axios';
2627
import { API_URL } from '../utils/config';
2728
import { UNITS, MAP_TYPE_CONVERT } from './MeasurementMap';
29+
import { solveDisplayOptions } from './DisplaySelection';
2830

2931
// import { setOptions } from 'leaflet';
3032

@@ -317,6 +319,33 @@ export default function Vis() {
317319
</Card>
318320
</Fade>
319321
</Box>
322+
323+
<Box
324+
// new box
325+
component='main'
326+
sx={{
327+
backgroundColor: 'transparent',
328+
overflow: 'none',
329+
position: 'absolute',
330+
right: '8px',
331+
bottom:
332+
20 +
333+
(displayValue(displayOptions, 'displayGraph')
334+
? chartHeight + 10
335+
: 0),
336+
zIndex: '4',
337+
}}>
338+
<IconButton
339+
onClick={() => {
340+
setDisplayOptions(
341+
solveDisplayOptions(displayOptions, 'displayGraph', true),
342+
);
343+
}}
344+
>
345+
<Visibility>
346+
</Visibility>
347+
</IconButton>
348+
</Box>
320349
<Box
321350
component='main'
322351
sx={{
@@ -328,8 +357,8 @@ export default function Vis() {
328357
20 +
329358
(displayValue(displayOptions, 'displayGraph')
330359
? chartHeight + 10
331-
: 0),
332-
zIndex: '4',
360+
: + 50),
361+
zIndex: '5',
333362
}}
334363
>
335364
<Fade
@@ -348,6 +377,7 @@ export default function Vis() {
348377
</Typography>
349378
</Card>
350379
</Fade>
380+
351381
</Box>
352382
</ThemeProvider>
353383
);

0 commit comments

Comments
 (0)