2021-04-30

Missing data points in line chart

Plotly has missing data points on the graph that are present in the x and y lists which are being used to draw the graph. I am not sure why.

x_axis_list = ['2019-00', '2019-01', '2019-02',.....'2019-54']
y_axis_list = [0,0,0,....1,2,0,0]

When I draw this out using Plotly:

my_fig = px.line(x=x_axis_list, y=y_axis_list,\
labels=dict(time_from_db="Time", \
num_of_accidents_from_db="Num of Accidents"), \
title="Number of Accidents Per Week")

dcc.Graph(id='my_fig', figure=my_fig)

I get weird line charts that looks something like the below figure. enter image description here



from Recent Questions - Stack Overflow https://ift.tt/3u51Ty9
https://ift.tt/3t4ndCE

No comments:

Post a Comment