forked from avinashkranjan/Amazing-Python-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWaterfall.py
More file actions
24 lines (22 loc) · 749 Bytes
/
Waterfall.py
File metadata and controls
24 lines (22 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import plotly.express as px
import plotly.graph_objects as go
fig = go.Figure(go.Waterfall(
name = "20",
orientation = "v",
measure = ["relative", "relative", "relative", "relative", "relative", "total"],
x = ["Exp1", "Exp2", "Exp3", "Exp4", "Exp5", "Exp6"],
textposition = "outside",
text = ["100", "50", "130", "200", "40", "Total"],
y = [100, +50, 130, 200, 40, 0 ],
connector = {"line":{"color":"rgb(63, 63, 63)"}},
increasing = {"marker":{"color":"green"}},
totals = {"marker":{"color":"blue"}}
))
fig.update_layout(
title = "Waterfall Chart",
showlegend = True ,
xaxis_title='X Axis Title',
yaxis_title='Y Axis Title',
)
fig.layout.template = 'plotly_dark'
fig.show()