@@ -45,6 +45,16 @@ interface TooltipData {
4545 color : string ;
4646}
4747
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+
4858/* DEFAULTS */
4959const margin = {
5060 top : 30 , right : 30 , bottom : 0 , left : 50 ,
@@ -61,10 +71,10 @@ const tooltipStyles = {
6171 fontFamily : 'Roboto' ,
6272} ;
6373
64- const BarGraphComparison = props => {
74+ const BarGraphComparison = ( props : BarGraphComparisonProps ) : unknown => {
6575 const [ { tabs, currentTab } , dispatch ] = useStoreContext ( ) ;
6676 const {
67- width, height, data, comparison, setSeries, series, setAction
77+ width, height, data, comparison, setSeries, series, setAction,
6878 } = props ;
6979 const [ snapshots ] = React . useState ( 0 ) ;
7080 const [ open , setOpen ] = React . useState ( false ) ;
@@ -201,7 +211,7 @@ const BarGraphComparison = props => {
201211 return data . barStack ;
202212 }
203213 const animateButton = e => {
204- e . preventDefault ;
214+ e . preventDefault ( ) ;
205215 e . target . classList . add ( 'animate' ) ;
206216 e . target . innerHTML = 'Deleted!' ;
207217 setTimeout ( ( ) => {
0 commit comments