@@ -122,26 +122,6 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
122
122
snapshotIdScale . rangeRound ( [ 0 , xMax ] ) ;
123
123
renderingScale . range ( [ yMax , 0 ] ) ;
124
124
125
- // useStyles will change the styling on save series dropdown feature
126
- // const useStyles = makeStyles((theme) => ({
127
- // formControl: {
128
- // margin: theme.spacing(1),
129
- // minWidth: 80,
130
- // height: 30,
131
- // },
132
- // select: {
133
- // minWidth: 80,
134
- // fontSize: '.75rem',
135
- // fontWeight: 200,
136
- // border: '1px solid grey',
137
- // borderRadius: 4,
138
- // color: 'grey',
139
- // height: 30,
140
- // },
141
- // }));
142
-
143
- // const classes = useStyles();
144
-
145
125
const StyledFormControl = styled ( FormControl ) ( ( { theme } ) => ( {
146
126
margin : theme . spacing ( 1 ) ,
147
127
minWidth : 160 ,
@@ -150,9 +130,10 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
150
130
151
131
const StyledSelect = styled ( Select ) ( {
152
132
minWidth : 160 ,
153
- fontSize : '.75rem ' ,
133
+ fontSize : '1.2rem ' ,
154
134
fontWeight : 200 ,
155
135
height : 30 ,
136
+ border : '1px solid #da262c' ,
156
137
} ) ;
157
138
158
139
const handleSeriesChange = ( event : Event ) => {
@@ -203,22 +184,6 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
203
184
return data . barStack ;
204
185
}
205
186
206
- // const animateButton = (e: MouseEvent) => {
207
- // e.preventDefault();
208
- // const target = e.target as HTMLButtonElement;
209
- // if (target) {
210
- // target.classList.add('animate');
211
- // target.innerHTML = 'Deleted!';
212
- // setTimeout(() => {
213
- // target.innerHTML = 'Clear All Series';
214
- // target.classList.remove('animate');
215
- // }, 1000);
216
- // }
217
- // };
218
- // const classname = document.getElementsByClassName('delete-button');
219
- // for (let i = 0; i < classname.length; i += 1) {
220
- // classname[i].addEventListener('click', animateButton, false);
221
- // }
222
187
const seriesList : ActionObj [ ] [ ] = comparison . map ( ( action : Series ) => action . data . barStack ) ;
223
188
const actionsList : ActionObj [ ] = seriesList . flat ( ) ;
224
189
const testList : string [ ] = actionsList . map ( ( elem : ActionObj ) => elem . name ) ;
@@ -231,84 +196,93 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
231
196
return (
232
197
< div >
233
198
< div className = 'series-options-container' >
234
- { /* <div className='dropdown-and-delete-series-container'> */ }
235
- < Button
236
- variant = 'contained'
237
- sx = { { p : 2 , color : 'white' } }
238
- // type='button'
239
- className = 'delete-button'
240
- onClick = { ( ) => {
241
- setButtonLoad ( true ) ;
242
- dispatch ( deleteSeries ( ) ) ;
199
+ < div className = 'dropdown-and-delete-series-container' >
200
+ < Button
201
+ variant = 'contained'
202
+ sx = { { p : 2 , color : 'white' } }
203
+ // type='button'
204
+ className = 'delete-button'
205
+ onClick = { ( ) => {
206
+ setButtonLoad ( true ) ;
207
+ dispatch ( deleteSeries ( ) ) ;
243
208
244
- setTimeout ( ( ) => {
245
- setButtonLoad ( false ) ;
246
- } , 1000 ) ;
247
- } }
248
- style = {
249
- buttonLoad
250
- ? { backgroundColor : theme . palette . secondary . main }
251
- : { backgroundColor : theme . palette . primary . main }
252
- }
253
- >
254
- { buttonLoad ? 'Deleted' : 'Clear Series' }
255
- </ Button >
256
- { /* <h4 className='compare-series-box' style={{ padding: '0 1rem' }}>
209
+ setTimeout ( ( ) => {
210
+ setButtonLoad ( false ) ;
211
+ } , 1000 ) ;
212
+ } }
213
+ style = {
214
+ buttonLoad
215
+ ? { backgroundColor : '#62d6fb' }
216
+ : { backgroundColor : '#ff6569' , color : 'black' }
217
+ }
218
+ >
219
+ { buttonLoad ? 'Deleted' : 'Clear Series' }
220
+ </ Button >
221
+ { /* <h4 className='compare-series-box' style={{ padding: '0 1rem' }}>
257
222
Compare Series:{' '}
258
223
</h4> */ }
259
- < StyledFormControl
260
- sx = { { m : 1 , minwidth : 160 } }
261
- size = 'medium'
262
- id = 'selectSeries'
263
- variant = 'outlined'
264
- label = 'compares series'
265
- // sx={{ backgroundColor: theme.palette.primary.main }}
266
- >
267
- < InputLabel id = 'selectSeries' > Compare Series</ InputLabel >
268
- < StyledSelect
269
- // labelId='simple-select-outlined-label'
270
- // id='simple-select-outlined'
271
- open = { open }
272
- onClose = { handleClose }
273
- onOpen = { handleOpen }
274
- value = { series }
275
- onChange = { handleSeriesChange }
276
- >
277
- { ! comparison . length ? (
278
- < MenuItem > No series available</ MenuItem >
279
- ) : (
280
- comparison . map ( ( tabElem , index ) => (
281
- < MenuItem key = { `MenuItem${ tabElem . name } ` } value = { index } >
282
- { tabElem . name }
283
- </ MenuItem >
284
- ) )
285
- ) }
286
- </ StyledSelect >
287
- </ StyledFormControl >
288
- { /* <h4 style={{ padding: '0 1rem' }}>Compare Actions </h4> */ }
289
- < StyledFormControl variant = 'outlined' >
290
- < InputLabel > Compare Actions</ InputLabel >
291
- < StyledSelect
292
- style = { { color : 'white' } }
293
- labelId = 'snapshot-select'
294
- id = 'snapshot-select'
295
- open = { picOpen }
296
- onClose = { picHandleClose }
297
- onOpen = { picHandleOpen }
298
- value = '' // snapshots
299
- onChange = { handleActionChange }
224
+ < StyledFormControl
225
+ variant = 'filled'
226
+ // style={{ color: 'white' }}
227
+ // size='medium'
228
+ // id='selectSeries'
229
+ // variant='outlined'
230
+ // label='compares series'
231
+ // sx={{ backgroundColor: theme.palette.primary.main }}
300
232
>
301
- { ! comparison [ snapshots ] ? (
302
- < MenuItem > No snapshots available</ MenuItem >
303
- ) : (
304
- finalList . map ( ( elem ) => (
305
- < MenuItem value = { elem } > { elem } </ MenuItem >
306
- // <MenuItem value="test">{}</MenuItem>
307
- ) )
308
- ) }
309
- </ StyledSelect >
310
- </ StyledFormControl >
311
- { /* </div> */ }
233
+ < InputLabel
234
+ id = 'simple-select-outlined-label'
235
+ sx = { { fontSize : '1.2rem' } }
236
+ style = { { color : 'white' } }
237
+ >
238
+ Compare Series
239
+ </ InputLabel >
240
+ < StyledSelect
241
+ labelId = 'simple-select-outlined-label'
242
+ id = 'simple-select-outlined-label'
243
+ open = { open }
244
+ onClose = { handleClose }
245
+ onOpen = { handleOpen }
246
+ value = { series }
247
+ onChange = { handleSeriesChange }
248
+ >
249
+ { ! comparison . length ? (
250
+ < MenuItem > No series available</ MenuItem >
251
+ ) : (
252
+ comparison . map ( ( tabElem , index ) => (
253
+ < MenuItem key = { `MenuItem${ tabElem . name } ` } value = { index } >
254
+ { tabElem . name }
255
+ </ MenuItem >
256
+ ) )
257
+ ) }
258
+ </ StyledSelect >
259
+ </ StyledFormControl >
260
+ { /* <h4 style={{ padding: '0 1rem' }}>Compare Actions </h4> */ }
261
+ < StyledFormControl variant = 'filled' >
262
+ < InputLabel
263
+ id = 'snapshot-select-label'
264
+ sx = { { fontSize : '1.2rem' } }
265
+ style = { { color : 'white' } }
266
+ >
267
+ Compare Actions
268
+ </ InputLabel >
269
+ < StyledSelect
270
+ labelId = 'snapshot-select-label'
271
+ id = 'snapshot-select-label'
272
+ open = { picOpen }
273
+ onClose = { picHandleClose }
274
+ onOpen = { picHandleOpen }
275
+ value = { } // snapshots
276
+ onChange = { handleActionChange }
277
+ >
278
+ { ! comparison [ snapshots ] ? (
279
+ < MenuItem > No snapshots available</ MenuItem >
280
+ ) : (
281
+ finalList . map ( ( elem ) => < MenuItem value = { elem } > { elem } </ MenuItem > )
282
+ ) }
283
+ </ StyledSelect >
284
+ </ StyledFormControl >
285
+ </ div >
312
286
</ div >
313
287
314
288
< svg ref = { containerRef } width = { width } height = { height } >
0 commit comments