Hi,
I need to display a line chart with a Dataframe 3 column long.
The x-axis is the Date and the y-axis needs to be 2 separate lines named Successful and Failure
The data inside come from a database and looks like this:
Date Successful Failure
0 12/07/2019 10:54:33 258 29
I’m completely stuck I don’t know how to make this.
Can someone give me an example?
I’ve tried this
dcc.Graph(
figure=(
"data": [
go.Line(
"x":dfgraphstats["Date"]
"y":dfgraphstats["Successful"]
name='Succesful',
marker=go.Line.Marker(
color='rgb(0, 255, 0)'
)
),
go.Line(
"x":dfgraphstats["Date"]
"y":dfgraphstats["Failure"]
name='Failed',
marker=go.Line.Marker(
color='rgb(255, 0, 0)'
)
)
],
layout=go.Layout(
title='Chart of successful and failed builds',
showlegend=True,
legend=go.layout.Legend(
x=0,
y=1.0
),
margin=go.layout.Margin(l=40, r=0, t=40, b=30)
)
),
style={'height': 300},
id='my-graph'
),
Thanks in advance!