@@ -235,6 +235,17 @@ const BarGraphComparison = props => {
235
235
for ( let i = 0 ; i < classname . length ; i ++ ) {
236
236
classname [ i ] . addEventListener ( 'click' , animateButton , false ) ;
237
237
}
238
+ const seriesList = comparison . map ( elem => elem . data . barStack ) ;
239
+ const actionsList = seriesList . flat ( ) ;
240
+ const testList = actionsList . map ( elem => elem . name ) ;
241
+
242
+ const finalList = [ ] ;
243
+ for ( let i = 0 ; i < testList . length ; i ++ ) {
244
+ if ( testList [ i ] !== "" ) finalList . push ( testList [ i ] ) ;
245
+ }
246
+ console . log ( 'Final List' , finalList )
247
+ // )
248
+
238
249
return (
239
250
< div >
240
251
< div className = "series-options-container" >
@@ -248,7 +259,7 @@ const BarGraphComparison = props => {
248
259
>
249
260
Clear All Series
250
261
</ button >
251
- < h4 style = { { padding : '0 1rem' } } > Comparison Series: </ h4 >
262
+ < h4 style = { { padding : '0 1rem' } } > Compare Series: </ h4 >
252
263
< FormControl variant = "outlined" className = { classes . formControl } >
253
264
< Select
254
265
style = { { color : 'white' } }
@@ -273,7 +284,7 @@ const BarGraphComparison = props => {
273
284
) }
274
285
</ Select >
275
286
</ FormControl >
276
- { /* <h4 style={{ padding: '0 1rem' }}>Comparator Snapshot? </h4>
287
+ < h4 style = { { padding : '0 1rem' } } > Compare Actions </ h4 >
277
288
< FormControl variant = "outlined" className = { classes . formControl } >
278
289
< Select
279
290
style = { { color : 'white' } }
@@ -289,14 +300,13 @@ const BarGraphComparison = props => {
289
300
{ ! comparison [ snapshots ] ? (
290
301
< MenuItem > No snapshots available</ MenuItem >
291
302
) : (
292
- titleFilter(comparison).map((tabElem, index) => {
293
- return (
294
- <MenuItem value={index}>{`${index + 1}` }</MenuItem>
295
- );
296
- })
297
- )}
303
+ // finalList.map((elem, index) => (
304
+ // <MenuItem value={index}>{elem}</MenuItem>
305
+ < MenuItem value = "test" > Testing</ MenuItem >
306
+ )
307
+ }
298
308
</ Select >
299
- </FormControl> */ }
309
+ </ FormControl >
300
310
</ div >
301
311
</ div >
302
312
@@ -335,7 +345,7 @@ const BarGraphComparison = props => {
335
345
// Uses map method to iterate through all components,
336
346
// creating a rect component (from visx) for each iteration.
337
347
// height/width/etc. are calculated by visx.
338
- // to set X and Y scale, it will used the passed in function and
348
+ // to set X and Y scale, it will used the p`assed in function and
339
349
// will run it on the array thats outputted by data
340
350
const bar = barStack . bars [ currentIndex ] ;
341
351
if ( Number . isNaN ( bar . bar [ 1 ] ) || bar . height < 0 ) {
@@ -379,6 +389,8 @@ const BarGraphComparison = props => {
379
389
// Comparison Barstack (populates based on series selected)
380
390
// to set X and Y scale, it will used the passed in function and
381
391
// will run it on the array thats outputted by data
392
+ // setXpointsComparison() }
393
+ // comparison[series].data.barStack
382
394
data = { ! comparison [ series ] ? [ ] : setXpointsComparison ( ) }
383
395
keys = { keys }
384
396
x = { getCurrentTab }
0 commit comments