How can i use US Map as filter to another Graph in Dash

i am trying to click on one state and get that state data reflect in another graph. its not working. Below is my call signature, i have doubt in the Input. Please help me.

@app.callback(
Output(‘Meat-Graph’,‘figure’),
[Input(‘US_Map’,‘selectedData’)]
)

My Code below:

html.Div([
dcc.Graph(id=‘US_Map’,
#style={‘width’:‘49%’},
figure={
‘data’:[dict(
type=‘choropleth’,
locations=df[‘code’], # Spatial coordinates
z = df[‘total exports’].astype(float), # Data to be color-coded
locationmode = ‘USA-states’, # set of locations match entries in locations
colorscale = ‘Reds’,
colorbar_title = “Millions USD”
)],
‘layout’:dict(
title = ‘Export statistics across the United States’,
geo = dict(
scope=‘usa’,
projection=dict( type=‘albers usa’ ),
showlakes = True,
lakecolor = ‘rgb(255, 255, 255)’
)
)
}
)
],className=“six columns”),
html.Div([
dcc.Graph(id=‘Meat-Graph’)
],className=“six columns”),

],className=“row”)
])

@app.callback(
Output(‘Meat-Graph’,‘figure’),
[Input(‘US_Map’,‘selectedData’)]
)

def update_meatgraph(selectedData):
print(selectedData)
#new_df=df[‘code’==‘selectedData’]
return selectedData
{
‘data’:[{‘x’:‘beef’, ‘y’:new_df[‘beef’].value, ‘type’:‘bar’, ‘name’:‘Beef’},
{‘x’:‘pork’, ‘y’:new_df[‘pork’].value, ‘type’:‘bar’, ‘name’:‘Pork’},
{‘x’:‘poultry’, ‘y’:new_df[‘poultry’].value, ‘type’:‘bar’, ‘name’:‘Poultry’}],
‘layout’:{‘title’:“US ‘{}’ Meat Exports Stats”.format(locations)}

   }