@@ -45,6 +45,16 @@ interface TooltipData {
45
45
color : string ;
46
46
}
47
47
48
+ interface BarGraphComparisonProps {
49
+ width : number ,
50
+ height : number ,
51
+ data : Record < string , unknown > ,
52
+ comparison : string | [ ] ,
53
+ setSeries : ( ) => void ,
54
+ series : unknown ,
55
+ setAction : ( ) => void ,
56
+ }
57
+
48
58
/* DEFAULTS */
49
59
const margin = {
50
60
top : 30 , right : 30 , bottom : 0 , left : 50 ,
@@ -61,10 +71,10 @@ const tooltipStyles = {
61
71
fontFamily : 'Roboto' ,
62
72
} ;
63
73
64
- const BarGraphComparison = props => {
74
+ const BarGraphComparison = ( props : BarGraphComparisonProps ) : unknown => {
65
75
const [ { tabs, currentTab } , dispatch ] = useStoreContext ( ) ;
66
76
const {
67
- width, height, data, comparison, setSeries, series, setAction
77
+ width, height, data, comparison, setSeries, series, setAction,
68
78
} = props ;
69
79
const [ snapshots ] = React . useState ( 0 ) ;
70
80
const [ open , setOpen ] = React . useState ( false ) ;
@@ -201,7 +211,7 @@ const BarGraphComparison = props => {
201
211
return data . barStack ;
202
212
}
203
213
const animateButton = e => {
204
- e . preventDefault ;
214
+ e . preventDefault ( ) ;
205
215
e . target . classList . add ( 'animate' ) ;
206
216
e . target . innerHTML = 'Deleted!' ;
207
217
setTimeout ( ( ) => {
0 commit comments