######################################################################
# Steps to check your YAML configuration works correctly:
# 1. Paste the YAML into dashboard.yaml.
# 2. Put any custom chart/action/figure/table functions definitions in this file.
# 3. Put any data_manager definitions in this file.
# 4. Check dashboard works as expected.
######################################################################
from pathlib import Path
import vizro.plotly.express as px
import yaml
from vizro import Vizro
from vizro.managers import data_manager
from vizro.models import Dashboard
from vizro.models.types import capture
data_manager["gapminder"] = px.data.gapminder()
dashboard = yaml.safe_load(Path("dashboard.yaml").read_text(encoding="utf-8"))
dashboard = Dashboard(**dashboard)
if __name__ == "__main__":
Vizro().build(dashboard).run(debug=True)