Save my friends.
This is my first post, I would like to ask a question about line chart.
Below is my data frame:
seller MonthYear qtitem
0 CARLA 2020-11 29606.085
1 CARLA 2020-12 55669,940
2 CARLA 2021-01 12620,795
3 EDSON MARTINS 2020-11 4172,595
4 EDSON MARTINS 2020-12 15973.180
.. ... ... ...
61 SUPERVISOR 2020-12 797,311
62 SUPERVISOR 2021-01 36,000
63 VANDERSON 2021-01 1819,240
64 VANDERSON 2021-02 8321.185
65 VANDERSON 2021-03 1282,000
Below is my callback
@app.callback(
Output('my_graphic', 'figure'),
[
Input('sellers', 'value'),
]
)
def my_callback(input_data):
graph = {
'date': []
}
for x in input_data:
print(movement_per_month_vendors)
graph['date'].append(
{
'y': movement_by_months_vendedores.values,
'x': movement_by_months_vendedores.index,
'name': x,
'type': 'line'
},
)
return graph
Apparently it works, however, I should see lines from a certain seller in a certain month, but that’s not what I see.
Can someone help me?