Bar Graph Not showing up after callback

Hello Everyone ,
This is the code I have written for the graph in my app layout :


Now in the callback my code is :

    Output('last7days_allotment', 'figure'),
    Input('url', 'pathname'),
    # State('my-date-picker-single', 'date')
def func(date):
    # today_date =
    data = seven_allotment()
    data1 = data.groupby(['allotment_date'])['cycleid'].nunique().reset_index()
    graph =, x="allotment_date", y="cycleid", color="allotment_date",
    return graph

But their is nothing that pops up in the page , the bar graph is not there. Is there any suggesstions to what I can do ?

Hi @Lucifer ,

You have to give the graph the id='last7days_allotment'

Also make sure that you input the correct argument into your function, right now it’s the pathname of the component url.