Black Lives Matter. Please consider donating to Black Girls Code today.

How to overlap plots in a multichoice dropdown menu for multi dimensional data

I have been trying to overlap multiple plots using the multi=True argument, but it doesn’t work because I am not being able to figure out how to design my call back function. All I want is that, on clicking multiple service names from the list in the dropdown… their plots should show. In my outerdictionary there are some filename with some attributes. How would i plot multiple plots on multi choice dropdown using callback function? Till now its only single plot respectively

app.layout = html.Div([
# a header and a paragraph
html.Div([
html.H1(“This is a Test Dashboard”),
html.P(“Dash is great!!”)
],
style = {‘padding’ : ‘50px’ ,
‘backgroundColor’ : ‘#3aaab2’}),
# adding a plot
dcc.Graph(id=‘example-graph1’,
figure={‘data’: datalistfile,
‘layout’: {
‘title’: ‘Dash Data Visualization’,
‘xaxis’:{
‘title’:‘Anything’
},
‘yaxis’:{
‘title’:‘visualization’
},

        }
}
),
html.P([
                html.Label("Choose a feature"),
                    dcc.Dropdown(
                            id='opt',
                            options=opts,
                            value='file1',
                            multi=True

                            )
      
           
                  ])


           
           ])

@app.callback(Output(‘example-graph1’, ‘figure’),
[Input(‘opt’, ‘value’)])
def update_figure(selected_values):

graphs=[]

datalist=[]
for j in outer_dictionary[X]:
    for k in outer_dictionary[X][j]:
        if(k=='attribute1'):
            datalist.append({'x':outer_dictionary[X][j]['attribute1'], 'y': outer_dictionary[X][j]['attribute2'], 'type': 'scatter', 'name': j})






figure={'data': datalist,
        'layout': {
            'title': 'Dash Data Visualization',
            'xaxis':{
                'title':'Anything'
            },
            'yaxis':{
                 'title':'visulaization'
            }
        }
}
return figure

if name == ‘main’:
app.run_server(debug = True)