antonymilne commited on
Commit
0eaf8f9
·
verified ·
1 Parent(s): 6f96ad7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import vizro.plotly.express as px
2
+ from vizro import Vizro
3
+ import vizro.models as vm
4
+
5
+ df = px.data.iris()
6
+
7
+ page = vm.Page(
8
+ title="My first dashboard",
9
+ components=[
10
+ vm.Graph(figure=px.scatter(df, x="sepal_length", y="petal_width", color="species")),
11
+ vm.Graph(figure=px.histogram(df, x="sepal_width", color="species")),
12
+ ],
13
+ controls=[
14
+ vm.Filter(column="species"),
15
+ ],
16
+ )
17
+
18
+ dashboard = vm.Dashboard(pages=[page])
19
+ app = Vizro().build(dashboard)
20
+
21
+ if __name__ == "__main__":
22
+ app.run()