Hey guys,
I can’t figure out how to append data to figure when using Multi-drop down selection that is returning a list.
Below is what I have and I need to figure out how to append more ‘x’ and ‘y’ value while filtering:
I would be so thankful for any help you could give me.
Current Figure/Callback
def update_fig(value):
dff = df_combine[df_combine['Country']==value]
figure={
'data': [
{'x': dff.Country, 'y': dff.Clicks, 'type': 'bar', 'name': Country 'Clicks'},
],
'layout': {
'title': 'Country Spend :)',
'plot_bgcolor': 'black',
'paper_bgcolor': 'black',
'font': {
'color': 'white',
}
}
}
Desired Figure–Which returns another counrtries data when user selects the country
def update_fig(value):
dff = df_combine[df_combine['Country']==value]
figure={
'data': [
{'x': dff.Country, 'y': dff.Clicks, 'type': 'bar', 'name': Country 'Clicks'},
{'x': dff.Country, 'y': dff.Clicks, 'type': 'bar', 'name': Country 'Clicks'},
],
'layout': {
'title': 'Country Spend :)',
'plot_bgcolor': 'black',
'paper_bgcolor': 'black',
'font': {
'color': 'white',
}
}
}