Callback with barchart

@app.callback(Output(‘barchart’, ‘figure’),
[Input(‘HeaterPlot’, ‘value’)])
def update_figure(features):

df_modified = df[df['HeaterID']==features]

trace_1 = go.Bar(x=list(df_modified.index), y=list(df_modified['KWH_Consumption']), name=features, line=dict(color='blue'))
#trace_2 = go.Scatter(x=list(df_modified.index), y=list(df_modified['on_to_off_energy']), name=features,line=dict(color='orange'))

return{
    'data':[trace_1],
    'layout':go.Layout(title='some',barmode='group')
}

I want to generate barchart with the above format, #how to do it?