diff --git a/.gitignore b/.gitignore
index 55ab715e8..396b42b68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,6 +68,7 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
+.playwright-mcp/
# Translations
*.mo
@@ -104,6 +105,9 @@ out/
.vscode/
.cursor/
+# Claude Code
+.claude/
+
# PEP 582
__pypackages__/
diff --git a/vizro-core/changelog.d/20260120_184040_maximilian_schulz_mkdocstring_2.md b/vizro-core/changelog.d/20260120_184040_maximilian_schulz_mkdocstring_2.md
new file mode 100644
index 000000000..7c0d58d4f
--- /dev/null
+++ b/vizro-core/changelog.d/20260120_184040_maximilian_schulz_mkdocstring_2.md
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
diff --git a/vizro-core/docs/griffe_extensions.py b/vizro-core/docs/griffe_extensions.py
index 5c3e49725..cb856a10a 100644
--- a/vizro-core/docs/griffe_extensions.py
+++ b/vizro-core/docs/griffe_extensions.py
@@ -1,8 +1,11 @@
"""Extensions we have written to help generate API reference docs."""
import griffe
+from pydantic import BaseModel
+from pydantic.fields import FieldInfo, PydanticUndefined
logger = griffe.get_logger("griffe_dynamically_inspect")
+pydantic_logger = griffe.get_logger("griffe_pydantic_docs_cleaner")
class DynamicallyInspect(griffe.Extension):
@@ -33,3 +36,117 @@ def on_instance(self, *, obj: griffe.Object, **kwargs): # noqa: D102
logger.info("Dynamically inspecting '%s'", obj.path)
inspected_module = griffe.inspect(obj.module.path, filepath=obj.filepath)
obj.parent.set_member(obj.name, inspected_module[obj.name])
+
+
+class PydanticDocsCleaner(griffe.Extension):
+ """Clean up Pydantic model documentation.
+
+ This extension:
+ 1. Filters out private members (PrivateAttr, 'type' field, underscore-prefixed methods)
+ 2. Excludes pydantic fields from TOC while keeping them renderable in tables
+ """
+
+ def __init__(self, **kwargs):
+ """Accept kwargs for griffe compatibility."""
+
+ def _filter_private_attrs(self, cls: griffe.Class) -> None:
+ """Filter out private members from a Pydantic model class."""
+ python_obj = griffe.dynamic_import(cls.path)
+ if python_obj is None or not issubclass(python_obj, BaseModel):
+ return
+
+ private_attrs = getattr(python_obj, "__private_attributes__", {})
+ for name in list(cls.members.keys()):
+ if name in private_attrs:
+ cls.del_member(name)
+ pydantic_logger.info(f"Filtered out PrivateAttr '{name}' from {cls.path}")
+ elif name == "type":
+ cls.del_member(name)
+ pydantic_logger.info(f"Filtered out 'type' field from {cls.path}")
+ elif name.startswith("_") and not name.startswith("__"):
+ cls.del_member(name)
+ pydantic_logger.info(f"Filtered out private member '{name}' from {cls.path}")
+
+ def on_class_members(self, *, cls: griffe.Class, **kwargs):
+ """Filter out PrivateAttr members when class members are collected."""
+ self._filter_private_attrs(cls)
+
+ def on_instance(self, *, obj: griffe.Object, **kwargs):
+ """Filter out PrivateAttr members after all processing is complete."""
+ if isinstance(obj, griffe.Class):
+ self._filter_private_attrs(obj)
+
+ def _enrich_field_metadata(self, cls: griffe.Class) -> None:
+ """Enrich field metadata for defaults/required from model_fields.
+
+ griffe-pydantic's static analysis doesn't handle SkipJsonSchema patterns reliably,
+ so we dynamically import the model and extract defaults from model_fields.
+ We also record explicit `required` to distinguish from default=None.
+ """
+ python_obj = griffe.dynamic_import(cls.path)
+
+ if python_obj is None or not issubclass(python_obj, BaseModel):
+ return
+
+ model_fields = getattr(python_obj, "model_fields", {})
+ for name, member in cls.members.items():
+ if not hasattr(member, "labels") or "pydantic-field" not in member.labels:
+ continue
+ field_info = model_fields.get(name)
+ if field_info is None or not isinstance(field_info, FieldInfo):
+ continue
+
+ required = field_info.is_required()
+ default_display = None
+ if not required:
+ if field_info.default is not PydanticUndefined:
+ default_display = repr(field_info.default)
+ elif field_info.default_factory is not None:
+ factory = field_info.default_factory
+ factory_name = getattr(factory, "__name__", None)
+ if factory_name:
+ default_display = f"default_factory={factory_name}"
+ else:
+ default_display = f"default_factory={factory!r}"
+
+ member.extra.setdefault("vizro_pydantic", {})
+ member.extra["vizro_pydantic"]["required"] = required
+ member.extra["vizro_pydantic"]["default_display"] = default_display
+
+ def _exclude_fields_from_toc(self, cls: griffe.Class) -> None:
+ """Store fields and remove from members to exclude from TOC."""
+ if "pydantic-model" not in cls.labels:
+ return
+
+ # Enrich defaults/required before storing fields
+ self._enrich_field_metadata(cls)
+
+ # Collect pydantic fields
+ stored_fields = {}
+ fields_to_remove = []
+ for name, member in list(cls.members.items()):
+ if hasattr(member, "labels") and "pydantic-field" in member.labels:
+ stored_fields[name] = member
+ fields_to_remove.append(name)
+
+ if stored_fields:
+ # Store fields for template access
+ cls.extra.setdefault("griffe_pydantic", {})["_stored_fields"] = stored_fields
+
+ # Remove from members (prevents TOC listing)
+ for name in fields_to_remove:
+ cls.del_member(name)
+
+ def on_package(self, *, pkg: griffe.Module, **kwargs):
+ """Process all classes after package is fully loaded (after griffe_pydantic runs)."""
+ self._process_module_recursive(pkg)
+
+ def _process_module_recursive(self, module: griffe.Module) -> None:
+ """Recursively process all modules and classes."""
+ for member in list(module.members.values()):
+ if isinstance(member, griffe.Alias):
+ continue # Skip aliases to avoid resolution errors
+ if isinstance(member, griffe.Class):
+ self._exclude_fields_from_toc(member)
+ elif isinstance(member, griffe.Module):
+ self._process_module_recursive(member)
diff --git a/vizro-core/docs/stylesheets/extra.css b/vizro-core/docs/stylesheets/extra.css
index 19518e179..d46fabc11 100644
--- a/vizro-core/docs/stylesheets/extra.css
+++ b/vizro-core/docs/stylesheets/extra.css
@@ -37,6 +37,27 @@
--md-code-hl-color: #119bec3e;
}
+/* Pydantic field table styling */
+.pydantic-field-table {
+ border: 1px solid var(--md-default-fg-color--lightest);
+ border-collapse: collapse;
+ font-size: 0.8em;
+ margin: 1em 0;
+ width: 100%;
+}
+
+.pydantic-field-table th,
+.pydantic-field-table td {
+ border: 1px solid var(--md-default-fg-color--lightest);
+ padding: 0.4em 0.8em;
+ text-align: left;
+}
+
+.pydantic-field-table th {
+ background: var(--md-default-bg-color--light);
+ font-weight: 600;
+}
+
.md-typeset th,
td:not([class]):not(:last-child) {
border-right: 1px solid lightgrey;
diff --git a/vizro-core/docs/templates/python/material/pydantic_model.html.jinja b/vizro-core/docs/templates/python/material/pydantic_model.html.jinja
new file mode 100644
index 000000000..2ee52b662
--- /dev/null
+++ b/vizro-core/docs/templates/python/material/pydantic_model.html.jinja
@@ -0,0 +1,96 @@
+{% extends "_base/class.html.jinja" %}
+
+{% block contents %}
+ {% block bases %}{{ super() }}{% endblock %}
+ {% block docstring %}{{ super() }}{% endblock %}
+
+ {% block schema scoped %}
+ {% if class.extra.griffe_pydantic.schema %}
+ Show JSON schema:
+ {{ class.extra.griffe_pydantic.schema | highlight(language="json") }}
+
+ {% endif %}
+ {% endblock schema %}
+
+ {% block config scoped %}
+ {% if class.extra.griffe_pydantic.config %}
+
Config:
+
+ {% for name, value in class.extra.griffe_pydantic.config.items() %}
+ {{ name }}: {{ value|string|highlight(language="python", inline=True) }}
+ {% endfor %}
+
+ {% endif %}
+ {% endblock config %}
+
+{% block fields scoped %}
+ {% with fields = class.extra.griffe_pydantic._stored_fields or class.extra.griffe_pydantic.fields() %}
+ {% if fields %}
+ Fields:
+
+
+
+ | Name |
+ Type |
+ Description |
+ Default |
+
+
+
+ {% for name, field in fields.items() %}
+
+ {{ name }} |
+ {% with expression = field.annotation %}{% include "expression.html.jinja" with context %}{% endwith %} |
+
+ {% if field.docstring %}
+
+ {% with autoref_hook = AutorefsHook(field, config) %}
+ {{ field.docstring.value|convert_markdown(heading_level, field.path, autoref_hook=autoref_hook) }}
+ {% endwith %}
+
+ {% endif %}
+ |
+
+ {% if field.extra.vizro_pydantic and field.extra.vizro_pydantic.default_display is not none %}
+ {{ field.extra.vizro_pydantic.default_display }}
+ {% elif field.extra.vizro_pydantic and field.extra.vizro_pydantic.required %}
+ required
+ {% elif field.value is not none %}
+ {{ field.value|string|highlight(language="python", inline=True) }}
+ {% else %}
+ required
+ {% endif %}
+ |
+
+ {% endfor %}
+
+
+ {% endif %}
+ {% endwith %}
+ {% endblock fields %}
+
+{% block validators scoped %}
+ {% with validators = class.extra.griffe_pydantic.validators() %}
+ {% if validators %}
+ Validators:
+
+ {% for name, validator in validators.items() if not name.startswith("_") %}
+ -
+
{{ name }}
+ {% if validator.extra.griffe_pydantic.targets %}
+ →
+ {% for target in validator.extra.griffe_pydantic.targets %}
+ {{ target.name }}
+ {%- if not loop.last %}, {% endif %}
+ {% endfor %}
+ {% endif %}
+
+ {% endfor %}
+
+ {% endif %}
+ {% endwith %}
+ {% endblock validators %}
+
+ {% block source %}{{ super() }}{% endblock %}
+ {% block children %}{{ super() }}{% endblock %}
+{% endblock contents %}
diff --git a/vizro-core/hatch.toml b/vizro-core/hatch.toml
index 71d54ccde..661ae045d 100644
--- a/vizro-core/hatch.toml
+++ b/vizro-core/hatch.toml
@@ -125,6 +125,7 @@ dependencies = [
"linkchecker",
"mkdocs-open-in-new-tab",
"mkdocs-pycafe",
+ "griffe-pydantic",
"PyGithub",
"playwright"
]
diff --git a/vizro-core/mkdocs.yml b/vizro-core/mkdocs.yml
index d19042eca..27f41a5e4 100644
--- a/vizro-core/mkdocs.yml
+++ b/vizro-core/mkdocs.yml
@@ -210,6 +210,7 @@ plugins:
- pages/explanation/schema.md: "The Vizro schema"
- pages/explanation/authors.md: "Vizro contributor listing"
- mkdocstrings:
+ custom_templates: docs/templates
handlers:
python:
options:
@@ -217,22 +218,33 @@ plugins:
show_source: false #currently doesn't show source at correct level, and not for pydantic models
docstring_style: google
merge_init_into_class: true
- docstring_section_style: list
+ docstring_section_style: table
separate_signature: true
- # filters: ["!^_"]
+ unwrap_annotated: true
+ show_symbol_type_heading: true
+ show_symbol_type_toc: false
+ signature_crossrefs: true
+ show_signature_annotations: true
+ filters: ["!^_"] # Hide private attributes (names starting with underscore)
show_root_heading: true
docstring_options:
ignore_init_summary: true
warn_unknown_params: false
returns_named_value: false
extensions:
- - docs/griffe_extensions.py:
+ - docs/griffe_extensions.py:DynamicallyInspect:
paths:
[vizro.figures.kpi_card, vizro.figures.kpi_card_reference]
- griffe_warnings_deprecated:
kind: danger
title: Deprecated
+ - griffe_pydantic:
+ schema: true
+ - docs/griffe_extensions.py:PydanticDocsCleaner
paths: [src]
+ inventories:
+ - https://docs.python.org/3/objects.inv
+ - https://docs.pydantic.dev/latest/objects.inv
- git-revision-date-localized:
enable_creation_date: false
extra_css:
diff --git a/vizro-core/schemas/0.1.51.json b/vizro-core/schemas/0.1.51.json
index af3a0b19e..d7fc5ac00 100644
--- a/vizro-core/schemas/0.1.51.json
+++ b/vizro-core/schemas/0.1.51.json
@@ -2,7 +2,7 @@
"$defs": {
"Accordion": {
"additionalProperties": false,
- "description": "Accordion to be used as `nav_selector` in [`Navigation`][vizro.models.Navigation].\n\nAbstract: Usage documentation\n [How to use an accordion](../user-guides/navigation.md/#group-pages)\n\nArgs:\n pages (dict[str, list[ModelID]]): Mapping from name of a pages group to a list of page IDs/titles.\n Defaults to `{}`.",
+ "description": "Accordion to be used as `nav_selector` in [`Navigation`][vizro.models.Navigation].\n\nAbstract: Usage documentation\n [How to use an accordion](../user-guides/navigation.md/#group-pages)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -33,7 +33,7 @@
},
"Action": {
"additionalProperties": false,
- "description": "Custom action to be inserted into `actions` of source component.\n\nAbstract: Usage documentation\n [How to create custom actions](../user-guides/custom-actions.md)\n\nArgs:\n function (CapturedCallable): Custom action function.\n inputs (list[str]): List of inputs provided to the action function. Each input can be specified as\n `` or `.` or `.`. Defaults to `[]`.\n \u2757Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](\n deprecations.md#action-model-inputs-argument).\n outputs (OutputsType): See [`OutputsType`][vizro.models.types.OutputsType].",
+ "description": "Custom action to be inserted into `actions` of source component.\n\nAbstract: Usage documentation\n [How to create custom actions](../user-guides/custom-actions.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -66,7 +66,7 @@
},
"inputs": {
"default": [],
- "description": "List of inputs provided to the action function. Each input can be specified as\n `` or `.` or `.`. Defaults to `[]`.\n \u2757Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](\n deprecations.md#action-model-inputs-argument).",
+ "description": "List of inputs provided to the action function. Each input can be specified as\n `` or `.` or `.`.\n \u2757Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](\n deprecations.md#action-model-inputs-argument).",
"items": {
"type": "string"
},
@@ -79,7 +79,7 @@
},
"AgGrid": {
"additionalProperties": false,
- "description": "Wrapper for `dash_ag_grid.AgGrid` to visualize grids in dashboard.\n\nAbstract: Usage documentation\n [How to use an AgGrid](../user-guides/table.md/#ag-grid)\n\nArgs:\n figure (CapturedCallable): Function that returns a Dash AgGrid. See [`vizro.tables`][vizro.tables].\n title (str): Title of the `AgGrid`. Defaults to `\"\"`.\n header (str): Markdown text positioned below the `AgGrid.title`. Follows the CommonMark specification.\n Ideal for adding supplementary information such as subtitles, descriptions, or additional context.\n Defaults to `\"\"`.\n footer (str): Markdown text positioned below the `AgGrid`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Wrapper for `dash_ag_grid.AgGrid` to visualize grids in dashboard.\n\nAbstract: Usage documentation\n [How to use an AgGrid](../user-guides/table.md/#ag-grid)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -120,7 +120,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -156,7 +156,7 @@
},
"Button": {
"additionalProperties": false,
- "description": "Button that can trigger actions or navigate.\n\nAbstract: Usage documentation\n [How to use buttons](../user-guides/button.md)\n\nArgs:\n icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons). Defaults to `\"\"`.\n text (str): Text to be displayed on button. Defaults to `\"Click me!\"`.\n href (str): URL (relative or absolute) to navigate to. Defaults to `\"\"`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n variant (Literal[\"plain\", \"filled\", \"outlined\"]): Predefined styles to choose from. Options are `plain`,\n `filled` or `outlined`. Defaults to `filled`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the button text.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Button` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/button/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Button that can trigger actions or navigate.\n\nAbstract: Usage documentation\n [How to use buttons](../user-guides/button.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -217,7 +217,7 @@
},
"variant": {
"default": "filled",
- "description": "Predefined styles to choose from. Options are `plain`, `filled` or `outlined`.Defaults to `filled`.",
+ "description": "Predefined styles to choose from. Options are `plain`, `filled` or `outlined`.",
"enum": ["plain", "filled", "outlined"],
"title": "Variant",
"type": "string"
@@ -232,7 +232,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the button text.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the button text.\n Hovering over the icon shows a tooltip with the provided description."
}
},
"title": "Button",
@@ -240,7 +240,7 @@
},
"Card": {
"additionalProperties": false,
- "description": "Card based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to use cards](../user-guides/card.md)\n\nArgs:\n text (str): Markdown string to create card title/text that should adhere to the CommonMark Spec.\n header (str): Markdown text positioned above the card text. Follows the CommonMark specification.\n Ideal for adding supplementary information. Defaults to `\"\"`.\n footer (str): Markdown text positioned at the bottom of the `Card`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n href (str): URL (relative or absolute) to navigate to. If not provided the Card serves as a text card\n only. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon in the top-right corner of the Card.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Card` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/card/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Card based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to use cards](../user-guides/card.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -286,7 +286,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon in the top-right corner of the Card.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon in the top-right corner of the Card.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -323,7 +323,7 @@
},
"Checklist": {
"additionalProperties": false,
- "description": "Categorical multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)\n\nArgs:\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (MultiValueType | None): See [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to\n `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n show_select_all (bool): Whether to display the 'Select All' option that allows users to select or\n deselect all available options with a single click. Defaults to `True`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Checklist` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Categorical multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -429,7 +429,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -465,7 +465,7 @@
},
"Container": {
"additionalProperties": false,
- "description": "Container to group together a set of components on a page.\n\nAbstract: Usage documentation\n [How to use containers](../user-guides/container.md)\n\nArgs:\n components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component\n has to be provided.\n title (str): Title of the `Container`. Defaults to `\"\"`.\n layout (LayoutType | None): Layout to place components in. Defaults to `None`.\n collapsed (bool | None): Boolean flag that determines whether the container is collapsed on initial load.\n Set to `True` for a collapsed state, `False` for an expanded state. Defaults to `None`, meaning the\n container is not collapsible.\n variant (Literal[\"plain\", \"filled\", \"outlined\"] | None): Predefined styles to choose from. Options are\n `plain`, `filled` or `outlined`. Defaults to `plain` (or `outlined` for collapsible container).\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n controls (list[ControlType]): See [ControlType][vizro.models.types.ControlType]. Defaults to `[]`.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Container` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/layout/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Container to group together a set of components on a page.\n\nAbstract: Usage documentation\n [How to use containers](../user-guides/container.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -595,7 +595,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"controls": {
"default": [],
@@ -627,7 +627,7 @@
},
"DatePicker": {
"additionalProperties": false,
- "description": "Temporal single/range option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use temporal selectors](../user-guides/selectors.md#temporal-selectors)\n\nArgs:\n min (date | None): Start date for date picker. Defaults to `None`.\n max (date | None): End date for date picker. Defaults to `None`.\n value (list[date] | date | None): Default date/dates for date picker. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n range (bool): Boolean flag for displaying range picker. Defaults to `True`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dmc.DatePickerInput` and overwrite\n any defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dmc documentation](https://www.dash-mantine-components.com/components/datepicker)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Temporal single/range option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use temporal selectors](../user-guides/selectors.md#temporal-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -711,7 +711,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -747,7 +747,7 @@
},
"Dropdown": {
"additionalProperties": false,
- "description": "Categorical single/multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)\n\nArgs:\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (SingleValueType | MultiValueType | None): See\n [`SingleValueType`][vizro.models.types.SingleValueType] and\n [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to `None`.\n multi (bool): Whether to allow selection of multiple values. Defaults to `True`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Dropdown` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/dropdown)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Categorical single/multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -866,7 +866,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -902,7 +902,7 @@
},
"Figure": {
"additionalProperties": false,
- "description": "Object that is reactive to controls, for example a KPI card.\n\nAbstract: Usage documentation\n [How to use figures](../user-guides/figure.md)\n\nArgs:\n figure (CapturedCallable): Function that returns a figure-like object. See [`vizro.figures`][vizro.figures].\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Object that is reactive to controls, for example a KPI card.\n\nAbstract: Usage documentation\n [How to use figures](../user-guides/figure.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -949,7 +949,7 @@
},
"Filter": {
"additionalProperties": false,
- "description": "Filter the data supplied to `targets`.\n\nAbstract: Usage documentation\n [How to use filters](../user-guides/filters.md)\n\nArgs:\n column (str): Column of `DataFrame` to filter.\n targets (list[ModelID]): Target component to be affected by filter. If none are given then target all components\n on the page that use `column`. Defaults to `[]`.\n selector (SelectorType | None): See [SelectorType][vizro.models.types.SelectorType]. Defaults to `None`.\n show_in_url (bool): Whether the filter should be included in the URL query string. Defaults to `False`.\n Useful for bookmarking or sharing dashboards with specific filter values pre-set.\n visible (bool): Whether the filter should be visible. Defaults to `True`.\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Filter(column=\"species\")\n ```",
+ "description": "Filter the data supplied to `targets`.\n\nAbstract: Usage documentation\n [How to use filters](../user-guides/filters.md)\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Filter(column=\"species\")\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1025,13 +1025,13 @@
},
"show_in_url": {
"default": false,
- "description": "Whether the filter should be included in the URL query string. Defaults to `False`. Useful for bookmarking or sharing dashboards with specific filter values pre-set.",
+ "description": "Whether the filter should be included in the URL query string. Useful for bookmarking or sharing dashboards with specific filter values pre-set.",
"title": "Show In Url",
"type": "boolean"
},
"visible": {
"default": true,
- "description": "Whether the filter should be visible. Defaults to `True`.",
+ "description": "Whether the filter should be visible.",
"title": "Visible",
"type": "boolean"
}
@@ -1042,7 +1042,7 @@
},
"Flex": {
"additionalProperties": false,
- "description": "Flex layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Flex layout](../user-guides/layouts.md#flex-layout)\n\nArgs:\n direction (Literal[\"row\", \"column\"]): Sets the direction of the flex items inside the container. Options are\n `row` or `column`. Defaults to `column`.\n gap (str): Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'.\n Defaults to `24px`.\n wrap (bool): Determines whether flex items are forced onto a single line or can wrap onto multiple lines.\n If `False`, all items will be on one line. If `True`, items will wrap onto multiple lines.\n Defaults to `False`.",
+ "description": "Flex layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Flex layout](../user-guides/layouts.md#flex-layout)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1057,21 +1057,21 @@
},
"direction": {
"default": "column",
- "description": "Sets the direction of the flex items inside the container. Options are `row` or `column`.Defaults to `column`.",
+ "description": "Sets the direction of the flex items inside the container. Options are `row` or `column`.",
"enum": ["row", "column"],
"title": "Direction",
"type": "string"
},
"gap": {
"default": "24px",
- "description": "Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Gap",
"type": "string"
},
"wrap": {
"default": false,
- "description": "Determines whether flex items are forced onto a single line or can wrap onto multiple lines. If `False`, all items will be on one line. If `True`, items will wrap onto multiple lines. Defaults to `False`.",
+ "description": "Determines whether flex items are forced onto a single line or can wrap onto multiple lines. If `False`, all items will be on one line. If `True`, items will wrap onto multiple lines.",
"title": "Wrap",
"type": "boolean"
}
@@ -1081,7 +1081,7 @@
},
"Graph": {
"additionalProperties": false,
- "description": "Wrapper for `dcc.Graph` to visualize charts.\n\nAbstract: Usage documentation\n [How to use graphs](../user-guides/graph.md)\n\nArgs:\n figure (CapturedCallable): Function that returns a graph. Either use\n [`vizro.plotly.express`](../user-guides/graph.md) or see\n [`CapturedCallable`][vizro.models.types.CapturedCallable].\n title (str): Title of the `Graph`. Defaults to `\"\"`.\n header (str): Markdown text positioned below the `Graph.title`. Follows the CommonMark specification.\n Ideal for adding supplementary information such as subtitles, descriptions, or additional context.\n Defaults to `\"\"`.\n footer (str): Markdown text positioned below the `Graph`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Graph` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/graph#graph-properties)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Wrapper for `dcc.Graph` to visualize charts.\n\nAbstract: Usage documentation\n [How to use graphs](../user-guides/graph.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1122,7 +1122,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -1158,7 +1158,7 @@
},
"Grid": {
"additionalProperties": false,
- "description": "Grid layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Grid layout](../user-guides/layouts.md#grid-layout)\n\nArgs:\n grid (list[list[int]]): Grid specification to arrange components on screen.\n row_gap (str): Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.\n col_gap (str): Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.\n row_min_height (str): Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.\n col_min_width (str): Minimum column width in px. Allowed unit are: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Grid layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Grid layout](../user-guides/layouts.md#grid-layout)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1184,28 +1184,28 @@
},
"row_gap": {
"default": "24px",
- "description": "Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between rows. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Gap",
"type": "string"
},
"col_gap": {
"default": "24px",
- "description": "Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between columns. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Gap",
"type": "string"
},
"row_min_height": {
"default": "0px",
- "description": "Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum row height in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Min Height",
"type": "string"
},
"col_min_width": {
"default": "0px",
- "description": "Minimum column width in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum column width in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Min Width",
"type": "string"
@@ -1244,28 +1244,28 @@
},
"row_gap": {
"default": "24px",
- "description": "Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between rows. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Gap",
"type": "string"
},
"col_gap": {
"default": "24px",
- "description": "Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between columns. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Gap",
"type": "string"
},
"row_min_height": {
"default": "0px",
- "description": "Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum row height in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Min Height",
"type": "string"
},
"col_min_width": {
"default": "0px",
- "description": "Minimum column width in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum column width in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Min Width",
"type": "string"
@@ -1277,7 +1277,7 @@
},
"NavBar": {
"additionalProperties": false,
- "description": "Navigation bar to be used as a `nav_selector` for `Navigation`.\n\nAbstract: Usage documentation\n [How to use the navigation bar](../user-guides/navigation.md#use-a-navigation-bar-with-icons)\n\nArgs:\n pages (dict[str, list[ModelID]]): Mapping from name of a pages group to a list of page IDs/titles.\n Defaults to `{}`.\n items (list[NavLink]): See [`NavLink`][vizro.models.NavLink]. Defaults to `[]`.",
+ "description": "Navigation bar to be used as a `nav_selector` for `Navigation`.\n\nAbstract: Usage documentation\n [How to use the navigation bar](../user-guides/navigation.md#use-a-navigation-bar-with-icons)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1316,7 +1316,7 @@
},
"NavLink": {
"additionalProperties": false,
- "description": "Icon that serves as a navigation link to be used in a [`NavBar`][vizro.models.NavBar].\n\nAbstract: Usage documentation\n [How to customize the NavBar icons](../user-guides/navigation.md#change-icons)\n\nArgs:\n pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.\n label (str): Text description of the icon for use in tooltip.\n icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons). Defaults to `\"\"`.",
+ "description": "Icon that serves as a navigation link to be used in a [`NavBar`][vizro.models.NavBar].\n\nAbstract: Usage documentation\n [How to customize the NavBar icons](../user-guides/navigation.md#change-icons)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1362,7 +1362,7 @@
},
"Navigation": {
"additionalProperties": false,
- "description": "Navigation to arrange hierarchy of [`Pages`][vizro.models.Page].\n\nAbstract: Usage documentation\n [How to customize the navigation](../user-guides/navigation.md)\n\nArgs:\n pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.\n nav_selector (NavSelectorType | None): See [`NavSelectorType`][vizro.models.types.NavSelectorType].\n Defaults to `None`.",
+ "description": "Navigation to arrange hierarchy of [`Pages`][vizro.models.Page].\n\nAbstract: Usage documentation\n [How to customize the navigation](../user-guides/navigation.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1423,7 +1423,7 @@
},
"Page": {
"additionalProperties": false,
- "description": "A page in [`Dashboard`][vizro.models.Dashboard] with its own URL path and place in the `Navigation`.\n\nAbstract: Usage documentation\n [How to make dashboard pages](../user-guides/pages.md)\n\nArgs:\n components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component\n has to be provided.\n title (str): Title of the `Page`.\n layout (LayoutType | None): Layout to place components in. Defaults to `None`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`.\n controls (list[ControlType]): See [ControlType][vizro.models.types.ControlType]. Defaults to `[]`.\n path (str): Path to navigate to page. Defaults to `\"\"`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "A page in [`Dashboard`][vizro.models.Dashboard] with its own URL path and place in the `Navigation`.\n\nAbstract: Usage documentation\n [How to make dashboard pages](../user-guides/pages.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1519,7 +1519,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags."
},
"controls": {
"default": [],
@@ -1585,7 +1585,7 @@
},
"Parameter": {
"additionalProperties": false,
- "description": "Alter the arguments supplied to any `targets`.\n\nAbstract: Usage documentation\n [How to use parameters](../user-guides/parameters.md)\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Parameter(targets=[\"scatter.x\"], selector=vm.Slider(min=0, max=1, default=0.8, title=\"Bubble opacity\"))\n ```\n\nArgs:\n targets (list[str]): Targets in the form of `.`.\n selector (SelectorType): See [SelectorType][vizro.models.types.SelectorType]. Converts selector value\n `\"NONE\"` into `None` to allow optional parameters.\n show_in_url (bool): Whether the parameter should be included in the URL query string. Defaults to `False`.\n Useful for bookmarking or sharing dashboards with specific parameter values pre-set.\n visible (bool): Whether the parameter should be visible. Defaults to `True`.",
+ "description": "Alter the arguments supplied to any `targets`.\n\nAbstract: Usage documentation\n [How to use parameters](../user-guides/parameters.md)\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Parameter(targets=[\"scatter.x\"], selector=vm.Slider(min=0, max=1, default=0.8, title=\"Bubble opacity\"))\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1647,13 +1647,13 @@
},
"show_in_url": {
"default": false,
- "description": "Whether the parameter should be included in the URL query string. Defaults to `False`. Useful for bookmarking or sharing dashboards with specific parameter values pre-set.",
+ "description": "Whether the parameter should be included in the URL query string. Useful for bookmarking or sharing dashboards with specific parameter values pre-set.",
"title": "Show In Url",
"type": "boolean"
},
"visible": {
"default": true,
- "description": "Whether the parameter should be visible. Defaults to `True`.",
+ "description": "Whether the parameter should be visible.",
"title": "Visible",
"type": "boolean"
}
@@ -1664,7 +1664,7 @@
},
"RadioItems": {
"additionalProperties": false,
- "description": "Categorical single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md/#categorical-selectors)\n\nArgs:\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (SingleValueType | None): See [`SingleValueType`][vizro.models.types.SingleValueType].\n Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.RadioItems` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Categorical single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md/#categorical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1752,7 +1752,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -1788,7 +1788,7 @@
},
"RangeSlider": {
"additionalProperties": false,
- "description": "Numeric multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)\n\nArgs:\n min (float | None): Start value for slider. Defaults to `None`.\n max (float | None): End value for slider. Defaults to `None`.\n step (float | None): Step-size for marks on slider. Defaults to `None`.\n marks (dict[float, str]): Marks to be displayed on slider. Defaults to `{}`.\n value (list[float] | None): Default start and end value for slider. Must be 2 items. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.RangeSlider` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/rangeslider)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Numeric multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1889,7 +1889,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -1925,7 +1925,7 @@
},
"Slider": {
"additionalProperties": false,
- "description": "Numeric single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)\n\nArgs:\n min (float | None): Start value for slider. Defaults to `None`.\n max (float | None): End value for slider. Defaults to `None`.\n step (float | None): Step-size for marks on slider. Defaults to `None`.\n marks (dict[float, str]): Marks to be displayed on slider. Defaults to `{}`.\n value (float | None): Default value for slider. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Slider` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/slider)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Numeric single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2022,7 +2022,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -2058,7 +2058,7 @@
},
"Switch": {
"additionalProperties": false,
- "description": "Boolean single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use boolean selectors](../user-guides/selectors.md/#boolean-selectors)\n\nArgs:\n value (bool): Initial state of the switch. When `True`, the switch is \"on\".\n When `False`, the switch is \"off\". Defaults to `False`.\n title (str): Title/Label to be displayed to the right of the switch. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Switch` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Boolean single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use boolean selectors](../user-guides/selectors.md/#boolean-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2073,7 +2073,7 @@
},
"value": {
"default": false,
- "description": "Initial state of the switch. When `True`, the switch is enabled/on.\n When `False`, the switch is disabled/off. Defaults to `False`.",
+ "description": "Initial state of the switch. When `True`, the switch is enabled/on.\n When `False`, the switch is disabled/off.",
"title": "Value",
"type": "boolean"
},
@@ -2093,7 +2093,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -2129,7 +2129,7 @@
},
"Table": {
"additionalProperties": false,
- "description": "Wrapper for `dash_table.DataTable` to visualize tables in dashboard.\n\nAbstract: Usage documentation\n [How to use tables](../user-guides/table.md)\n\nArgs:\n figure (CapturedCallable): Function that returns a Dash DataTable. See [`vizro.tables`][vizro.tables].\n title (str): Title of the `Table`. Defaults to `\"\"`.\n header (str): Markdown text positioned below the `Table.title`. Follows the CommonMark specification.\n Ideal for adding supplementary information such as subtitles, descriptions, or additional context.\n Defaults to `\"\"`.\n footer (str): Markdown text positioned below the `Table`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Wrapper for `dash_table.DataTable` to visualize tables in dashboard.\n\nAbstract: Usage documentation\n [How to use tables](../user-guides/table.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2170,7 +2170,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -2206,7 +2206,7 @@
},
"Tabs": {
"additionalProperties": false,
- "description": "Tabs to group together a set of [`Containers`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use tabs](../user-guides/tabs.md)\n\nArgs:\n tabs (list[Container]): See [`Container`][vizro.models.Container].\n title (str): Title displayed above Tabs. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.",
+ "description": "Tabs to group together a set of [`Containers`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use tabs](../user-guides/tabs.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2243,7 +2243,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
}
},
"required": ["tabs"],
@@ -2252,7 +2252,7 @@
},
"Text": {
"additionalProperties": false,
- "description": "Text based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to add text to your page](../user-guides/text.md)\n\nArgs:\n text (str): Markdown string to create text that should adhere to the CommonMark Spec.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Markdown` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/markdown/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Text based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to add text to your page](../user-guides/text.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2277,7 +2277,7 @@
},
"Tooltip": {
"additionalProperties": false,
- "description": "A tooltip that displays text when hovering over an icon.\n\nAbstract: Usage documentation\n Read more about usage in the guides on [dashboards](../user-guides/dashboard.md#add-a-dashboard-tooltip),\n [pages](../user-guides/pages.md#add-a-tooltip),\n [containers](../user-guides/container.md#add-a-tooltip),\n [graphs](../user-guides/graph.md#add-a-tooltip),\n [tables](../user-guides/table.md#add-a-tooltip), [tabs](../user-guides/tabs.md#add-a-tooltip),\n [selectors](../user-guides/selectors.md#add-a-tooltip) and\n [buttons](../user-guides/button.md#add-a-tooltip).\n\nArgs:\n text (str): Markdown string for text shown when hovering over the icon. Should adhere to the CommonMark Spec.\n icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons).\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Tooltip` and overwrite any\n chosen by the Vizro team. This may have unexpected behavior. Visit the\n [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/tooltip/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.\n\nExample: `Tooltip` on a [`Checklist`][vizro.models.Checklist] selector\n ```python\n import vizro.models as vm\n\n vm.Checklist(\n title=\"Select Species\",\n description=vm.Tooltip(text=\"Select something\", icon=\"start\"),\n )\n ```",
+ "description": "A tooltip that displays text when hovering over an icon.\n\nAbstract: Usage documentation\n Read more about usage in the guides on [dashboards](../user-guides/dashboard.md#add-a-dashboard-tooltip),\n [pages](../user-guides/pages.md#add-a-tooltip),\n [containers](../user-guides/container.md#add-a-tooltip),\n [graphs](../user-guides/graph.md#add-a-tooltip),\n [tables](../user-guides/table.md#add-a-tooltip), [tabs](../user-guides/tabs.md#add-a-tooltip),\n [selectors](../user-guides/selectors.md#add-a-tooltip) and\n [buttons](../user-guides/button.md#add-a-tooltip).\n\nExample: `Tooltip` on a [`Checklist`][vizro.models.Checklist] selector\n ```python\n import vizro.models as vm\n\n vm.Checklist(\n title=\"Select Species\",\n description=vm.Tooltip(text=\"Select something\", icon=\"start\"),\n )\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2544,7 +2544,7 @@
}
},
"additionalProperties": false,
- "description": "Dashboard that is supplied to [`Vizro.build`][vizro.Vizro.build].\n\nAbstract: Usage documentation\n [How to create a dashboard](../user-guides/dashboard.md)\n\nArgs:\n pages (list[Page]): See [`Page`][vizro.models.Page].\n theme (Literal[\"vizro_dark\", \"vizro_light\"]): Layout theme to be applied across dashboard.\n Defaults to `vizro_dark`.\n navigation (Navigation): See [`Navigation`][vizro.models.Navigation]. Defaults to `None`.\n title (str): Dashboard title to appear on every page on top left-side. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`.",
+ "description": "Dashboard that is supplied to [`Vizro.build`][vizro.Vizro.build].\n\nAbstract: Usage documentation\n [How to create a dashboard](../user-guides/dashboard.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2560,7 +2560,7 @@
},
"theme": {
"default": "vizro_dark",
- "description": "Theme to be applied across dashboard. Defaults to `vizro_dark`.",
+ "description": "Theme to be applied across dashboard.",
"enum": ["vizro_dark", "vizro_light"],
"title": "Theme",
"type": "string"
@@ -2592,7 +2592,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags."
}
},
"required": ["pages"],
diff --git a/vizro-core/schemas/0.1.52.dev0.json b/vizro-core/schemas/0.1.52.dev0.json
index af3a0b19e..860e2eb31 100644
--- a/vizro-core/schemas/0.1.52.dev0.json
+++ b/vizro-core/schemas/0.1.52.dev0.json
@@ -2,7 +2,7 @@
"$defs": {
"Accordion": {
"additionalProperties": false,
- "description": "Accordion to be used as `nav_selector` in [`Navigation`][vizro.models.Navigation].\n\nAbstract: Usage documentation\n [How to use an accordion](../user-guides/navigation.md/#group-pages)\n\nArgs:\n pages (dict[str, list[ModelID]]): Mapping from name of a pages group to a list of page IDs/titles.\n Defaults to `{}`.",
+ "description": "Accordion to be used as `nav_selector` in [`Navigation`][vizro.models.Navigation].\n\nAbstract: Usage documentation\n [How to use an accordion](../user-guides/navigation.md/#group-pages)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -33,7 +33,7 @@
},
"Action": {
"additionalProperties": false,
- "description": "Custom action to be inserted into `actions` of source component.\n\nAbstract: Usage documentation\n [How to create custom actions](../user-guides/custom-actions.md)\n\nArgs:\n function (CapturedCallable): Custom action function.\n inputs (list[str]): List of inputs provided to the action function. Each input can be specified as\n `` or `.` or `.`. Defaults to `[]`.\n \u2757Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](\n deprecations.md#action-model-inputs-argument).\n outputs (OutputsType): See [`OutputsType`][vizro.models.types.OutputsType].",
+ "description": "Custom action to be inserted into `actions` of source component.\n\nAbstract: Usage documentation\n [How to create custom actions](../user-guides/custom-actions.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -66,7 +66,7 @@
},
"inputs": {
"default": [],
- "description": "List of inputs provided to the action function. Each input can be specified as\n `` or `.` or `.`. Defaults to `[]`.\n \u2757Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](\n deprecations.md#action-model-inputs-argument).",
+ "description": "List of inputs provided to the action function. Each input can be specified as\n `` or `.` or `.`.\n \u2757Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](\n deprecations.md#action-model-inputs-argument).",
"items": {
"type": "string"
},
@@ -79,7 +79,7 @@
},
"AgGrid": {
"additionalProperties": false,
- "description": "Wrapper for `dash_ag_grid.AgGrid` to visualize grids in dashboard.\n\nAbstract: Usage documentation\n [How to use an AgGrid](../user-guides/table.md/#ag-grid)\n\nArgs:\n figure (CapturedCallable): Function that returns a Dash AgGrid. See [`vizro.tables`][vizro.tables].\n title (str): Title of the `AgGrid`. Defaults to `\"\"`.\n header (str): Markdown text positioned below the `AgGrid.title`. Follows the CommonMark specification.\n Ideal for adding supplementary information such as subtitles, descriptions, or additional context.\n Defaults to `\"\"`.\n footer (str): Markdown text positioned below the `AgGrid`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Wrapper for `dash_ag_grid.AgGrid` to visualize grids in dashboard.\n\nAbstract: Usage documentation\n [How to use an AgGrid](../user-guides/table.md/#ag-grid)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -120,7 +120,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -156,7 +156,7 @@
},
"Button": {
"additionalProperties": false,
- "description": "Button that can trigger actions or navigate.\n\nAbstract: Usage documentation\n [How to use buttons](../user-guides/button.md)\n\nArgs:\n icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons). Defaults to `\"\"`.\n text (str): Text to be displayed on button. Defaults to `\"Click me!\"`.\n href (str): URL (relative or absolute) to navigate to. Defaults to `\"\"`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n variant (Literal[\"plain\", \"filled\", \"outlined\"]): Predefined styles to choose from. Options are `plain`,\n `filled` or `outlined`. Defaults to `filled`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the button text.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Button` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/button/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Button that can trigger actions or navigate.\n\nAbstract: Usage documentation\n [How to use buttons](../user-guides/button.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -217,7 +217,7 @@
},
"variant": {
"default": "filled",
- "description": "Predefined styles to choose from. Options are `plain`, `filled` or `outlined`.Defaults to `filled`.",
+ "description": "Predefined styles to choose from. Options are `plain`, `filled` or `outlined`.",
"enum": ["plain", "filled", "outlined"],
"title": "Variant",
"type": "string"
@@ -232,7 +232,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the button text.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the button text.\n Hovering over the icon shows a tooltip with the provided description."
}
},
"title": "Button",
@@ -240,7 +240,7 @@
},
"Card": {
"additionalProperties": false,
- "description": "Card based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to use cards](../user-guides/card.md)\n\nArgs:\n text (str): Markdown string to create card title/text that should adhere to the CommonMark Spec.\n header (str): Markdown text positioned above the card text. Follows the CommonMark specification.\n Ideal for adding supplementary information. Defaults to `\"\"`.\n footer (str): Markdown text positioned at the bottom of the `Card`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n href (str): URL (relative or absolute) to navigate to. If not provided the Card serves as a text card\n only. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon in the top-right corner of the Card.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Card` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/card/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Card based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to use cards](../user-guides/card.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -286,7 +286,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon in the top-right corner of the Card.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon in the top-right corner of the Card.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -323,7 +323,7 @@
},
"Checklist": {
"additionalProperties": false,
- "description": "Categorical multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)\n\nArgs:\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (MultiValueType | None): See [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to\n `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n show_select_all (bool): Whether to display the 'Select All' option that allows users to select or\n deselect all available options with a single click. Defaults to `True`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Checklist` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Categorical multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -429,7 +429,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -465,7 +465,7 @@
},
"Container": {
"additionalProperties": false,
- "description": "Container to group together a set of components on a page.\n\nAbstract: Usage documentation\n [How to use containers](../user-guides/container.md)\n\nArgs:\n components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component\n has to be provided.\n title (str): Title of the `Container`. Defaults to `\"\"`.\n layout (LayoutType | None): Layout to place components in. Defaults to `None`.\n collapsed (bool | None): Boolean flag that determines whether the container is collapsed on initial load.\n Set to `True` for a collapsed state, `False` for an expanded state. Defaults to `None`, meaning the\n container is not collapsible.\n variant (Literal[\"plain\", \"filled\", \"outlined\"] | None): Predefined styles to choose from. Options are\n `plain`, `filled` or `outlined`. Defaults to `plain` (or `outlined` for collapsible container).\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n controls (list[ControlType]): See [ControlType][vizro.models.types.ControlType]. Defaults to `[]`.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Container` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/layout/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Container to group together a set of components on a page.\n\nAbstract: Usage documentation\n [How to use containers](../user-guides/container.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -582,7 +582,7 @@
}
],
"default": null,
- "description": "Predefined styles to choose from. Options are `plain`, `filled` or `outlined`.Defaults to `plain` (or `outlined` for collapsible container).",
+ "description": "Predefined styles to choose from. Options are `plain`, `filled` or `outlined`.Defaults to `plain` (or `outlined` for collapsible container). ",
"title": "Variant"
},
"description": {
@@ -595,7 +595,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"controls": {
"default": [],
@@ -627,7 +627,7 @@
},
"DatePicker": {
"additionalProperties": false,
- "description": "Temporal single/range option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use temporal selectors](../user-guides/selectors.md#temporal-selectors)\n\nArgs:\n min (date | None): Start date for date picker. Defaults to `None`.\n max (date | None): End date for date picker. Defaults to `None`.\n value (list[date] | date | None): Default date/dates for date picker. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n range (bool): Boolean flag for displaying range picker. Defaults to `True`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dmc.DatePickerInput` and overwrite\n any defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dmc documentation](https://www.dash-mantine-components.com/components/datepicker)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Temporal single/range option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use temporal selectors](../user-guides/selectors.md#temporal-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -711,7 +711,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -747,7 +747,7 @@
},
"Dropdown": {
"additionalProperties": false,
- "description": "Categorical single/multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)\n\nArgs:\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (SingleValueType | MultiValueType | None): See\n [`SingleValueType`][vizro.models.types.SingleValueType] and\n [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to `None`.\n multi (bool): Whether to allow selection of multiple values. Defaults to `True`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Dropdown` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/dropdown)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Categorical single/multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -866,7 +866,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -902,7 +902,7 @@
},
"Figure": {
"additionalProperties": false,
- "description": "Object that is reactive to controls, for example a KPI card.\n\nAbstract: Usage documentation\n [How to use figures](../user-guides/figure.md)\n\nArgs:\n figure (CapturedCallable): Function that returns a figure-like object. See [`vizro.figures`][vizro.figures].\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Object that is reactive to controls, for example a KPI card.\n\nAbstract: Usage documentation\n [How to use figures](../user-guides/figure.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -949,7 +949,7 @@
},
"Filter": {
"additionalProperties": false,
- "description": "Filter the data supplied to `targets`.\n\nAbstract: Usage documentation\n [How to use filters](../user-guides/filters.md)\n\nArgs:\n column (str): Column of `DataFrame` to filter.\n targets (list[ModelID]): Target component to be affected by filter. If none are given then target all components\n on the page that use `column`. Defaults to `[]`.\n selector (SelectorType | None): See [SelectorType][vizro.models.types.SelectorType]. Defaults to `None`.\n show_in_url (bool): Whether the filter should be included in the URL query string. Defaults to `False`.\n Useful for bookmarking or sharing dashboards with specific filter values pre-set.\n visible (bool): Whether the filter should be visible. Defaults to `True`.\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Filter(column=\"species\")\n ```",
+ "description": "Filter the data supplied to `targets`.\n\nAbstract: Usage documentation\n [How to use filters](../user-guides/filters.md)\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Filter(column=\"species\")\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1025,13 +1025,13 @@
},
"show_in_url": {
"default": false,
- "description": "Whether the filter should be included in the URL query string. Defaults to `False`. Useful for bookmarking or sharing dashboards with specific filter values pre-set.",
+ "description": "Whether the filter should be included in the URL query string. Useful for bookmarking or sharing dashboards with specific filter values pre-set.",
"title": "Show In Url",
"type": "boolean"
},
"visible": {
"default": true,
- "description": "Whether the filter should be visible. Defaults to `True`.",
+ "description": "Whether the filter should be visible.",
"title": "Visible",
"type": "boolean"
}
@@ -1042,7 +1042,7 @@
},
"Flex": {
"additionalProperties": false,
- "description": "Flex layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Flex layout](../user-guides/layouts.md#flex-layout)\n\nArgs:\n direction (Literal[\"row\", \"column\"]): Sets the direction of the flex items inside the container. Options are\n `row` or `column`. Defaults to `column`.\n gap (str): Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'.\n Defaults to `24px`.\n wrap (bool): Determines whether flex items are forced onto a single line or can wrap onto multiple lines.\n If `False`, all items will be on one line. If `True`, items will wrap onto multiple lines.\n Defaults to `False`.",
+ "description": "Flex layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Flex layout](../user-guides/layouts.md#flex-layout)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1057,21 +1057,21 @@
},
"direction": {
"default": "column",
- "description": "Sets the direction of the flex items inside the container. Options are `row` or `column`.Defaults to `column`.",
+ "description": "Sets the direction of the flex items inside the container. Options are `row` or `column`.",
"enum": ["row", "column"],
"title": "Direction",
"type": "string"
},
"gap": {
"default": "24px",
- "description": "Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Gap",
"type": "string"
},
"wrap": {
"default": false,
- "description": "Determines whether flex items are forced onto a single line or can wrap onto multiple lines. If `False`, all items will be on one line. If `True`, items will wrap onto multiple lines. Defaults to `False`.",
+ "description": "Determines whether flex items are forced onto a single line or can wrap onto multiple lines. If `False`, all items will be on one line. If `True`, items will wrap onto multiple lines.",
"title": "Wrap",
"type": "boolean"
}
@@ -1081,7 +1081,7 @@
},
"Graph": {
"additionalProperties": false,
- "description": "Wrapper for `dcc.Graph` to visualize charts.\n\nAbstract: Usage documentation\n [How to use graphs](../user-guides/graph.md)\n\nArgs:\n figure (CapturedCallable): Function that returns a graph. Either use\n [`vizro.plotly.express`](../user-guides/graph.md) or see\n [`CapturedCallable`][vizro.models.types.CapturedCallable].\n title (str): Title of the `Graph`. Defaults to `\"\"`.\n header (str): Markdown text positioned below the `Graph.title`. Follows the CommonMark specification.\n Ideal for adding supplementary information such as subtitles, descriptions, or additional context.\n Defaults to `\"\"`.\n footer (str): Markdown text positioned below the `Graph`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Graph` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/graph#graph-properties)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Wrapper for `dcc.Graph` to visualize charts.\n\nAbstract: Usage documentation\n [How to use graphs](../user-guides/graph.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1122,7 +1122,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -1158,7 +1158,7 @@
},
"Grid": {
"additionalProperties": false,
- "description": "Grid layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Grid layout](../user-guides/layouts.md#grid-layout)\n\nArgs:\n grid (list[list[int]]): Grid specification to arrange components on screen.\n row_gap (str): Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.\n col_gap (str): Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.\n row_min_height (str): Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.\n col_min_width (str): Minimum column width in px. Allowed unit are: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Grid layout for components on a [`Page`][vizro.models.Page] or in a [`Container`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use the Grid layout](../user-guides/layouts.md#grid-layout)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1184,28 +1184,28 @@
},
"row_gap": {
"default": "24px",
- "description": "Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between rows. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Gap",
"type": "string"
},
"col_gap": {
"default": "24px",
- "description": "Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between columns. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Gap",
"type": "string"
},
"row_min_height": {
"default": "0px",
- "description": "Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum row height in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Min Height",
"type": "string"
},
"col_min_width": {
"default": "0px",
- "description": "Minimum column width in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum column width in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Min Width",
"type": "string"
@@ -1244,28 +1244,28 @@
},
"row_gap": {
"default": "24px",
- "description": "Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between rows. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Gap",
"type": "string"
},
"col_gap": {
"default": "24px",
- "description": "Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ "description": "Specifies the gap between columns. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Gap",
"type": "string"
},
"row_min_height": {
"default": "0px",
- "description": "Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum row height in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Row Min Height",
"type": "string"
},
"col_min_width": {
"default": "0px",
- "description": "Minimum column width in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ "description": "Minimum column width in px. Allowed units: `px`, `rem`, `em`, or `%`.",
"pattern": "^\\d+(px|rem|em|%)$",
"title": "Col Min Width",
"type": "string"
@@ -1277,7 +1277,7 @@
},
"NavBar": {
"additionalProperties": false,
- "description": "Navigation bar to be used as a `nav_selector` for `Navigation`.\n\nAbstract: Usage documentation\n [How to use the navigation bar](../user-guides/navigation.md#use-a-navigation-bar-with-icons)\n\nArgs:\n pages (dict[str, list[ModelID]]): Mapping from name of a pages group to a list of page IDs/titles.\n Defaults to `{}`.\n items (list[NavLink]): See [`NavLink`][vizro.models.NavLink]. Defaults to `[]`.",
+ "description": "Navigation bar to be used as a `nav_selector` for `Navigation`.\n\nAbstract: Usage documentation\n [How to use the navigation bar](../user-guides/navigation.md#use-a-navigation-bar-with-icons)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1316,7 +1316,7 @@
},
"NavLink": {
"additionalProperties": false,
- "description": "Icon that serves as a navigation link to be used in a [`NavBar`][vizro.models.NavBar].\n\nAbstract: Usage documentation\n [How to customize the NavBar icons](../user-guides/navigation.md#change-icons)\n\nArgs:\n pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.\n label (str): Text description of the icon for use in tooltip.\n icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons). Defaults to `\"\"`.",
+ "description": "Icon that serves as a navigation link to be used in a [`NavBar`][vizro.models.NavBar].\n\nAbstract: Usage documentation\n [How to customize the NavBar icons](../user-guides/navigation.md#change-icons)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1362,7 +1362,7 @@
},
"Navigation": {
"additionalProperties": false,
- "description": "Navigation to arrange hierarchy of [`Pages`][vizro.models.Page].\n\nAbstract: Usage documentation\n [How to customize the navigation](../user-guides/navigation.md)\n\nArgs:\n pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.\n nav_selector (NavSelectorType | None): See [`NavSelectorType`][vizro.models.types.NavSelectorType].\n Defaults to `None`.",
+ "description": "Navigation to arrange hierarchy of [`Pages`][vizro.models.Page].\n\nAbstract: Usage documentation\n [How to customize the navigation](../user-guides/navigation.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1423,7 +1423,7 @@
},
"Page": {
"additionalProperties": false,
- "description": "A page in [`Dashboard`][vizro.models.Dashboard] with its own URL path and place in the `Navigation`.\n\nAbstract: Usage documentation\n [How to make dashboard pages](../user-guides/pages.md)\n\nArgs:\n components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component\n has to be provided.\n title (str): Title of the `Page`.\n layout (LayoutType | None): Layout to place components in. Defaults to `None`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`.\n controls (list[ControlType]): See [ControlType][vizro.models.types.ControlType]. Defaults to `[]`.\n path (str): Path to navigate to page. Defaults to `\"\"`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "A page in [`Dashboard`][vizro.models.Dashboard] with its own URL path and place in the `Navigation`.\n\nAbstract: Usage documentation\n [How to make dashboard pages](../user-guides/pages.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1519,7 +1519,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags."
},
"controls": {
"default": [],
@@ -1585,7 +1585,7 @@
},
"Parameter": {
"additionalProperties": false,
- "description": "Alter the arguments supplied to any `targets`.\n\nAbstract: Usage documentation\n [How to use parameters](../user-guides/parameters.md)\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Parameter(targets=[\"scatter.x\"], selector=vm.Slider(min=0, max=1, default=0.8, title=\"Bubble opacity\"))\n ```\n\nArgs:\n targets (list[str]): Targets in the form of `.`.\n selector (SelectorType): See [SelectorType][vizro.models.types.SelectorType]. Converts selector value\n `\"NONE\"` into `None` to allow optional parameters.\n show_in_url (bool): Whether the parameter should be included in the URL query string. Defaults to `False`.\n Useful for bookmarking or sharing dashboards with specific parameter values pre-set.\n visible (bool): Whether the parameter should be visible. Defaults to `True`.",
+ "description": "Alter the arguments supplied to any `targets`.\n\nAbstract: Usage documentation\n [How to use parameters](../user-guides/parameters.md)\n\nExample:\n ```python\n import vizro.models as vm\n\n vm.Parameter(targets=[\"scatter.x\"], selector=vm.Slider(min=0, max=1, default=0.8, title=\"Bubble opacity\"))\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1647,13 +1647,13 @@
},
"show_in_url": {
"default": false,
- "description": "Whether the parameter should be included in the URL query string. Defaults to `False`. Useful for bookmarking or sharing dashboards with specific parameter values pre-set.",
+ "description": "Whether the parameter should be included in the URL query string. Useful for bookmarking or sharing dashboards with specific parameter values pre-set.",
"title": "Show In Url",
"type": "boolean"
},
"visible": {
"default": true,
- "description": "Whether the parameter should be visible. Defaults to `True`.",
+ "description": "Whether the parameter should be visible.",
"title": "Visible",
"type": "boolean"
}
@@ -1664,7 +1664,7 @@
},
"RadioItems": {
"additionalProperties": false,
- "description": "Categorical single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md/#categorical-selectors)\n\nArgs:\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (SingleValueType | None): See [`SingleValueType`][vizro.models.types.SingleValueType].\n Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.RadioItems` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Categorical single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use categorical selectors](../user-guides/selectors.md/#categorical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1752,7 +1752,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -1788,7 +1788,7 @@
},
"RangeSlider": {
"additionalProperties": false,
- "description": "Numeric multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)\n\nArgs:\n min (float | None): Start value for slider. Defaults to `None`.\n max (float | None): End value for slider. Defaults to `None`.\n step (float | None): Step-size for marks on slider. Defaults to `None`.\n marks (dict[float, str]): Marks to be displayed on slider. Defaults to `{}`.\n value (list[float] | None): Default start and end value for slider. Must be 2 items. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.RangeSlider` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/rangeslider)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Numeric multi-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -1889,7 +1889,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -1925,7 +1925,7 @@
},
"Slider": {
"additionalProperties": false,
- "description": "Numeric single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)\n\nArgs:\n min (float | None): Start value for slider. Defaults to `None`.\n max (float | None): End value for slider. Defaults to `None`.\n step (float | None): Step-size for marks on slider. Defaults to `None`.\n marks (dict[float, str]): Marks to be displayed on slider. Defaults to `{}`.\n value (float | None): Default value for slider. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Slider` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/slider)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Numeric single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2022,7 +2022,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -2058,7 +2058,7 @@
},
"Switch": {
"additionalProperties": false,
- "description": "Boolean single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use boolean selectors](../user-guides/selectors.md/#boolean-selectors)\n\nArgs:\n value (bool): Initial state of the switch. When `True`, the switch is \"on\".\n When `False`, the switch is \"off\". Defaults to `False`.\n title (str): Title/Label to be displayed to the right of the switch. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Switch` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Boolean single-option selector.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\n\nAbstract: Usage documentation\n [How to use boolean selectors](../user-guides/selectors.md/#boolean-selectors)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2073,7 +2073,7 @@
},
"value": {
"default": false,
- "description": "Initial state of the switch. When `True`, the switch is enabled/on.\n When `False`, the switch is disabled/off. Defaults to `False`.",
+ "description": "Initial state of the switch. When `True`, the switch is enabled/on.\n When `False`, the switch is disabled/off.",
"title": "Value",
"type": "boolean"
},
@@ -2093,7 +2093,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -2129,7 +2129,7 @@
},
"Table": {
"additionalProperties": false,
- "description": "Wrapper for `dash_table.DataTable` to visualize tables in dashboard.\n\nAbstract: Usage documentation\n [How to use tables](../user-guides/table.md)\n\nArgs:\n figure (CapturedCallable): Function that returns a Dash DataTable. See [`vizro.tables`][vizro.tables].\n title (str): Title of the `Table`. Defaults to `\"\"`.\n header (str): Markdown text positioned below the `Table.title`. Follows the CommonMark specification.\n Ideal for adding supplementary information such as subtitles, descriptions, or additional context.\n Defaults to `\"\"`.\n footer (str): Markdown text positioned below the `Table`. Follows the CommonMark specification.\n Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.\n actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].",
+ "description": "Wrapper for `dash_table.DataTable` to visualize tables in dashboard.\n\nAbstract: Usage documentation\n [How to use tables](../user-guides/table.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2170,7 +2170,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
},
"actions": {
"default": [],
@@ -2206,7 +2206,7 @@
},
"Tabs": {
"additionalProperties": false,
- "description": "Tabs to group together a set of [`Containers`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use tabs](../user-guides/tabs.md)\n\nArgs:\n tabs (list[Container]): See [`Container`][vizro.models.Container].\n title (str): Title displayed above Tabs. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.",
+ "description": "Tabs to group together a set of [`Containers`][vizro.models.Container].\n\nAbstract: Usage documentation\n [How to use tabs](../user-guides/tabs.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2243,7 +2243,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description."
}
},
"required": ["tabs"],
@@ -2252,7 +2252,7 @@
},
"Text": {
"additionalProperties": false,
- "description": "Text based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to add text to your page](../user-guides/text.md)\n\nArgs:\n text (str): Markdown string to create text that should adhere to the CommonMark Spec.\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Markdown` and overwrite any\n defaults chosen by the Vizro team. This may have unexpected behavior.\n Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/markdown/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.",
+ "description": "Text based on Markdown syntax.\n\nAbstract: Usage documentation\n [How to add text to your page](../user-guides/text.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2277,7 +2277,7 @@
},
"Tooltip": {
"additionalProperties": false,
- "description": "A tooltip that displays text when hovering over an icon.\n\nAbstract: Usage documentation\n Read more about usage in the guides on [dashboards](../user-guides/dashboard.md#add-a-dashboard-tooltip),\n [pages](../user-guides/pages.md#add-a-tooltip),\n [containers](../user-guides/container.md#add-a-tooltip),\n [graphs](../user-guides/graph.md#add-a-tooltip),\n [tables](../user-guides/table.md#add-a-tooltip), [tabs](../user-guides/tabs.md#add-a-tooltip),\n [selectors](../user-guides/selectors.md#add-a-tooltip) and\n [buttons](../user-guides/button.md#add-a-tooltip).\n\nArgs:\n text (str): Markdown string for text shown when hovering over the icon. Should adhere to the CommonMark Spec.\n icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons).\n extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Tooltip` and overwrite any\n chosen by the Vizro team. This may have unexpected behavior. Visit the\n [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/tooltip/)\n to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the\n underlying component may change in the future. Defaults to `{}`.\n\nExample: `Tooltip` on a [`Checklist`][vizro.models.Checklist] selector\n ```python\n import vizro.models as vm\n\n vm.Checklist(\n title=\"Select Species\",\n description=vm.Tooltip(text=\"Select something\", icon=\"start\"),\n )\n ```",
+ "description": "A tooltip that displays text when hovering over an icon.\n\nAbstract: Usage documentation\n Read more about usage in the guides on [dashboards](../user-guides/dashboard.md#add-a-dashboard-tooltip),\n [pages](../user-guides/pages.md#add-a-tooltip),\n [containers](../user-guides/container.md#add-a-tooltip),\n [graphs](../user-guides/graph.md#add-a-tooltip),\n [tables](../user-guides/table.md#add-a-tooltip), [tabs](../user-guides/tabs.md#add-a-tooltip),\n [selectors](../user-guides/selectors.md#add-a-tooltip) and\n [buttons](../user-guides/button.md#add-a-tooltip).\n\nExample: `Tooltip` on a [`Checklist`][vizro.models.Checklist] selector\n ```python\n import vizro.models as vm\n\n vm.Checklist(\n title=\"Select Species\",\n description=vm.Tooltip(text=\"Select something\", icon=\"start\"),\n )\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2332,7 +2332,7 @@
},
"export_data": {
"additionalProperties": false,
- "description": "Exports data of target charts, tables and figures.\n\nAbstract: Usage documentation\n [How to export data](../user-guides/data-actions.md#export-data)\n\nArgs:\n targets (list[ModelID]): List of target component ids for which to download data. If none are given then\n download data from all components on the page.\n file_format (Literal[\"csv\", \"xlsx\"]): Format of downloaded files. Defaults to `\"csv\"`.\n\nExample:\n ```python\n import vizro.actions as va\n\n vm.Button(\n text=\"Export data\",\n actions=va.export_data(targets=[\"graph_id\", \"table_id\"], file_format=\"xlsx\"),\n )\n ```",
+ "description": "Exports data of target charts, tables and figures.\n\nAbstract: Usage documentation\n [How to export data](../user-guides/data-actions.md#export-data)\n\nExample:\n ```python\n import vizro.actions as va\n\n vm.Button(\n text=\"Export data\",\n actions=va.export_data(targets=[\"graph_id\", \"table_id\"], file_format=\"xlsx\"),\n )\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2356,7 +2356,7 @@
},
"file_format": {
"default": "csv",
- "description": "Format of downloaded files. Defaults to `'csv'`.",
+ "description": "Format of downloaded files.",
"enum": ["csv", "xlsx"],
"title": "File Format",
"type": "string"
@@ -2368,7 +2368,7 @@
"filter_interaction": {
"additionalProperties": false,
"deprecated": true,
- "description": "Filters targeted graph, tables and figures when a source graph or table is clicked.\n\nArgs:\n targets (list[ModelID]): Target component to be affected by filter. If none are given then target all\n valid components on the page.",
+ "description": "Filters targeted graph, tables and figures when a source graph or table is clicked.",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2396,7 +2396,7 @@
},
"set_control": {
"additionalProperties": false,
- "description": "Sets the value of a control, which then updates its targets.\n\nAbstract: Usage documentation\n [Graph and table interactions](../user-guides/graph-table-actions.md)\n\nThe following Vizro models can be a source of `set_control`:\n\n* [`AgGrid`][vizro.models.AgGrid]: triggers `set_control` when user clicks on a row in the table. `value` is string\nspecifying which column in the clicked row is used to set `control`.\n* [`Graph`][vizro.models.Graph]: triggers `set_control` when user clicks on data in the graph. `value` is string\nthat can be used in two ways to specify how to set `control`:\n\n * Column from which to take the value. This requires you to set `custom_data` in the graph's `figure` function.\n * String to [traverse a Box](https://github.com/cdgriffith/Box/wiki/Types-of-Boxes#box-dots) that contains the\n trigger data [`clickData[\"points\"][0]`](https://dash.plotly.com/interactive-graphing). This is typically\n useful for a positional variable, for example `\"x\"`, and does not require setting `custom_data`.\n\n* [`Figure`][vizro.models.Figure]: triggers `set_control` when user clicks on the figure. `value` specifies a\nliteral value to set `control` to.\n* [`Button`][vizro.models.Button]: triggers `set_control` when user clicks on the button. `value` specifies a\nliteral value to set `control` to.\n* [`Card`][vizro.models.Card]: triggers `set_control` when user clicks on the card. `value` specifies a\nliteral value to set `control` to.\n\nArgs:\n control (ModelID): Control whose value is set. If this is on a different page from the trigger then it must have\n `show_in_url=True`. The control's selector must be categorical (e.g. Dropdown, RadioItems, Checklist).\n value (JsonValue): Value taken from trigger to set `control`. Format depends on the source model that triggers\n `set_control`.\n\nExample: `AgGrid` as trigger\n ```python\n import vizro.actions as va\n\n vm.AgGrid(\n figure=dash_ag_grid(iris),\n actions=va.set_control(control=\"target_control\", value=\"species\"),\n )\n ```\n\nExample: `Graph` as trigger with `custom_data`\n ```python\n import vizro.actions as va\n\n vm.Graph(\n figure=px.scatter(iris, x=\"sepal_width\", y=\"sepal_length\", custom_data=\"species\"),\n actions=va.set_control(control=\"target_control\", value=\"species\"),\n )\n ```\n\nExample: `Graph` as trigger without `custom_data`\n ```python\n import vizro.actions as va\n\n vm.Graph(\n figure=px.box(iris, x=\"species\", y=\"sepal_length\"),\n actions=va.set_control(control=\"target_control\", value=\"x\"),\n )\n ```\n\nExample: `Figure` as trigger\n ```python\n import vizro.actions as va\n from vizro.figures import kpi_card\n\n vm.Figure(\n figure=kpi_card(tips, value_column=\"tip\", title=\"Click KPI to set control to A\"),\n actions=va.set_control(control=\"target_control\", value=\"A\"),\n )\n ```\n\nExample: `Button` as trigger\n ```python\n import vizro.actions as va\n\n vm.Button(\n text=\"Click to set control to A\",\n actions=va.set_control(control=\"target_control\", value=\"A\"),\n )\n ```\n\nExample: `Card` as trigger\n ```python\n import vizro.actions as va\n\n vm.Card(\n title=\"Click Card to set control to A\",\n actions=va.set_control(control=\"target_control\", value=\"A\"),\n )\n ```",
+ "description": "Sets the value of a control, which then updates its targets.\n\nAbstract: Usage documentation\n [Graph and table interactions](../user-guides/graph-table-actions.md)\n\nThe following Vizro models can be a source of `set_control`:\n\n* [`AgGrid`][vizro.models.AgGrid]: triggers `set_control` when user clicks on a row in the table. `value` is string\nspecifying which column in the clicked row is used to set `control`.\n* [`Graph`][vizro.models.Graph]: triggers `set_control` when user clicks on data in the graph. `value` is string\nthat can be used in two ways to specify how to set `control`:\n\n * Column from which to take the value. This requires you to set `custom_data` in the graph's `figure` function.\n * String to [traverse a Box](https://github.com/cdgriffith/Box/wiki/Types-of-Boxes#box-dots) that contains the\n trigger data [`clickData[\"points\"][0]`](https://dash.plotly.com/interactive-graphing). This is typically\n useful for a positional variable, for example `\"x\"`, and does not require setting `custom_data`.\n\n* [`Figure`][vizro.models.Figure]: triggers `set_control` when user clicks on the figure. `value` specifies a\nliteral value to set `control` to.\n* [`Button`][vizro.models.Button]: triggers `set_control` when user clicks on the button. `value` specifies a\nliteral value to set `control` to.\n* [`Card`][vizro.models.Card]: triggers `set_control` when user clicks on the card. `value` specifies a\nliteral value to set `control` to.\n\nExample: `AgGrid` as trigger\n ```python\n import vizro.actions as va\n\n vm.AgGrid(\n figure=dash_ag_grid(iris),\n actions=va.set_control(control=\"target_control\", value=\"species\"),\n )\n ```\n\nExample: `Graph` as trigger with `custom_data`\n ```python\n import vizro.actions as va\n\n vm.Graph(\n figure=px.scatter(iris, x=\"sepal_width\", y=\"sepal_length\", custom_data=\"species\"),\n actions=va.set_control(control=\"target_control\", value=\"species\"),\n )\n ```\n\nExample: `Graph` as trigger without `custom_data`\n ```python\n import vizro.actions as va\n\n vm.Graph(\n figure=px.box(iris, x=\"species\", y=\"sepal_length\"),\n actions=va.set_control(control=\"target_control\", value=\"x\"),\n )\n ```\n\nExample: `Figure` as trigger\n ```python\n import vizro.actions as va\n from vizro.figures import kpi_card\n\n vm.Figure(\n figure=kpi_card(tips, value_column=\"tip\", title=\"Click KPI to set control to A\"),\n actions=va.set_control(control=\"target_control\", value=\"A\"),\n )\n ```\n\nExample: `Button` as trigger\n ```python\n import vizro.actions as va\n\n vm.Button(\n text=\"Click to set control to A\",\n actions=va.set_control(control=\"target_control\", value=\"A\"),\n )\n ```\n\nExample: `Card` as trigger\n ```python\n import vizro.actions as va\n\n vm.Card(\n title=\"Click Card to set control to A\",\n actions=va.set_control(control=\"target_control\", value=\"A\"),\n )\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2425,7 +2425,7 @@
},
"show_notification": {
"additionalProperties": false,
- "description": "Shows a notification message.\n\nAbstract: Usage documentation\n [Notifications](../user-guides/notification-actions.md)\n\nArgs:\n text (str): Markdown text for the main notification message. Follows the CommonMark specification.\n variant (Literal[\"info\", \"success\", \"warning\", \"error\", \"progress\"]): Variant that determines color and\n default icon. If `progress`, the notification will show a loading spinner instead of an icon.\n Defaults to \"info\".\n title (str): Notification title. Set to `\"\"` to hide the title. Defaults to the capitalized variant name,\n for example `\"Info\"` for `variant=\"info\"`.\n icon (str): Icon name from the [Google Material Icon Library](https://fonts.google.com/icons). Ignored if\n `variant=\"progress\"`. Defaults to the variant-specific icon, for example 'info' for 'info' variant.\n auto_close (bool | int): Auto-close duration in milliseconds. Set to `False` to keep the notification\n open until the user closes it manually. Default value depends on variant: `4000` for\n info/success/warning/error, `False` for progress.\n\nExample:\n ```python\n import vizro.actions as va\n import vizro.models as vm\n\n vm.Button(\n text=\"Save\",\n actions=va.show_notification(\n title=\"Useful information\",\n text=\"This is some useful information that you should know.\",\n ),\n )\n ```",
+ "description": "Shows a notification message.\n\nAbstract: Usage documentation\n [Notifications](../user-guides/notification-actions.md)\n\nExample:\n ```python\n import vizro.actions as va\n import vizro.models as vm\n\n vm.Button(\n text=\"Save\",\n actions=va.show_notification(\n title=\"Useful information\",\n text=\"This is some useful information that you should know.\",\n ),\n )\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2445,20 +2445,20 @@
},
"variant": {
"default": "info",
- "description": "Variant that determines color and default icon.\n If `progress`, the notification will show a loading spinner instead of an icon.",
+ "description": "Variant that determines color and default icon. If `progress`, the notification will show a loading spinner instead of an icon.",
"enum": ["info", "success", "warning", "error", "progress"],
"title": "Variant",
"type": "string"
},
"title": {
"default": "",
- "description": "Notification title. Set to `\"\"` to hide the title. Defaults to the capitalized\n variant name, for example `\"Info\"` for `variant=\"info\"`",
+ "description": "Notification title. Set to `\"\"` to hide the title. Defaults to the capitalized variant name, for example `\"Info\"` for `variant=\"info\"`.",
"title": "Title",
"type": "string"
},
"icon": {
"default": "",
- "description": "Icon name from the [Google Material Icon Library](https://fonts.google.com/icons).\n Ignored if `variant=\"progress\"`. Defaults to the variant-specific icon, for example\n 'info' for 'info' variant.",
+ "description": "Icon name from the [Google Material Icon Library](https://fonts.google.com/icons). Ignored if `variant='progress'`. Defaults to the variant-specific icon, for example 'info' for 'info' variant.",
"title": "Icon",
"type": "string"
},
@@ -2472,7 +2472,7 @@
}
],
"default": 4000,
- "description": "Auto-close duration in milliseconds. Set to `False` to keep the notification\n open until the user closes it manually. Default value depends on variant: `4000` for\n info/success/warning/error, `False` for progress.",
+ "description": "Auto-close duration in milliseconds. Set to `False` to keep the notification open until the user closes it manually. Default value depends on variant: `4000` for info/success/warning/error, `False` for progress.",
"title": "Auto Close"
}
},
@@ -2482,7 +2482,7 @@
},
"update_notification": {
"additionalProperties": false,
- "description": "Updates an existing notification message.\n\nThis action updates notifications that were previously created with\n[`show_notification`][vizro.actions.show_notification]. `notification` must match the `id` of the original\n`show_notification` action.\n\nAbstract: Usage documentation\n [Update notification](../user-guides/notification-actions.md#update-existing-notification)\n\nArgs:\n notification (ModelID): Notification to update. Must match the id of the original `show_notification` action.\n text (str): Markdown text for the main notification message. Follows the CommonMark specification.\n variant (Literal[\"info\", \"success\", \"warning\", \"error\", \"progress\"]): Variant that determines color and\n default icon. If `progress`, the notification will show a loading spinner instead of an icon.\n Defaults to \"info\".\n title (str): Notification title. Set to `\"\"` to hide the title. Defaults to the capitalized variant name,\n for example `\"Info\"` for `variant=\"info\"`.\n icon (str): Icon name from the [Google Material Icon Library](https://fonts.google.com/icons). Ignored if\n `variant=\"progress\"`. Defaults to the variant-specific icon, for example 'info' for 'info' variant.\n auto_close (bool | int): Auto-close duration in milliseconds. Set to `False` to keep the notification\n open until the user closes it manually. Default value depends on variant: `4000` for\n info/success/warning/error, `False` for progress.\n\nExample:\n ```python\n import vizro.actions as va\n import vizro.models as vm\n\n vm.Button(\n text=\"Save\",\n actions=[\n va.show_notification(id=\"save_notification\", text=\"Saving data...\", variant=\"progress\"),\n va.export_data(),\n va.update_notification(\n notification=\"save_notification\", text=\"Data saved successfully!\", variant=\"success\"\n ),\n ],\n )\n ```",
+ "description": "Updates an existing notification message.\n\nThis action updates notifications that were previously created with\n[`show_notification`][vizro.actions.show_notification]. `notification` must match the `id` of the original\n`show_notification` action.\n\nAbstract: Usage documentation\n [Update notification](../user-guides/notification-actions.md#update-existing-notification)\n\nExample:\n ```python\n import vizro.actions as va\n import vizro.models as vm\n\n vm.Button(\n text=\"Save\",\n actions=[\n va.show_notification(id=\"save_notification\", text=\"Saving data...\", variant=\"progress\"),\n va.export_data(),\n va.update_notification(\n notification=\"save_notification\", text=\"Data saved successfully!\", variant=\"success\"\n ),\n ],\n )\n ```",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2502,20 +2502,20 @@
},
"variant": {
"default": "info",
- "description": "Variant that determines color and default icon.\n If `progress`, the notification will show a loading spinner instead of an icon.",
+ "description": "Variant that determines color and default icon. If `progress`, the notification will show a loading spinner instead of an icon.",
"enum": ["info", "success", "warning", "error", "progress"],
"title": "Variant",
"type": "string"
},
"title": {
"default": "",
- "description": "Notification title. Set to `\"\"` to hide the title. Defaults to the capitalized\n variant name, for example `\"Info\"` for `variant=\"info\"`",
+ "description": "Notification title. Set to `\"\"` to hide the title. Defaults to the capitalized variant name, for example `\"Info\"` for `variant=\"info\"`.",
"title": "Title",
"type": "string"
},
"icon": {
"default": "",
- "description": "Icon name from the [Google Material Icon Library](https://fonts.google.com/icons).\n Ignored if `variant=\"progress\"`. Defaults to the variant-specific icon, for example\n 'info' for 'info' variant.",
+ "description": "Icon name from the [Google Material Icon Library](https://fonts.google.com/icons). Ignored if `variant='progress'`. Defaults to the variant-specific icon, for example 'info' for 'info' variant.",
"title": "Icon",
"type": "string"
},
@@ -2529,7 +2529,7 @@
}
],
"default": 4000,
- "description": "Auto-close duration in milliseconds. Set to `False` to keep the notification\n open until the user closes it manually. Default value depends on variant: `4000` for\n info/success/warning/error, `False` for progress.",
+ "description": "Auto-close duration in milliseconds. Set to `False` to keep the notification open until the user closes it manually. Default value depends on variant: `4000` for info/success/warning/error, `False` for progress.",
"title": "Auto Close"
},
"notification": {
@@ -2544,7 +2544,7 @@
}
},
"additionalProperties": false,
- "description": "Dashboard that is supplied to [`Vizro.build`][vizro.Vizro.build].\n\nAbstract: Usage documentation\n [How to create a dashboard](../user-guides/dashboard.md)\n\nArgs:\n pages (list[Page]): See [`Page`][vizro.models.Page].\n theme (Literal[\"vizro_dark\", \"vizro_light\"]): Layout theme to be applied across dashboard.\n Defaults to `vizro_dark`.\n navigation (Navigation): See [`Navigation`][vizro.models.Navigation]. Defaults to `None`.\n title (str): Dashboard title to appear on every page on top left-side. Defaults to `\"\"`.\n description (Tooltip | None): Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`.",
+ "description": "Dashboard that is supplied to [`Vizro.build`][vizro.Vizro.build].\n\nAbstract: Usage documentation\n [How to create a dashboard](../user-guides/dashboard.md)",
"properties": {
"id": {
"description": "ID to identify model. Must be unique throughout the whole dashboard. When no ID is chosen, ID will be automatically generated.",
@@ -2560,7 +2560,7 @@
},
"theme": {
"default": "vizro_dark",
- "description": "Theme to be applied across dashboard. Defaults to `vizro_dark`.",
+ "description": "Theme to be applied across dashboard.",
"enum": ["vizro_dark", "vizro_light"],
"title": "Theme",
"type": "string"
@@ -2592,7 +2592,7 @@
}
],
"default": null,
- "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags. Defaults to `None`."
+ "description": "Optional markdown string that adds an icon next to the title.\n Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta\n tags."
}
},
"required": ["pages"],
diff --git a/vizro-core/src/vizro/actions/_export_data.py b/vizro-core/src/vizro/actions/_export_data.py
index dce1ee30b..034365ce5 100644
--- a/vizro-core/src/vizro/actions/_export_data.py
+++ b/vizro-core/src/vizro/actions/_export_data.py
@@ -19,11 +19,6 @@ class export_data(_AbstractAction):
Abstract: Usage documentation
[How to export data](../user-guides/data-actions.md#export-data)
- Args:
- targets (list[ModelID]): List of target component ids for which to download data. If none are given then
- download data from all components on the page.
- file_format (Literal["csv", "xlsx"]): Format of downloaded files. Defaults to `"csv"`.
-
Example:
```python
import vizro.actions as va
@@ -41,9 +36,7 @@ class export_data(_AbstractAction):
description="List of target component ids for which to download data. If none are given then "
"download data from all components on the page.",
)
- file_format: Literal["csv", "xlsx"] = Field(
- default="csv", description="Format of downloaded files. Defaults to `'csv'`."
- )
+ file_format: Literal["csv", "xlsx"] = Field(default="csv", description="Format of downloaded files.")
@_log_call
def pre_build(self):
diff --git a/vizro-core/src/vizro/actions/_filter_interaction.py b/vizro-core/src/vizro/actions/_filter_interaction.py
index a49cbd49e..7e885d4d0 100644
--- a/vizro-core/src/vizro/actions/_filter_interaction.py
+++ b/vizro-core/src/vizro/actions/_filter_interaction.py
@@ -19,12 +19,7 @@
category=FutureWarning,
)
class filter_interaction(_AbstractAction):
- """Filters targeted graph, tables and figures when a source graph or table is clicked.
-
- Args:
- targets (list[ModelID]): Target component to be affected by filter. If none are given then target all
- valid components on the page.
- """
+ """Filters targeted graph, tables and figures when a source graph or table is clicked."""
type: Literal["filter_interaction"] = "filter_interaction"
diff --git a/vizro-core/src/vizro/actions/_notifications.py b/vizro-core/src/vizro/actions/_notifications.py
index d64ee9ad0..d8290a404 100755
--- a/vizro-core/src/vizro/actions/_notifications.py
+++ b/vizro-core/src/vizro/actions/_notifications.py
@@ -33,19 +33,6 @@ class show_notification(_AbstractAction):
Abstract: Usage documentation
[Notifications](../user-guides/notification-actions.md)
- Args:
- text (str): Markdown text for the main notification message. Follows the CommonMark specification.
- variant (Literal["info", "success", "warning", "error", "progress"]): Variant that determines color and
- default icon. If `progress`, the notification will show a loading spinner instead of an icon.
- Defaults to "info".
- title (str): Notification title. Set to `""` to hide the title. Defaults to the capitalized variant name,
- for example `"Info"` for `variant="info"`.
- icon (str): Icon name from the [Google Material Icon Library](https://fonts.google.com/icons). Ignored if
- `variant="progress"`. Defaults to the variant-specific icon, for example 'info' for 'info' variant.
- auto_close (bool | int): Auto-close duration in milliseconds. Set to `False` to keep the notification
- open until the user closes it manually. Default value depends on variant: `4000` for
- info/success/warning/error, `False` for progress.
-
Example:
```python
import vizro.actions as va
@@ -67,8 +54,8 @@ class show_notification(_AbstractAction):
)
variant: Literal["info", "success", "warning", "error", "progress"] = Field(
default="info",
- description="""Variant that determines color and default icon.
- If `progress`, the notification will show a loading spinner instead of an icon.""",
+ description="Variant that determines color and default icon. "
+ "If `progress`, the notification will show a loading spinner instead of an icon.",
)
# TODO: title, icon and auto_close could use default_factory once we bump to pydantic>=2.10.0.
@@ -76,20 +63,20 @@ class show_notification(_AbstractAction):
# Placeholder defaults are used to satisfy type checking; actual defaults are set in the validator.
title: str = Field(
default="",
- description="""Notification title. Set to `""` to hide the title. Defaults to the capitalized
- variant name, for example `"Info"` for `variant="info"`""",
+ description='Notification title. Set to `""` to hide the title. '
+ 'Defaults to the capitalized variant name, for example `"Info"` for `variant="info"`.',
)
icon: Annotated[str, AfterValidator(validate_icon)] = Field(
default="",
- description="""Icon name from the [Google Material Icon Library](https://fonts.google.com/icons).
- Ignored if `variant="progress"`. Defaults to the variant-specific icon, for example
- 'info' for 'info' variant.""",
+ description="Icon name from the [Google Material Icon Library](https://fonts.google.com/icons). "
+ "Ignored if `variant='progress'`. Defaults to the variant-specific icon, for example 'info' for 'info' "
+ "variant.",
)
auto_close: bool | int = Field(
default=4000,
- description="""Auto-close duration in milliseconds. Set to `False` to keep the notification
- open until the user closes it manually. Default value depends on variant: `4000` for
- info/success/warning/error, `False` for progress.""",
+ description="Auto-close duration in milliseconds. Set to `False` to keep the notification "
+ "open until the user closes it manually. Default value depends on variant: `4000` for "
+ "info/success/warning/error, `False` for progress.",
)
# This should ideally be replaced with default_factory once we bump to pydantic>=2.10.0.
@@ -130,20 +117,6 @@ class update_notification(show_notification):
Abstract: Usage documentation
[Update notification](../user-guides/notification-actions.md#update-existing-notification)
- Args:
- notification (ModelID): Notification to update. Must match the id of the original `show_notification` action.
- text (str): Markdown text for the main notification message. Follows the CommonMark specification.
- variant (Literal["info", "success", "warning", "error", "progress"]): Variant that determines color and
- default icon. If `progress`, the notification will show a loading spinner instead of an icon.
- Defaults to "info".
- title (str): Notification title. Set to `""` to hide the title. Defaults to the capitalized variant name,
- for example `"Info"` for `variant="info"`.
- icon (str): Icon name from the [Google Material Icon Library](https://fonts.google.com/icons). Ignored if
- `variant="progress"`. Defaults to the variant-specific icon, for example 'info' for 'info' variant.
- auto_close (bool | int): Auto-close duration in milliseconds. Set to `False` to keep the notification
- open until the user closes it manually. Default value depends on variant: `4000` for
- info/success/warning/error, `False` for progress.
-
Example:
```python
import vizro.actions as va
diff --git a/vizro-core/src/vizro/actions/_set_control.py b/vizro-core/src/vizro/actions/_set_control.py
index f109d94f5..85e053481 100644
--- a/vizro-core/src/vizro/actions/_set_control.py
+++ b/vizro-core/src/vizro/actions/_set_control.py
@@ -53,12 +53,6 @@ class set_control(_AbstractAction):
* [`Card`][vizro.models.Card]: triggers `set_control` when user clicks on the card. `value` specifies a
literal value to set `control` to.
- Args:
- control (ModelID): Control whose value is set. If this is on a different page from the trigger then it must have
- `show_in_url=True`. The control's selector must be categorical (e.g. Dropdown, RadioItems, Checklist).
- value (JsonValue): Value taken from trigger to set `control`. Format depends on the source model that triggers
- `set_control`.
-
Example: `AgGrid` as trigger
```python
import vizro.actions as va
diff --git a/vizro-core/src/vizro/models/_action/_action.py b/vizro-core/src/vizro/models/_action/_action.py
index ad8a73b70..c430fd548 100644
--- a/vizro-core/src/vizro/models/_action/_action.py
+++ b/vizro-core/src/vizro/models/_action/_action.py
@@ -13,7 +13,7 @@
from dash import ClientsideFunction, Input, Output, State, callback, clientside_callback, dcc, no_update
from dash.development.base_component import Component
-from pydantic import BeforeValidator, Field, PrivateAttr, TypeAdapter, field_validator
+from pydantic import BeforeValidator, Field, PrivateAttr, TypeAdapter, ValidationInfo, field_validator
from pydantic.json_schema import SkipJsonSchema
from typing_extensions import TypedDict
@@ -436,13 +436,6 @@ class Action(_BaseAction):
Abstract: Usage documentation
[How to create custom actions](../user-guides/custom-actions.md)
- Args:
- function (CapturedCallable): Custom action function.
- inputs (list[str]): List of inputs provided to the action function. Each input can be specified as
- `` or `.` or `.`. Defaults to `[]`.
- ❗Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](
- deprecations.md#action-model-inputs-argument).
- outputs (OutputsType): See [`OutputsType`][vizro.models.types.OutputsType].
"""
# TODO-AV2 D 5: when it's made public, add something like below to docstring:
@@ -472,7 +465,7 @@ class Action(_BaseAction):
Field(
default=[],
description="""List of inputs provided to the action function. Each input can be specified as
- `` or `.` or `.`. Defaults to `[]`.
+ `` or `.` or `.`.
❗Deprecated: `inputs` is deprecated and [will not exist in Vizro 0.2.0](
deprecations.md#action-model-inputs-argument).""",
),
@@ -514,7 +507,10 @@ def _legacy(self) -> bool:
logger.debug("Action with id %s, function %s, has legacy=%s", self.id, self._action_name, legacy)
return legacy
- _validate_function = field_validator("function", mode="before")(_validate_captured_callable)
+ @field_validator("function", mode="before")
+ @classmethod
+ def _validate_function(cls, v: Any, info: ValidationInfo):
+ return _validate_captured_callable(cls, v, info)
@property
def _parameters(self) -> set[str]:
diff --git a/vizro-core/src/vizro/models/_base.py b/vizro-core/src/vizro/models/_base.py
index 714d52cef..5467edfb1 100644
--- a/vizro-core/src/vizro/models/_base.py
+++ b/vizro-core/src/vizro/models/_base.py
@@ -207,22 +207,22 @@ def _split_types(type_annotation: type[Any]) -> type[Any]:
)
+def _generate_model_id() -> str:
+ return str(uuid.UUID(int=rd.getrandbits(128)))
+
+
class VizroBaseModel(BaseModel):
"""All Vizro models inherit from this class.
Abstract: Usage documentation
[Custom components](../user-guides/custom-components.md)
- Args:
- id (ModelID): ID to identify model. Must be unique throughout the whole dashboard.
- When no ID is chosen, ID will be automatically generated.
-
"""
id: Annotated[
ModelID,
Field(
- default_factory=lambda: str(uuid.UUID(int=rd.getrandbits(128))),
+ default_factory=_generate_model_id,
description="ID to identify model. Must be unique throughout the whole dashboard. "
"When no ID is chosen, ID will be automatically generated.",
validate_default=True,
diff --git a/vizro-core/src/vizro/models/_components/_form.py b/vizro-core/src/vizro/models/_components/_form.py
index 1f6651998..29350149e 100644
--- a/vizro-core/src/vizro/models/_components/_form.py
+++ b/vizro-core/src/vizro/models/_components/_form.py
@@ -13,13 +13,7 @@
class Form(VizroBaseModel):
- """Container for all form components to be provided to [`Page`][vizro.models.Page].
-
- Args:
- components (list[FormComponentType]): List of components used in the form.
- layout (LayoutType | None): Defaults to `None`.
-
- """
+ """Container for all form components to be provided to [`Page`][vizro.models.Page]."""
type: Literal["form"] = "form"
# TODO[mypy], see: https://github.com/pydantic/pydantic/issues/156 for components field
diff --git a/vizro-core/src/vizro/models/_components/ag_grid.py b/vizro-core/src/vizro/models/_components/ag_grid.py
index 105605629..4c36c83b9 100644
--- a/vizro-core/src/vizro/models/_components/ag_grid.py
+++ b/vizro-core/src/vizro/models/_components/ag_grid.py
@@ -1,10 +1,18 @@
import logging
-from typing import Annotated, Literal
+from typing import Annotated, Any, Literal
import dash_ag_grid as dag
import pandas as pd
from dash import ClientsideFunction, Input, Output, State, clientside_callback, dcc, html
-from pydantic import AfterValidator, BeforeValidator, Field, PrivateAttr, field_validator, model_validator
+from pydantic import (
+ AfterValidator,
+ BeforeValidator,
+ Field,
+ PrivateAttr,
+ ValidationInfo,
+ field_validator,
+ model_validator,
+)
from pydantic.json_schema import SkipJsonSchema
from vizro.actions import filter_interaction
@@ -35,17 +43,6 @@ class AgGrid(VizroBaseModel):
Abstract: Usage documentation
[How to use an AgGrid](../user-guides/table.md/#ag-grid)
- Args:
- figure (CapturedCallable): Function that returns a Dash AgGrid. See [`vizro.tables`][vizro.tables].
- title (str): Title of the `AgGrid`. Defaults to `""`.
- header (str): Markdown text positioned below the `AgGrid.title`. Follows the CommonMark specification.
- Ideal for adding supplementary information such as subtitles, descriptions, or additional context.
- Defaults to `""`.
- footer (str): Markdown text positioned below the `AgGrid`. Follows the CommonMark specification.
- Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
"""
type: Literal["ag_grid"] = "ag_grid"
@@ -77,12 +74,16 @@ class AgGrid(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
_inner_component_id: str = PrivateAttr()
- _validate_figure = field_validator("figure", mode="before")(_validate_captured_callable)
+
+ @field_validator("figure", mode="before")
+ @classmethod
+ def _validate_figure(cls, v: Any, info: ValidationInfo):
+ return _validate_captured_callable(cls, v, info)
@model_validator(mode="after")
def _make_actions_chain(self):
diff --git a/vizro-core/src/vizro/models/_components/button.py b/vizro-core/src/vizro/models/_components/button.py
index 3e982879b..769c3357f 100644
--- a/vizro-core/src/vizro/models/_components/button.py
+++ b/vizro-core/src/vizro/models/_components/button.py
@@ -17,21 +17,6 @@ class Button(VizroBaseModel):
Abstract: Usage documentation
[How to use buttons](../user-guides/button.md)
- Args:
- icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons). Defaults to `""`.
- text (str): Text to be displayed on button. Defaults to `"Click me!"`.
- href (str): URL (relative or absolute) to navigate to. Defaults to `""`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- variant (Literal["plain", "filled", "outlined"]): Predefined styles to choose from. Options are `plain`,
- `filled` or `outlined`. Defaults to `filled`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the button text.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Button` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/button/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
-
"""
type: Literal["button"] = "button"
@@ -45,8 +30,7 @@ class Button(VizroBaseModel):
actions: ActionsType = []
variant: Literal["plain", "filled", "outlined"] = Field(
default="filled",
- description="Predefined styles to choose from. Options are `plain`, `filled` or `outlined`."
- "Defaults to `filled`.",
+ description="Predefined styles to choose from. Options are `plain`, `filled` or `outlined`.",
)
# TODO: ideally description would have json_schema_input_type=str | Tooltip attached to the BeforeValidator,
# but this requires pydantic >= 2.9.
@@ -58,7 +42,7 @@ class Button(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the button text.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
extra: SkipJsonSchema[
@@ -66,17 +50,19 @@ class Button(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dbc.Button` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/button/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dbc.Button` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/button/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
@model_validator(mode="after")
def validate_text_and_icon(self):
+ """Validate that either `text` or `icon` argument is provided."""
if not self.text and not self.icon:
raise ValueError("You must provide either the `text` or `icon` argument.")
@@ -84,6 +70,7 @@ def validate_text_and_icon(self):
@model_validator(mode="after")
def validate_href_and_actions(self):
+ """Validate that `href` and `actions` are not defined together."""
if self.href and self.actions:
raise ValueError("Button cannot have both `href` and `actions` defined.")
diff --git a/vizro-core/src/vizro/models/_components/card.py b/vizro-core/src/vizro/models/_components/card.py
index 1041c7952..b9b9a3a98 100644
--- a/vizro-core/src/vizro/models/_components/card.py
+++ b/vizro-core/src/vizro/models/_components/card.py
@@ -17,23 +17,6 @@ class Card(VizroBaseModel):
Abstract: Usage documentation
[How to use cards](../user-guides/card.md)
- Args:
- text (str): Markdown string to create card title/text that should adhere to the CommonMark Spec.
- header (str): Markdown text positioned above the card text. Follows the CommonMark specification.
- Ideal for adding supplementary information. Defaults to `""`.
- footer (str): Markdown text positioned at the bottom of the `Card`. Follows the CommonMark specification.
- Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `""`.
- href (str): URL (relative or absolute) to navigate to. If not provided the Card serves as a text card
- only. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon in the top-right corner of the Card.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Card` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/card/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
-
"""
type: Literal["card"] = "card"
@@ -62,7 +45,7 @@ class Card(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon in the top-right corner of the Card.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
extra: SkipJsonSchema[
@@ -70,18 +53,20 @@ class Card(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dbc.Card` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/card/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dbc.Card` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/card/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
actions: ActionsType = []
@model_validator(mode="after")
def validate_href_and_actions(self):
+ """Validate that `href` and `actions` are not defined together."""
if self.href and self.actions:
raise ValueError("Card cannot have both `href` and `actions` defined.")
diff --git a/vizro-core/src/vizro/models/_components/container.py b/vizro-core/src/vizro/models/_components/container.py
index 97ad48157..04657c8a2 100644
--- a/vizro-core/src/vizro/models/_components/container.py
+++ b/vizro-core/src/vizro/models/_components/container.py
@@ -36,26 +36,6 @@ class Container(VizroBaseModel):
Abstract: Usage documentation
[How to use containers](../user-guides/container.md)
- Args:
- components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component
- has to be provided.
- title (str): Title of the `Container`. Defaults to `""`.
- layout (LayoutType | None): Layout to place components in. Defaults to `None`.
- collapsed (bool | None): Boolean flag that determines whether the container is collapsed on initial load.
- Set to `True` for a collapsed state, `False` for an expanded state. Defaults to `None`, meaning the
- container is not collapsible.
- variant (Literal["plain", "filled", "outlined"] | None): Predefined styles to choose from. Options are
- `plain`, `filled` or `outlined`. Defaults to `plain` (or `outlined` for collapsible container).
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- controls (list[ControlType]): See [ControlType][vizro.models.types.ControlType]. Defaults to `[]`.
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Container` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/layout/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
-
-
"""
type: Literal["container"] = "container"
@@ -78,7 +58,7 @@ class Container(VizroBaseModel):
Field(
default=None,
description="Predefined styles to choose from. Options are `plain`, `filled` or `outlined`."
- "Defaults to `plain` (or `outlined` for collapsible container).",
+ "Defaults to `plain` (or `outlined` for collapsible container). ",
validate_default=True,
),
]
@@ -91,7 +71,7 @@ class Container(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
controls: list[ControlType] = []
@@ -100,14 +80,15 @@ class Container(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dbc.Container` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/layout/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dbc.Container` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/layout/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
@model_validator(mode="after")
def _validate_title_if_collapsed(self):
diff --git a/vizro-core/src/vizro/models/_components/figure.py b/vizro-core/src/vizro/models/_components/figure.py
index bc5f7a880..eeab30256 100644
--- a/vizro-core/src/vizro/models/_components/figure.py
+++ b/vizro-core/src/vizro/models/_components/figure.py
@@ -1,7 +1,7 @@
-from typing import Annotated, Literal
+from typing import Annotated, Any, Literal
from dash import dcc, html
-from pydantic import AfterValidator, Field, JsonValue, field_validator, model_validator
+from pydantic import AfterValidator, Field, JsonValue, ValidationInfo, field_validator, model_validator
from pydantic.json_schema import SkipJsonSchema
from vizro.managers import data_manager
@@ -17,10 +17,6 @@ class Figure(VizroBaseModel):
Abstract: Usage documentation
[How to use figures](../user-guides/figure.md)
- Args:
- figure (CapturedCallable): Function that returns a figure-like object. See [`vizro.figures`][vizro.figures].
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
-
"""
type: Literal["figure"] = "figure"
@@ -34,7 +30,10 @@ class Figure(VizroBaseModel):
]
actions: ActionsType = []
- _validate_figure = field_validator("figure", mode="before")(_validate_captured_callable)
+ @field_validator("figure", mode="before")
+ @classmethod
+ def _validate_figure(cls, v: Any, info: ValidationInfo):
+ return _validate_captured_callable(cls, v, info)
@model_validator(mode="after")
def _make_actions_chain(self):
diff --git a/vizro-core/src/vizro/models/_components/form/_text_area.py b/vizro-core/src/vizro/models/_components/form/_text_area.py
index 449ae231c..62cfe07cd 100755
--- a/vizro-core/src/vizro/models/_components/form/_text_area.py
+++ b/vizro-core/src/vizro/models/_components/form/_text_area.py
@@ -15,12 +15,6 @@ class TextArea(VizroBaseModel):
Based on the underlying [`dcc.TextArea`](https://dash.plotly.com/dash-core-components/textarea).
- Args:
- title (str): Title to be displayed. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- placeholder (str): Default text to display in input field. Defaults to `""`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
"""
type: Literal["text_area"] = "text_area"
@@ -33,7 +27,7 @@ class TextArea(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
placeholder: str = Field(default="", description="Default text to display in input field")
diff --git a/vizro-core/src/vizro/models/_components/form/_user_input.py b/vizro-core/src/vizro/models/_components/form/_user_input.py
index c847401ea..e14a2324e 100644
--- a/vizro-core/src/vizro/models/_components/form/_user_input.py
+++ b/vizro-core/src/vizro/models/_components/form/_user_input.py
@@ -15,12 +15,6 @@ class UserInput(VizroBaseModel):
Based on the underlying [`dcc.Input`](https://dash.plotly.com/dash-core-components/input).
- Args:
- title (str): Title to be displayed. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- placeholder (str): Default text to display in input field. Defaults to `""`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
"""
type: Literal["user_input"] = "user_input"
@@ -33,7 +27,7 @@ class UserInput(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
placeholder: str = Field(default="", description="Default text to display in input field")
diff --git a/vizro-core/src/vizro/models/_components/form/checklist.py b/vizro-core/src/vizro/models/_components/form/checklist.py
index 6c3b59166..9d1be531c 100644
--- a/vizro-core/src/vizro/models/_components/form/checklist.py
+++ b/vizro-core/src/vizro/models/_components/form/checklist.py
@@ -8,7 +8,6 @@
from vizro.models import Tooltip, VizroBaseModel
from vizro.models._components.form._form_utils import (
get_dict_options_and_default,
- validate_options_dict,
validate_value,
)
from vizro.models._models_utils import (
@@ -28,21 +27,6 @@ class Checklist(VizroBaseModel):
Abstract: Usage documentation
[How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)
- Args:
- options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.
- value (MultiValueType | None): See [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to
- `None`.
- title (str): Title to be displayed. Defaults to `""`.
- show_select_all (bool): Whether to display the 'Select All' option that allows users to select or
- deselect all available options with a single click. Defaults to `True`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Checklist` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
"""
type: Literal["checklist"] = "checklist"
@@ -63,7 +47,7 @@ class Checklist(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -72,21 +56,22 @@ class Checklist(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dbc.Checklist` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dbc.Checklist` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
_dynamic: bool = PrivateAttr(False)
_in_container: bool = PrivateAttr(False)
_inner_component_properties: list[str] = PrivateAttr(dbc.Checklist().available_properties)
# Reused validators
- _validate_options = model_validator(mode="before")(validate_options_dict)
+ # _validate_options = model_validator(mode="before")(validate_options_dict)
@model_validator(mode="after")
def _make_actions_chain(self):
diff --git a/vizro-core/src/vizro/models/_components/form/date_picker.py b/vizro-core/src/vizro/models/_components/form/date_picker.py
index f0e6c8c88..7a5199123 100644
--- a/vizro-core/src/vizro/models/_components/form/date_picker.py
+++ b/vizro-core/src/vizro/models/_components/form/date_picker.py
@@ -26,21 +26,6 @@ class DatePicker(VizroBaseModel):
Abstract: Usage documentation
[How to use temporal selectors](../user-guides/selectors.md#temporal-selectors)
- Args:
- min (date | None): Start date for date picker. Defaults to `None`.
- max (date | None): End date for date picker. Defaults to `None`.
- value (list[date] | date | None): Default date/dates for date picker. Defaults to `None`.
- title (str): Title to be displayed. Defaults to `""`.
- range (bool): Boolean flag for displaying range picker. Defaults to `True`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
-
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dmc.DatePickerInput` and overwrite
- any defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dmc documentation](https://www.dash-mantine-components.com/components/datepicker)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
"""
type: Literal["date_picker"] = "date_picker"
@@ -70,7 +55,7 @@ class DatePicker(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -79,14 +64,15 @@ class DatePicker(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dmc.DatePickerInput` and overwrite
- any defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dmc documentation](https://www.dash-mantine-components.com/components/datepicker)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dmc.DatePickerInput` and overwrite
+ any defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dmc documentation](https://www.dash-mantine-components.com/components/datepicker)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
_dynamic: bool = PrivateAttr(False)
_inner_component_properties: list[str] = PrivateAttr(dmc.DatePickerInput().available_properties)
diff --git a/vizro-core/src/vizro/models/_components/form/dropdown.py b/vizro-core/src/vizro/models/_components/form/dropdown.py
index 54ae59d34..c67062a03 100755
--- a/vizro-core/src/vizro/models/_components/form/dropdown.py
+++ b/vizro-core/src/vizro/models/_components/form/dropdown.py
@@ -10,7 +10,6 @@
from vizro.models import Tooltip, VizroBaseModel
from vizro.models._components.form._form_utils import (
get_dict_options_and_default,
- validate_options_dict,
validate_value,
)
from vizro.models._models_utils import _log_call, make_actions_chain
@@ -60,21 +59,6 @@ class Dropdown(VizroBaseModel):
Abstract: Usage documentation
[How to use categorical selectors](../user-guides/selectors.md#categorical-selectors)
- Args:
- options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.
- value (SingleValueType | MultiValueType | None): See
- [`SingleValueType`][vizro.models.types.SingleValueType] and
- [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to `None`.
- multi (bool): Whether to allow selection of multiple values. Defaults to `True`.
- title (str): Title to be displayed. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Dropdown` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/dropdown)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
"""
type: Literal["dropdown"] = "dropdown"
@@ -98,7 +82,7 @@ class Dropdown(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -107,14 +91,15 @@ class Dropdown(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dcc.Dropdown` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/dropdown)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dcc.Dropdown` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/dropdown)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
# Consider making the _dynamic public later. The same property could also be used for all other components.
# For example: vm.Graph could have a dynamic that is by default set on True.
@@ -123,7 +108,7 @@ class Dropdown(VizroBaseModel):
_inner_component_properties: list[str] = PrivateAttr(dcc.Dropdown().available_properties)
# Reused validators
- _validate_options = model_validator(mode="before")(validate_options_dict)
+ # _validate_options = model_validator(mode="before")(validate_options_dict)
@model_validator(mode="after")
def _make_actions_chain(self):
diff --git a/vizro-core/src/vizro/models/_components/form/radio_items.py b/vizro-core/src/vizro/models/_components/form/radio_items.py
index 9050601a4..3b43b995f 100644
--- a/vizro-core/src/vizro/models/_components/form/radio_items.py
+++ b/vizro-core/src/vizro/models/_components/form/radio_items.py
@@ -8,7 +8,6 @@
from vizro.models import Tooltip, VizroBaseModel
from vizro.models._components.form._form_utils import (
get_dict_options_and_default,
- validate_options_dict,
validate_value,
)
from vizro.models._models_utils import _log_call, make_actions_chain
@@ -25,19 +24,6 @@ class RadioItems(VizroBaseModel):
Abstract: Usage documentation
[How to use categorical selectors](../user-guides/selectors.md/#categorical-selectors)
- Args:
- options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.
- value (SingleValueType | None): See [`SingleValueType`][vizro.models.types.SingleValueType].
- Defaults to `None`.
- title (str): Title to be displayed. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.RadioItems` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
"""
type: Literal["radio_items"] = "radio_items"
@@ -52,7 +38,7 @@ class RadioItems(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -61,21 +47,22 @@ class RadioItems(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dbc.RadioItems` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dbc.RadioItems` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
_dynamic: bool = PrivateAttr(False)
_in_container: bool = PrivateAttr(False)
_inner_component_properties: list[str] = PrivateAttr(dbc.RadioItems().available_properties)
# Reused validators
- _validate_options = model_validator(mode="before")(validate_options_dict)
+ # _validate_options = model_validator(mode="before")(validate_options_dict)
@model_validator(mode="after")
def _make_actions_chain(self):
diff --git a/vizro-core/src/vizro/models/_components/form/range_slider.py b/vizro-core/src/vizro/models/_components/form/range_slider.py
index fc1942f89..924ab8065 100644
--- a/vizro-core/src/vizro/models/_components/form/range_slider.py
+++ b/vizro-core/src/vizro/models/_components/form/range_slider.py
@@ -30,22 +30,6 @@ class RangeSlider(VizroBaseModel):
Abstract: Usage documentation
[How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)
- Args:
- min (float | None): Start value for slider. Defaults to `None`.
- max (float | None): End value for slider. Defaults to `None`.
- step (float | None): Step-size for marks on slider. Defaults to `None`.
- marks (dict[float, str]): Marks to be displayed on slider. Defaults to `{}`.
- value (list[float] | None): Default start and end value for slider. Must be 2 items. Defaults to `None`.
- title (str): Title to be displayed. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.RangeSlider` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/rangeslider)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
-
"""
type: Literal["range_slider"] = "range_slider"
@@ -75,7 +59,7 @@ class RangeSlider(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -84,14 +68,15 @@ class RangeSlider(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dcc.RangeSlider` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/rangeslider)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dcc.RangeSlider` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/rangeslider)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
_dynamic: bool = PrivateAttr(False)
_inner_component_properties: list[str] = PrivateAttr(dcc.RangeSlider().available_properties)
diff --git a/vizro-core/src/vizro/models/_components/form/slider.py b/vizro-core/src/vizro/models/_components/form/slider.py
index 3ba6b8f18..65c28fa4e 100644
--- a/vizro-core/src/vizro/models/_components/form/slider.py
+++ b/vizro-core/src/vizro/models/_components/form/slider.py
@@ -30,21 +30,6 @@ class Slider(VizroBaseModel):
Abstract: Usage documentation
[How to use numerical selectors](../user-guides/selectors.md/#numerical-selectors)
- Args:
- min (float | None): Start value for slider. Defaults to `None`.
- max (float | None): End value for slider. Defaults to `None`.
- step (float | None): Step-size for marks on slider. Defaults to `None`.
- marks (dict[float, str]): Marks to be displayed on slider. Defaults to `{}`.
- value (float | None): Default value for slider. Defaults to `None`.
- title (str): Title to be displayed. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Slider` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/slider)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
"""
type: Literal["slider"] = "slider"
@@ -75,7 +60,7 @@ class Slider(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -84,14 +69,15 @@ class Slider(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dcc.Slider` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/slider)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dcc.Slider` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/slider)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
_dynamic: bool = PrivateAttr(False)
_inner_component_properties: list[str] = PrivateAttr(dcc.Slider().available_properties)
diff --git a/vizro-core/src/vizro/models/_components/form/switch.py b/vizro-core/src/vizro/models/_components/form/switch.py
index 0801914f7..e112d458e 100755
--- a/vizro-core/src/vizro/models/_components/form/switch.py
+++ b/vizro-core/src/vizro/models/_components/form/switch.py
@@ -19,25 +19,13 @@ class Switch(VizroBaseModel):
Abstract: Usage documentation
[How to use boolean selectors](../user-guides/selectors.md/#boolean-selectors)
- Args:
- value (bool): Initial state of the switch. When `True`, the switch is "on".
- When `False`, the switch is "off". Defaults to `False`.
- title (str): Title/Label to be displayed to the right of the switch. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Switch` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
"""
type: Literal["switch"] = "switch"
value: bool = Field(
default=False,
description="""Initial state of the switch. When `True`, the switch is enabled/on.
- When `False`, the switch is disabled/off. Defaults to `False`.""",
+ When `False`, the switch is disabled/off.""",
)
title: str = Field(default="", description="Title/Label to be displayed to the right of the switch.")
# TODO: ideally description would have json_schema_input_type=str | Tooltip attached to the BeforeValidator,
@@ -49,7 +37,7 @@ class Switch(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -58,14 +46,15 @@ class Switch(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dbc.Switch` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dbc.Switch` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/input/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
_dynamic: bool = PrivateAttr(False)
_inner_component_properties: list[str] = PrivateAttr(dbc.Switch().available_properties)
diff --git a/vizro-core/src/vizro/models/_components/graph.py b/vizro-core/src/vizro/models/_components/graph.py
index dba09356f..943f65c57 100644
--- a/vizro-core/src/vizro/models/_components/graph.py
+++ b/vizro-core/src/vizro/models/_components/graph.py
@@ -8,7 +8,7 @@
from dash import ClientsideFunction, Input, Output, State, clientside_callback, dcc, html, set_props
from dash.exceptions import MissingCallbackContextException
from plotly import graph_objects as go
-from pydantic import AfterValidator, BeforeValidator, Field, JsonValue, field_validator, model_validator
+from pydantic import AfterValidator, BeforeValidator, Field, JsonValue, ValidationInfo, field_validator, model_validator
from pydantic.json_schema import SkipJsonSchema
from vizro._vizro_utils import _set_defaults_nested
@@ -41,25 +41,6 @@ class Graph(VizroBaseModel):
Abstract: Usage documentation
[How to use graphs](../user-guides/graph.md)
- Args:
- figure (CapturedCallable): Function that returns a graph. Either use
- [`vizro.plotly.express`](../user-guides/graph.md) or see
- [`CapturedCallable`][vizro.models.types.CapturedCallable].
- title (str): Title of the `Graph`. Defaults to `""`.
- header (str): Markdown text positioned below the `Graph.title`. Follows the CommonMark specification.
- Ideal for adding supplementary information such as subtitles, descriptions, or additional context.
- Defaults to `""`.
- footer (str): Markdown text positioned below the `Graph`. Follows the CommonMark specification.
- Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Graph` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/graph#graph-properties)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
-
"""
type: Literal["graph"] = "graph"
@@ -91,7 +72,7 @@ class Graph(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
@@ -100,16 +81,20 @@ class Graph(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dcc.Graph` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/graph#graph-properties)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dcc.Graph` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/graph#graph-properties)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
- _validate_figure = field_validator("figure", mode="before")(_validate_captured_callable)
+ @field_validator("figure", mode="before")
+ @classmethod
+ def _validate_figure(cls, v: Any, info: ValidationInfo):
+ return _validate_captured_callable(cls, v, info)
@model_validator(mode="after")
def _make_actions_chain(self):
diff --git a/vizro-core/src/vizro/models/_components/table.py b/vizro-core/src/vizro/models/_components/table.py
index f765ff154..056c70208 100644
--- a/vizro-core/src/vizro/models/_components/table.py
+++ b/vizro-core/src/vizro/models/_components/table.py
@@ -1,9 +1,17 @@
import logging
-from typing import Annotated, Literal
+from typing import Annotated, Any, Literal
import pandas as pd
from dash import State, dcc, html
-from pydantic import AfterValidator, BeforeValidator, Field, PrivateAttr, field_validator, model_validator
+from pydantic import (
+ AfterValidator,
+ BeforeValidator,
+ Field,
+ PrivateAttr,
+ ValidationInfo,
+ field_validator,
+ model_validator,
+)
from pydantic.json_schema import SkipJsonSchema
from vizro.actions import filter_interaction
@@ -29,17 +37,6 @@ class Table(VizroBaseModel):
Abstract: Usage documentation
[How to use tables](../user-guides/table.md)
- Args:
- figure (CapturedCallable): Function that returns a Dash DataTable. See [`vizro.tables`][vizro.tables].
- title (str): Title of the `Table`. Defaults to `""`.
- header (str): Markdown text positioned below the `Table.title`. Follows the CommonMark specification.
- Ideal for adding supplementary information such as subtitles, descriptions, or additional context.
- Defaults to `""`.
- footer (str): Markdown text positioned below the `Table`. Follows the CommonMark specification.
- Ideal for providing further details such as sources, disclaimers, or additional notes. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
"""
type: Literal["table"] = "table"
@@ -71,13 +68,17 @@ class Table(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
actions: ActionsType = []
_inner_component_id: str = PrivateAttr()
- _validate_figure = field_validator("figure", mode="before")(_validate_captured_callable)
+
+ @field_validator("figure", mode="before")
+ @classmethod
+ def _validate_figure(cls, v: Any, info: ValidationInfo):
+ return _validate_captured_callable(cls, v, info)
@model_validator(mode="after")
def _make_actions_chain(self):
diff --git a/vizro-core/src/vizro/models/_components/tabs.py b/vizro-core/src/vizro/models/_components/tabs.py
index 0835348d3..0530006c1 100644
--- a/vizro-core/src/vizro/models/_components/tabs.py
+++ b/vizro-core/src/vizro/models/_components/tabs.py
@@ -27,12 +27,6 @@ class Tabs(VizroBaseModel):
Abstract: Usage documentation
[How to use tabs](../user-guides/tabs.md)
- Args:
- tabs (list[Container]): See [`Container`][vizro.models.Container].
- title (str): Title displayed above Tabs. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.
-
"""
type: Literal["tabs"] = "tabs"
@@ -46,7 +40,7 @@ class Tabs(VizroBaseModel):
Field(
default=None,
description="""Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. Defaults to `None`.""",
+ Hovering over the icon shows a tooltip with the provided description.""",
),
]
diff --git a/vizro-core/src/vizro/models/_components/text.py b/vizro-core/src/vizro/models/_components/text.py
index 9b6b902fa..461287e07 100644
--- a/vizro-core/src/vizro/models/_components/text.py
+++ b/vizro-core/src/vizro/models/_components/text.py
@@ -15,14 +15,6 @@ class Text(VizroBaseModel):
Abstract: Usage documentation
[How to add text to your page](../user-guides/text.md)
- Args:
- text (str): Markdown string to create text that should adhere to the CommonMark Spec.
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dcc.Markdown` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/markdown/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
-
"""
type: Literal["text"] = "text"
@@ -34,14 +26,15 @@ class Text(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dcc.Markdown` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior.
- Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/markdown/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dcc.Markdown` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior.
+ Visit the [dcc documentation](https://dash.plotly.com/dash-core-components/markdown/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
+ underlying component may change in the future."""
@property
def _action_outputs(self) -> dict[str, _IdProperty]:
diff --git a/vizro-core/src/vizro/models/_controls/filter.py b/vizro-core/src/vizro/models/_controls/filter.py
index baec01b68..513b49a6d 100644
--- a/vizro-core/src/vizro/models/_controls/filter.py
+++ b/vizro-core/src/vizro/models/_controls/filter.py
@@ -81,15 +81,6 @@ class Filter(VizroBaseModel):
Abstract: Usage documentation
[How to use filters](../user-guides/filters.md)
- Args:
- column (str): Column of `DataFrame` to filter.
- targets (list[ModelID]): Target component to be affected by filter. If none are given then target all components
- on the page that use `column`. Defaults to `[]`.
- selector (SelectorType | None): See [SelectorType][vizro.models.types.SelectorType]. Defaults to `None`.
- show_in_url (bool): Whether the filter should be included in the URL query string. Defaults to `False`.
- Useful for bookmarking or sharing dashboards with specific filter values pre-set.
- visible (bool): Whether the filter should be visible. Defaults to `True`.
-
Example:
```python
import vizro.models as vm
@@ -109,13 +100,13 @@ class Filter(VizroBaseModel):
show_in_url: bool = Field(
default=False,
description=(
- "Whether the filter should be included in the URL query string. Defaults to `False`. "
+ "Whether the filter should be included in the URL query string. "
"Useful for bookmarking or sharing dashboards with specific filter values pre-set."
),
)
visible: bool = Field(
default=True,
- description="Whether the filter should be visible. Defaults to `True`.",
+ description="Whether the filter should be visible.",
)
_dynamic: bool = PrivateAttr(False)
@@ -124,6 +115,7 @@ class Filter(VizroBaseModel):
@model_validator(mode="after")
def check_id_set_for_url_control(self):
+ """Check that the filter has an `id` set if it is shown in the URL."""
# If the filter is shown in the URL, it should have an `id` set to ensure stable and readable URLs.
warn_missing_id_for_url_control(control=self)
return self
diff --git a/vizro-core/src/vizro/models/_controls/parameter.py b/vizro-core/src/vizro/models/_controls/parameter.py
index f426845f4..529f1e82a 100644
--- a/vizro-core/src/vizro/models/_controls/parameter.py
+++ b/vizro-core/src/vizro/models/_controls/parameter.py
@@ -66,14 +66,6 @@ class Parameter(VizroBaseModel):
vm.Parameter(targets=["scatter.x"], selector=vm.Slider(min=0, max=1, default=0.8, title="Bubble opacity"))
```
- Args:
- targets (list[str]): Targets in the form of `.`.
- selector (SelectorType): See [SelectorType][vizro.models.types.SelectorType]. Converts selector value
- `"NONE"` into `None` to allow optional parameters.
- show_in_url (bool): Whether the parameter should be included in the URL query string. Defaults to `False`.
- Useful for bookmarking or sharing dashboards with specific parameter values pre-set.
- visible (bool): Whether the parameter should be visible. Defaults to `True`.
-
"""
type: Literal["parameter"] = "parameter"
@@ -92,19 +84,20 @@ class Parameter(VizroBaseModel):
show_in_url: bool = Field(
default=False,
description=(
- "Whether the parameter should be included in the URL query string. Defaults to `False`. "
+ "Whether the parameter should be included in the URL query string. "
"Useful for bookmarking or sharing dashboards with specific parameter values pre-set."
),
)
visible: bool = Field(
default=True,
- description="Whether the parameter should be visible. Defaults to `True`.",
+ description="Whether the parameter should be visible.",
)
_selector_properties: set[str] = PrivateAttr(set())
@model_validator(mode="after")
def check_id_set_for_url_control(self):
+ """Check that the parameter has an `id` set if it is shown in the URL."""
# If the parameter is shown in the URL, it should have an `id` set to ensure stable and readable URLs.
warn_missing_id_for_url_control(control=self)
return self
diff --git a/vizro-core/src/vizro/models/_dashboard.py b/vizro-core/src/vizro/models/_dashboard.py
index 4042fb906..3891c2f40 100644
--- a/vizro-core/src/vizro/models/_dashboard.py
+++ b/vizro-core/src/vizro/models/_dashboard.py
@@ -23,7 +23,12 @@
html,
)
from dash.development.base_component import Component
-from pydantic import AfterValidator, BeforeValidator, Field, ValidationInfo
+from pydantic import (
+ AfterValidator,
+ BeforeValidator,
+ Field,
+ ValidationInfo,
+)
from typing_extensions import TypedDict
import vizro
@@ -88,21 +93,11 @@ class Dashboard(VizroBaseModel):
Abstract: Usage documentation
[How to create a dashboard](../user-guides/dashboard.md)
- Args:
- pages (list[Page]): See [`Page`][vizro.models.Page].
- theme (Literal["vizro_dark", "vizro_light"]): Layout theme to be applied across dashboard.
- Defaults to `vizro_dark`.
- navigation (Navigation): See [`Navigation`][vizro.models.Navigation]. Defaults to `None`.
- title (str): Dashboard title to appear on every page on top left-side. Defaults to `""`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta
- tags. Defaults to `None`.
-
"""
pages: list[Page]
theme: Literal["vizro_dark", "vizro_light"] = Field(
- default="vizro_dark", description="Theme to be applied across dashboard. Defaults to `vizro_dark`."
+ default="vizro_dark", description="Theme to be applied across dashboard."
)
navigation: Annotated[
Navigation | None, AfterValidator(set_navigation_pages), Field(default=None, validate_default=True)
@@ -118,7 +113,7 @@ class Dashboard(VizroBaseModel):
default=None,
description="""Optional markdown string that adds an icon next to the title.
Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta
- tags. Defaults to `None`.""",
+ tags.""",
),
]
diff --git a/vizro-core/src/vizro/models/_flex.py b/vizro-core/src/vizro/models/_flex.py
index e3e8709fb..595a31428 100644
--- a/vizro-core/src/vizro/models/_flex.py
+++ b/vizro-core/src/vizro/models/_flex.py
@@ -15,33 +15,22 @@ class Flex(VizroBaseModel):
Abstract: Usage documentation
[How to use the Flex layout](../user-guides/layouts.md#flex-layout)
- Args:
- direction (Literal["row", "column"]): Sets the direction of the flex items inside the container. Options are
- `row` or `column`. Defaults to `column`.
- gap (str): Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'.
- Defaults to `24px`.
- wrap (bool): Determines whether flex items are forced onto a single line or can wrap onto multiple lines.
- If `False`, all items will be on one line. If `True`, items will wrap onto multiple lines.
- Defaults to `False`.
-
"""
type: Literal["flex"] = "flex"
direction: Literal["row", "column"] = Field(
default="column",
- description="Sets the direction of the flex items inside the container. Options are `row` or `column`."
- "Defaults to `column`.",
+ description="Sets the direction of the flex items inside the container. Options are `row` or `column`.",
)
gap: str = Field(
default=GAP_DEFAULT,
- description="Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'. "
- "Defaults to `24px`.",
+ description="Specifies the gap between rows and columns. Allowed units: 'px', 'rem', 'em', or '%'.",
pattern=re.compile(r"^\d+(px|rem|em|%)$"),
)
wrap: bool = Field(
default=False,
description="Determines whether flex items are forced onto a single line or can wrap onto multiple lines. If "
- "`False`, all items will be on one line. If `True`, items will wrap onto multiple lines. Defaults to `False`.",
+ "`False`, all items will be on one line. If `True`, items will wrap onto multiple lines.",
)
@_log_call
diff --git a/vizro-core/src/vizro/models/_grid.py b/vizro-core/src/vizro/models/_grid.py
index 915587535..b4b0dfacc 100644
--- a/vizro-core/src/vizro/models/_grid.py
+++ b/vizro-core/src/vizro/models/_grid.py
@@ -171,13 +171,6 @@ class Grid(VizroBaseModel):
Abstract: Usage documentation
[How to use the Grid layout](../user-guides/layouts.md#grid-layout)
- Args:
- grid (list[list[int]]): Grid specification to arrange components on screen.
- row_gap (str): Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.
- col_gap (str): Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.
- row_min_height (str): Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.
- col_min_width (str): Minimum column width in px. Allowed unit are: 'px', 'rem', 'em', or '%'. Defaults to `0px`.
-
"""
type: Literal["grid"] = "grid"
@@ -188,22 +181,22 @@ class Grid(VizroBaseModel):
]
row_gap: str = Field(
default=GAP_DEFAULT,
- description="Specifies the gap between rows. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ description="Specifies the gap between rows. Allowed units: `px`, `rem`, `em`, or `%`.",
pattern=re.compile(r"^\d+(px|rem|em|%)$"),
)
col_gap: str = Field(
default=GAP_DEFAULT,
- description="Specifies the gap between columns. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `24px`.",
+ description="Specifies the gap between columns. Allowed units: `px`, `rem`, `em`, or `%`.",
pattern=re.compile(r"^\d+(px|rem|em|%)$"),
)
row_min_height: str = Field(
default=MIN_DEFAULT,
- description="Minimum row height in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ description="Minimum row height in px. Allowed units: `px`, `rem`, `em`, or `%`.",
pattern=re.compile(r"^\d+(px|rem|em|%)$"),
)
col_min_width: str = Field(
default=MIN_DEFAULT,
- description="Minimum column width in px. Allowed units: 'px', 'rem', 'em', or '%'. Defaults to `0px`.",
+ description="Minimum column width in px. Allowed units: `px`, `rem`, `em`, or `%`.",
pattern=re.compile(r"^\d+(px|rem|em|%)$"),
)
_component_grid_lines: list[ColRowGridLines] | None = PrivateAttr()
diff --git a/vizro-core/src/vizro/models/_navigation/accordion.py b/vizro-core/src/vizro/models/_navigation/accordion.py
index 7f75998d7..18a5fa294 100644
--- a/vizro-core/src/vizro/models/_navigation/accordion.py
+++ b/vizro-core/src/vizro/models/_navigation/accordion.py
@@ -25,10 +25,6 @@ class Accordion(VizroBaseModel):
Abstract: Usage documentation
[How to use an accordion](../user-guides/navigation.md/#group-pages)
- Args:
- pages (dict[str, list[ModelID]]): Mapping from name of a pages group to a list of page IDs/titles.
- Defaults to `{}`.
-
"""
type: Literal["accordion"] = "accordion"
diff --git a/vizro-core/src/vizro/models/_navigation/nav_bar.py b/vizro-core/src/vizro/models/_navigation/nav_bar.py
index c987318b5..7b15ae386 100644
--- a/vizro-core/src/vizro/models/_navigation/nav_bar.py
+++ b/vizro-core/src/vizro/models/_navigation/nav_bar.py
@@ -27,11 +27,6 @@ class NavBar(VizroBaseModel):
Abstract: Usage documentation
[How to use the navigation bar](../user-guides/navigation.md#use-a-navigation-bar-with-icons)
- Args:
- pages (dict[str, list[ModelID]]): Mapping from name of a pages group to a list of page IDs/titles.
- Defaults to `{}`.
- items (list[NavLink]): See [`NavLink`][vizro.models.NavLink]. Defaults to `[]`.
-
"""
type: Literal["nav_bar"] = "nav_bar"
diff --git a/vizro-core/src/vizro/models/_navigation/nav_link.py b/vizro-core/src/vizro/models/_navigation/nav_link.py
index ba58e0a99..d4f611d58 100644
--- a/vizro-core/src/vizro/models/_navigation/nav_link.py
+++ b/vizro-core/src/vizro/models/_navigation/nav_link.py
@@ -21,11 +21,6 @@ class NavLink(VizroBaseModel):
Abstract: Usage documentation
[How to customize the NavBar icons](../user-guides/navigation.md#change-icons)
- Args:
- pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.
- label (str): Text description of the icon for use in tooltip.
- icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons). Defaults to `""`.
-
"""
pages: Annotated[NavPagesType, AfterValidator(_validate_pages), Field(default=[])]
diff --git a/vizro-core/src/vizro/models/_navigation/navigation.py b/vizro-core/src/vizro/models/_navigation/navigation.py
index 84b9b29f3..cf25bbc5c 100644
--- a/vizro-core/src/vizro/models/_navigation/navigation.py
+++ b/vizro-core/src/vizro/models/_navigation/navigation.py
@@ -19,11 +19,6 @@ class Navigation(VizroBaseModel):
Abstract: Usage documentation
[How to customize the navigation](../user-guides/navigation.md)
- Args:
- pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.
- nav_selector (NavSelectorType | None): See [`NavSelectorType`][vizro.models.types.NavSelectorType].
- Defaults to `None`.
-
"""
pages: Annotated[NavPagesType, AfterValidator(_validate_pages), Field(default=[])]
diff --git a/vizro-core/src/vizro/models/_page.py b/vizro-core/src/vizro/models/_page.py
index 8073f19a1..0cc9ff2a1 100644
--- a/vizro-core/src/vizro/models/_page.py
+++ b/vizro-core/src/vizro/models/_page.py
@@ -56,17 +56,6 @@ class Page(VizroBaseModel):
Abstract: Usage documentation
[How to make dashboard pages](../user-guides/pages.md)
- Args:
- components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component
- has to be provided.
- title (str): Title of the `Page`.
- layout (LayoutType | None): Layout to place components in. Defaults to `None`.
- description (Tooltip | None): Optional markdown string that adds an icon next to the title.
- Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta
- tags. Defaults to `None`.
- controls (list[ControlType]): See [ControlType][vizro.models.types.ControlType]. Defaults to `[]`.
- path (str): Path to navigate to page. Defaults to `""`.
- actions (ActionsType): See [`ActionsType`][vizro.models.types.ActionsType].
"""
# TODO[mypy], see: https://github.com/pydantic/pydantic/issues/156 for components field
@@ -83,7 +72,7 @@ class Page(VizroBaseModel):
default=None,
description="""Optional markdown string that adds an icon next to the title.
Hovering over the icon shows a tooltip with the provided description. This also sets the page's meta
- tags. Defaults to `None`.""",
+ tags.""",
),
]
controls: list[ControlType] = []
@@ -97,6 +86,7 @@ def _make_actions_chain(self):
# This should ideally be a field validator, but we need access to the model_fields_set
@model_validator(mode="after")
def validate_path(self):
+ """Validate that the path is unique and clean."""
if self.path:
new_path = clean_path(self.path, "-_/")
elif "id" in self.model_fields_set:
diff --git a/vizro-core/src/vizro/models/_tooltip.py b/vizro-core/src/vizro/models/_tooltip.py
index 11fe72a5d..9ca9a8f2d 100644
--- a/vizro-core/src/vizro/models/_tooltip.py
+++ b/vizro-core/src/vizro/models/_tooltip.py
@@ -33,15 +33,6 @@ class Tooltip(VizroBaseModel):
[selectors](../user-guides/selectors.md#add-a-tooltip) and
[buttons](../user-guides/button.md#add-a-tooltip).
- Args:
- text (str): Markdown string for text shown when hovering over the icon. Should adhere to the CommonMark Spec.
- icon (str): Icon name from [Google Material icons library](https://fonts.google.com/icons).
- extra (dict[str, Any]): Extra keyword arguments that are passed to `dbc.Tooltip` and overwrite any
- chosen by the Vizro team. This may have unexpected behavior. Visit the
- [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/tooltip/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and the
- underlying component may change in the future. Defaults to `{}`.
-
Example: `Tooltip` on a [`Checklist`][vizro.models.Checklist] selector
```python
import vizro.models as vm
@@ -66,14 +57,15 @@ class Tooltip(VizroBaseModel):
dict[str, Any],
Field(
default={},
- description="""Extra keyword arguments that are passed to `dbc.Tooltip` and overwrite any
- defaults chosen by the Vizro team. This may have unexpected behavior. Visit the
- [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/tooltip/)
- to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and
- the underlying component may change in the future. Defaults to `{}`.""",
),
]
]
+ # Using the description field does not show the below in rendered docs
+ """Extra keyword arguments that are passed to `dbc.Tooltip` and overwrite any
+ defaults chosen by the Vizro team. This may have unexpected behavior. Visit the
+ [dbc documentation](https://www.dash-bootstrap-components.com/docs/components/tooltip/)
+ to see all available arguments. [Not part of the official Vizro schema](../explanation/schema.md) and
+ the underlying component may change in the future."""
@property
def _action_outputs(self) -> dict[str, _IdProperty]: