# Callback by multi-selector is not working

**URL:** <https://community.plotly.com/t/callback-by-multi-selector-is-not-working/26159>\
**Category:** Dash Python\
**Created:** [July 21, 2019, 7:06pm UTC](https://community.plotly.com/t/callback-by-multi-selector-is-not-working/26159 "2019-07-21T19:06:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![suhyun](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@suhyun](https://community.plotly.com/u/suhyun)\
**Post date:** [July 21, 2019, 7:06pm UTC](https://community.plotly.com/t/callback-by-multi-selector-is-not-working/26159/1 "2019-07-21T19:06:48Z")

</div>

Hello, I am a student studying Plotly-dash in Korea.  
I wrote the new code using one example from the plotly-dash gallery.  
But the app.callback of this code doesn’t work at all.  
I want the pie graph updated by the multi selector.  
So I wrote a number of additional functions.  
All the data required for the graph were normally imported.  
I really want to solve this problem…  
And this is my code.

this is part of dropdown and dcc.graph

> html.Div(  
> [  
> html.H6(children=‘취득자 수’,className=“subtitle padded”),  
> dcc.Dropdown(  
> id = ‘drop\_down’,  
> options=drop\_down\_options,  
> multi=True,  
> value=list(DROP\_DOWN.keys()),  
> className=“dcc\_control”,  
> ),  
> dcc.Graph(id=‘my-div3’)  
> ],  
> className=“seven columns”,  
> )

this is part of app.callback

> @app.callback(  
> Output(component\_id = ‘my-div2’,component\_property = ‘figure’),  
> [Input(component\_id = ‘drop\_down’, component\_property = ‘value’)],  
> )  
> def update\_pie(drop\_down\_value):
> 
> ```
> for i in range(len(drop_down_value)):
> if(drop_down_value[i] == 'age0'):
> drop_down_value[i] = '0'
> elif(drop_down_value[i] == 'age10'):
> drop_down_value[i] = '10'
> elif(drop_down_value[i] == 'age20'):
> drop_down_value[i] = '20'
> elif(drop_down_value[i] == 'age30'):
> drop_down_value[i] == '30'
> elif(drop_down_value[i] == 'age40'):
> drop_down_value[i] == '40'
> elif(drop_down_value[i] == 'age50'):
> drop_down_value[i] == '50'
> elif(drop_down_value[i] == 'age60'):
> drop_down_value[i] == '60'
> elif(drop_down_value[i] == 'age70'):
> drop_down_value[i] == '70'
> elif(drop_down_value[i] == 'age80'):
> drop_down_value[i] == '80'
> elif(drop_down_value[i] == 'age90'):
> drop_down_value[i] == '90'
> 
> dff = filter_dataframe(df, drop_down_value)
> 
> edu, life, house, medic = produce_pie_data(dff)
> 
> data = [
> go.Pie(
> labels = ['기초교육','기초생계','기초주거','기초의료'],
> values = [edu,life,house,medic],
> name = '원그래프',
> hoverinfo="text+value+percent",
> textinfo="label+percent+name",
> hole=0.5,
> marker=dict(colors=["#fac1b7", "#a9bb95", "#92d8d8"])
> )
> ]
> layout_pie["title"] = "취득자 수"
> layout_pie["font"] = dict(color="#777777")
> layout_pie["legend"] = dict(
> font=dict(color="#CCCCCC", size="10"), orientation="h", bgcolor="rgba(0,0,0,0)"
> )
> figure = dict(data=data, layout=layout_pie)
> return figure
> 
> ```

plz help me…
