Pie chart selectable per day

Hi all,

I have a data frame with 3 columns, name of a used application [‘app’], the time spend on this application [‘usage’] and a column with the date [‘date’]

No i would like to make a Pie chart which is selectable per day.

No i have got the following:

Fig6 = go.Figure(data=[go.Pie(labels=df4['app'], values=df4['usage'], hole=.3)])

together with

html.Div([
dcc.Graph(id='diagram6', figure=fig6)] , className='six columns')], className="row" )])

This makes a pie chart of all the data, but i would like to make it [‘date’] specific so it show the app and usage per day and is selectable with arrow buttons of something like that.

Is this possible, and if can somebody help me with it?

Kind Regards

not sure about an object with arrows (maybe you can make a slider, not sure if it works with textdata though),
but you could do a checkbox/dropdown menu, something like that, which gets its values from:
df4[‘usage’].unique()
Use it as a state, or input to your app.callback creating the graph.
Like

@app.callback(Output('diagram6', 'figure')
[Input('date_selector', 'value']))

def plot_graph(value):
  return Fig6 = go.Figure(data=[go.Pie(labels=df4['app'], values=df4[df4['date']==value]['usage'], hole=.3)])