Two Dropdowns that depend on eachother

Hello everybody,
I was wondering if anyone can help me
I want to add an other dropdown to select a variable from the columns
well i created a dropdown to select the year and i want to add a new one to select a variable from the 3rd to the 10th columns and then to create an histogram for each variable selected( in the selected year )

here’s my code ( which only select the year )

html.H1(‘select the year’),
{‘label’: c, ‘value’: c} for c in year


], className=“container”)


@app.callback(dash.dependencies.Output(‘my-graph’, ‘figure’),
[dash.dependencies.Input(‘my-dropdown’, ‘value’)]


def update_graph(selected_dropdown_value):
dff = data[data[‘year’] == selected_dropdown_value]
return {
‘data’: [ {
‘x’: dff.nom,
‘y’: dff.var1 (column’s name)
“type”: “bar”,
“marker”: {“color”: “#0074D9”},

    'layout': {
        'margin': {
            'l': 30,
            'r': 20,
            'b': 30,
            't': 20

Here’s an example for dropdown updating another dropdown: