import vizro.models as vm
import vizro.plotly.express as px
from vizro import Vizro
iris = px.data.iris()
page = vm.Page(
title="Containers with different styles",
layout=vm.Grid(grid=[[0, 1]]),
components=[
vm.Container(
title="Container with background color",
components=[vm.Graph(figure=px.scatter(iris, x="sepal_width", y="sepal_length", color="species"))],
variant="filled"
),
vm.Container(
title="Container with borders",
components=[vm.Graph(figure=px.box(iris, x="species", y="sepal_length", color="species"))],
variant="outlined"
)
],
)
dashboard = vm.Dashboard(pages=[page])
Vizro().build(dashboard).run()