From 1243c48a4690f2500b275a73caa0ee967065d55d Mon Sep 17 00:00:00 2001 From: nadijagraca <108531476+nadijagraca@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:04:41 +0100 Subject: [PATCH 1/5] [Docs] Add risk mitigation links (#870) --- ...atkusic_graca_add_risk_mitigation_links.md | 48 +++++++++++++++++++ .../pages/user-guides/customize-vizro-ai.md | 10 ++-- 2 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 vizro-ai/changelog.d/20241112_202616_nadija_ratkusic_graca_add_risk_mitigation_links.md diff --git a/vizro-ai/changelog.d/20241112_202616_nadija_ratkusic_graca_add_risk_mitigation_links.md b/vizro-ai/changelog.d/20241112_202616_nadija_ratkusic_graca_add_risk_mitigation_links.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-ai/changelog.d/20241112_202616_nadija_ratkusic_graca_add_risk_mitigation_links.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-ai/docs/pages/user-guides/customize-vizro-ai.md b/vizro-ai/docs/pages/user-guides/customize-vizro-ai.md index e2c7da2da..3087d7f1a 100644 --- a/vizro-ai/docs/pages/user-guides/customize-vizro-ai.md +++ b/vizro-ai/docs/pages/user-guides/customize-vizro-ai.md @@ -1,6 +1,6 @@ # Model usage -This guide shows how to set up a large language model (LLM) for use with Vizro-AI. Setting up a LLM is required for the package to generate charts and dashboards based on natural language queries. +This guide shows how to set up a large language model (LLM) for use with Vizro-AI. Setting up a LLM is required for the package to generate charts and dashboards based on natural language queries. To ensure responsible use, review the vendor’s guidelines on risk mitigation before using the model to understand potential model limitations and best practices. ## Supported models Vizro-AI supports **any** model that is available via [Langchain's `BaseChatModel` class](https://api.python.langchain.com/en/latest/language_models/langchain_core.language_models.chat_models.BaseChatModel.html#langchain_core.language_models.chat_models.BaseChatModel), and that has the [`with_structured_output` method](https://python.langchain.com/v0.2/docs/how_to/structured_output/#the-with_structured_output-method) implemented. An overview of the [most common vendor models supporting this functionality](https://python.langchain.com/v0.2/docs/integrations/chat/) can be found in Langchain's documentation. For ease of use one can also choose some models via a string parameter. @@ -24,7 +24,8 @@ vizro_ai = VizroAI(model="") | API key | `OPENAI_API_KEY` | | Base API URL | `OPENAI_API_BASE` | - To use OpenAI with Vizro-AI, you must have an account with paid-for credits available. None of the free accounts will suffice. You can check [all available OpenAI models including pricing on their website](https://platform.openai.com/docs/models). This will also explain which version the below string acronyms currently point to. + To use OpenAI with Vizro-AI, you must have an account with paid-for credits available. None of the free accounts will suffice. [Check the OpenAI models and pricing on their website](https://platform.openai.com/docs/models). Before using a model, please review OpenAI's guidelines on risk mitigation to understand potential model limitations and best practices. + [See the OpenAI site for more details on responsible usage](https://platform.openai.com/docs/guides/safety-best-practices). - `gpt-4o-mini` **default** - `gpt-4-turbo` @@ -39,7 +40,8 @@ vizro_ai = VizroAI(model="") | API key | `ANTHROPIC_API_KEY` | | Base API URL | `ANTHROPIC_API_URL`,`ANTHROPIC_BASE_URL` | - To use Anthropic with Vizro-AI, you must have an account with paid-for credits available. None of the free accounts will suffice. You can check [all available Anthropic models including pricing on their website](https://docs.anthropic.com/en/docs/about-claude/models). + To use Anthropic with Vizro-AI, you must have an account with paid-for credits available. None of the free accounts will suffice. [Check the Anthropic models and pricing on their website](https://docs.anthropic.com/en/docs/about-claude/models). Before using a model, please review Anthropic guidelines on risk mitigation to understand potential model limitations and best practices. + [See the Anthropic site for more details on responsible usage](https://support.anthropic.com/en/collections/4078535-trust-safety/). - `claude-3-5-sonnet-latest` - `claude-3-opus-latest` @@ -62,6 +64,8 @@ vizro_ai = VizroAI(model="") | Base API URL | `MISTRAL_BASE_URL` | To use Mistral with Vizro-AI, you can either use their API, which comes with [an associated cost](https://mistral.ai/technology/#pricing), or you could use their models for free under the Apache 2.0 license. In that case you need to setup the model API yourself. You can check [all available Mistral models including pricing on their website](https://docs.mistral.ai/getting-started/models/models_overview). This will also explain which version the below string acronyms currently point to. + Before usage, please review Mistral guidelines on risk mitigation to understand potential model limitations and best practices. + [See the Mistral site for more details on responsible usage](https://help.mistral.ai/en/collections/272960-le-chat/). - `mistral-large-latest` - `open-mistral-nemo` From 36699ee0198cc5db8d6c9cc55dd9f62b10285083 Mon Sep 17 00:00:00 2001 From: Li Nguyen <90609403+huong-li-nguyen@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:47:57 +0100 Subject: [PATCH 2/5] [Demo] Fix diverging stacked bar in ViViVo (#864) Co-authored-by: Antony Milne <49395058+antonymilne@users.noreply.github.com> --- vizro-core/examples/visual-vocabulary/custom_charts.py | 10 ++++++++-- .../pages/examples/diverging_stacked_bar.py | 10 +++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/vizro-core/examples/visual-vocabulary/custom_charts.py b/vizro-core/examples/visual-vocabulary/custom_charts.py index 7e1f26948..ea7b41d63 100644 --- a/vizro-core/examples/visual-vocabulary/custom_charts.py +++ b/vizro-core/examples/visual-vocabulary/custom_charts.py @@ -290,12 +290,18 @@ def diverging_stacked_bar(data_frame: pd.DataFrame, **kwargs) -> go.Figure: orientation = fig.data[0].orientation x_or_y = "x" if orientation == "h" else "y" - for trace_idx in range(len(fig.data) // 2): + for trace_idx in range(len(fig.data) // 2, len(fig.data)): fig.update_traces({f"{x_or_y}axis": f"{x_or_y}2"}, selector=trace_idx) + # Add ticksuffix and range limitations on both sids for correct interpretation of diverging stacked bar + # with percentage data + fig.update_layout({f"{x_or_y}axis": {"ticksuffix": "%"}}) fig.update_layout({f"{x_or_y}axis2": fig.layout[f"{x_or_y}axis"]}) fig.update_layout( - {f"{x_or_y}axis": {"autorange": "reversed", "domain": [0, 0.5]}, f"{x_or_y}axis2": {"domain": [0.5, 1]}} + { + f"{x_or_y}axis": {"domain": [0, 0.5], "range": [100, 0]}, + f"{x_or_y}axis2": {"domain": [0.5, 1], "range": [0, 100]}, + } ) if orientation == "h": diff --git a/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py b/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py index ae08c6629..e6ab63c0a 100644 --- a/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py +++ b/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py @@ -24,12 +24,16 @@ def diverging_stacked_bar(data_frame: pd.DataFrame, **kwargs) -> go.Figure: orientation = fig.data[0].orientation x_or_y = "x" if orientation == "h" else "y" - for trace_idx in range(len(fig.data) // 2): + for trace_idx in range(len(fig.data) // 2, len(fig.data)): fig.update_traces({f"{x_or_y}axis": f"{x_or_y}2"}, selector=trace_idx) + fig.update_layout({f"{x_or_y}axis": {"ticksuffix": "%"}}) fig.update_layout({f"{x_or_y}axis2": fig.layout[f"{x_or_y}axis"]}) fig.update_layout( - {f"{x_or_y}axis": {"autorange": "reversed", "domain": [0, 0.5]}, f"{x_or_y}axis2": {"domain": [0.5, 1]}} + { + f"{x_or_y}axis": {"domain": [0, 0.5], "range": [100, 0]}, + f"{x_or_y}axis2": {"domain": [0.5, 1], "range": [0, 100]}, + } ) if orientation == "h": @@ -63,6 +67,6 @@ def diverging_stacked_bar(data_frame: pd.DataFrame, **kwargs) -> go.Figure: data_frame=pastries, x=["Strongly Disagree", "Disagree", "Agree", "Strongly Agree"], y="pastry", - labels={"value": "Response count", "variable": "Opinion"}, + labels={"value": "", "variable": "", "pastry": ""}, title="I would recommend this pastry to my friends", ) From 6c57a42603066e529690beaf89e1bd09888a2bd3 Mon Sep 17 00:00:00 2001 From: Antony Milne <49395058+antonymilne@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:48:31 +0000 Subject: [PATCH 3/5] [Deps] Cap to dash<3 (#877) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .../20241114_152933_antony.milne_cap_dash.md | 47 +++++++++++++++++++ vizro-core/pyproject.toml | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md diff --git a/vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md b/vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md new file mode 100644 index 000000000..c11c3a0e7 --- /dev/null +++ b/vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md @@ -0,0 +1,47 @@ + + + + + + +### Changed + +- Upper bound dependency `dash<3`. ([#877](https://github.com/mckinsey/vizro/pull/877)) + + + + diff --git a/vizro-core/pyproject.toml b/vizro-core/pyproject.toml index a1992ddc8..0dada76ba 100644 --- a/vizro-core/pyproject.toml +++ b/vizro-core/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "Programming Language :: Python :: 3.13" ] dependencies = [ - "dash>=2.17.1", # 2.17.1 needed for no_output fix in clientside_callback + "dash>=2.17.1,<3", # 2.17.1 needed for no_output fix in clientside_callback "dash_bootstrap_components", "dash-ag-grid>=31.0.0", "pandas>=2", From 12cc2f37960d7bce56cf53966fd53bbb0e309350 Mon Sep 17 00:00:00 2001 From: Antony Milne <49395058+antonymilne@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:02:37 +0000 Subject: [PATCH 4/5] [Release] Release of vizro 0.1.27 (#878) --- vizro-core/CHANGELOG.md | 14 + .../changelog.d/20241030_111845_runner.md | 48 - ...30_170000_antony.milne_vvv_link_targets.md | 48 - ...105_170003_antony.milne_new_interaction.md | 48 - ...06_104745_antony.milne_dynamic_filter_2.md | 47 - ...102_alexey_snigir_pytest_warning_ignore.md | 48 - ...112_120233_huong_li_nguyen_fix_404_page.md | 47 - ...sic_graca_add_banner_to_demo_dashboards.md | 48 - .../20241114_152933_antony.milne_cap_dash.md | 47 - ...=> 20241114_162322_antony.milne_0_1_27.md} | 0 vizro-core/mkdocs.yml | 2 +- vizro-core/schemas/0.1.27.dev0.json | 1444 ----------------- .../schemas/{0.1.26.json => 0.1.27.json} | 0 vizro-core/src/vizro/__init__.py | 2 +- 14 files changed, 16 insertions(+), 1827 deletions(-) delete mode 100644 vizro-core/changelog.d/20241030_111845_runner.md delete mode 100644 vizro-core/changelog.d/20241030_170000_antony.milne_vvv_link_targets.md delete mode 100644 vizro-core/changelog.d/20241105_170003_antony.milne_new_interaction.md delete mode 100644 vizro-core/changelog.d/20241106_104745_antony.milne_dynamic_filter_2.md delete mode 100644 vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md delete mode 100644 vizro-core/changelog.d/20241112_120233_huong_li_nguyen_fix_404_page.md delete mode 100644 vizro-core/changelog.d/20241112_123240_nadija_ratkusic_graca_add_banner_to_demo_dashboards.md delete mode 100644 vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md rename vizro-core/changelog.d/{20241030_104644_antony.milne_0_1_26.md => 20241114_162322_antony.milne_0_1_27.md} (100%) delete mode 100644 vizro-core/schemas/0.1.27.dev0.json rename vizro-core/schemas/{0.1.26.json => 0.1.27.json} (100%) diff --git a/vizro-core/CHANGELOG.md b/vizro-core/CHANGELOG.md index d001e8da5..5a35b60dc 100644 --- a/vizro-core/CHANGELOG.md +++ b/vizro-core/CHANGELOG.md @@ -11,6 +11,20 @@ See the fragment files in the [changelog.d directory](https://github.com/mckinse + + +# 0.1.27 — 2024-11-14 + +## Changed + +- Improve performance of data loading. ([#850](https://github.com/mckinsey/vizro/pull/850), [#857](https://github.com/mckinsey/vizro/pull/857)) + +- Upper bound dependency `dash<3`. ([#877](https://github.com/mckinsey/vizro/pull/877)) + +## Fixed + +- Fix 404 error page and page flickering on refresh. ([#865](https://github.com/mckinsey/vizro/pull/865)) + # 0.1.26 — 2024-10-30 diff --git a/vizro-core/changelog.d/20241030_111845_runner.md b/vizro-core/changelog.d/20241030_111845_runner.md deleted file mode 100644 index 7c0d58d4f..000000000 --- a/vizro-core/changelog.d/20241030_111845_runner.md +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - diff --git a/vizro-core/changelog.d/20241030_170000_antony.milne_vvv_link_targets.md b/vizro-core/changelog.d/20241030_170000_antony.milne_vvv_link_targets.md deleted file mode 100644 index 7c0d58d4f..000000000 --- a/vizro-core/changelog.d/20241030_170000_antony.milne_vvv_link_targets.md +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - diff --git a/vizro-core/changelog.d/20241105_170003_antony.milne_new_interaction.md b/vizro-core/changelog.d/20241105_170003_antony.milne_new_interaction.md deleted file mode 100644 index 7c0d58d4f..000000000 --- a/vizro-core/changelog.d/20241105_170003_antony.milne_new_interaction.md +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - diff --git a/vizro-core/changelog.d/20241106_104745_antony.milne_dynamic_filter_2.md b/vizro-core/changelog.d/20241106_104745_antony.milne_dynamic_filter_2.md deleted file mode 100644 index 6108280fd..000000000 --- a/vizro-core/changelog.d/20241106_104745_antony.milne_dynamic_filter_2.md +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - -### Changed - -- Improve performance of data loading. ([#850](https://github.com/mckinsey/vizro/pull/850), [#857](https://github.com/mckinsey/vizro/pull/857)) - - - - diff --git a/vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md b/vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md deleted file mode 100644 index 7c0d58d4f..000000000 --- a/vizro-core/changelog.d/20241106_134102_alexey_snigir_pytest_warning_ignore.md +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - diff --git a/vizro-core/changelog.d/20241112_120233_huong_li_nguyen_fix_404_page.md b/vizro-core/changelog.d/20241112_120233_huong_li_nguyen_fix_404_page.md deleted file mode 100644 index 84c48938e..000000000 --- a/vizro-core/changelog.d/20241112_120233_huong_li_nguyen_fix_404_page.md +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -### Fixed - -- Fix 404 error page and page flickering on refresh ([#865](https://github.com/mckinsey/vizro/pull/865)). - - diff --git a/vizro-core/changelog.d/20241112_123240_nadija_ratkusic_graca_add_banner_to_demo_dashboards.md b/vizro-core/changelog.d/20241112_123240_nadija_ratkusic_graca_add_banner_to_demo_dashboards.md deleted file mode 100644 index 7c0d58d4f..000000000 --- a/vizro-core/changelog.d/20241112_123240_nadija_ratkusic_graca_add_banner_to_demo_dashboards.md +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - diff --git a/vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md b/vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md deleted file mode 100644 index c11c3a0e7..000000000 --- a/vizro-core/changelog.d/20241114_152933_antony.milne_cap_dash.md +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - -### Changed - -- Upper bound dependency `dash<3`. ([#877](https://github.com/mckinsey/vizro/pull/877)) - - - - diff --git a/vizro-core/changelog.d/20241030_104644_antony.milne_0_1_26.md b/vizro-core/changelog.d/20241114_162322_antony.milne_0_1_27.md similarity index 100% rename from vizro-core/changelog.d/20241030_104644_antony.milne_0_1_26.md rename to vizro-core/changelog.d/20241114_162322_antony.milne_0_1_27.md diff --git a/vizro-core/mkdocs.yml b/vizro-core/mkdocs.yml index bede305e6..7686be44e 100644 --- a/vizro-core/mkdocs.yml +++ b/vizro-core/mkdocs.yml @@ -112,7 +112,7 @@ markdown_extensions: kwds: type: vizro requirements: | - vizro==0.1.26 + vizro==0.1.27 - pymdownx.tabbed: alternate_style: true - pymdownx.mark diff --git a/vizro-core/schemas/0.1.27.dev0.json b/vizro-core/schemas/0.1.27.dev0.json deleted file mode 100644 index d5002ea1f..000000000 --- a/vizro-core/schemas/0.1.27.dev0.json +++ /dev/null @@ -1,1444 +0,0 @@ -{ - "title": "Dashboard", - "description": "Vizro Dashboard to be used within [`Vizro`][vizro._vizro.Vizro.build].\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 `\"\"`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "pages": { - "title": "Pages", - "type": "array", - "items": { - "$ref": "#/definitions/Page" - } - }, - "theme": { - "title": "Theme", - "description": "Layout theme to be applied across dashboard. Defaults to `vizro_dark`", - "default": "vizro_dark", - "enum": ["vizro_dark", "vizro_light"], - "type": "string" - }, - "navigation": { - "$ref": "#/definitions/Navigation" - }, - "title": { - "title": "Title", - "description": "Dashboard title to appear on every page on top left-side.", - "default": "", - "type": "string" - } - }, - "required": ["pages"], - "additionalProperties": false, - "definitions": { - "Action": { - "title": "Action", - "description": "Action to be inserted into `actions` of relevant component.\n\nArgs:\n function (CapturedCallable): Action function. See [`vizro.actions`][vizro.actions].\n inputs (list[str]): Inputs in the form `.` passed to the action function.\n Defaults to `[]`.\n outputs (list[str]): Outputs in the form `.` changed by the action function.\n Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "inputs": { - "title": "Inputs", - "description": "Inputs in the form `.` passed to the action function.", - "default": [], - "pattern": "^[^.]+[.][^.]+$", - "type": "array", - "items": { - "type": "string", - "pattern": "^[^.]+[.][^.]+$" - } - }, - "outputs": { - "title": "Outputs", - "description": "Outputs in the form `.` changed by the action function.", - "default": [], - "pattern": "^[^.]+[.][^.]+$", - "type": "array", - "items": { - "type": "string", - "pattern": "^[^.]+[.][^.]+$" - } - } - }, - "additionalProperties": false - }, - "AgGrid": { - "title": "AgGrid", - "description": "Wrapper for `dash-ag-grid.AgGrid` to visualize grids in dashboard.\n\nArgs:\n type (Literal[\"ag_grid\"]): Defaults to `\"ag_grid\"`.\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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "ag_grid", - "enum": ["ag_grid"], - "type": "string" - }, - "title": { - "title": "Title", - "description": "Title of the `AgGrid`", - "default": "", - "type": "string" - }, - "header": { - "title": "Header", - "description": "Markdown text positioned below the `AgGrid.title`. Follows the CommonMark specification. Ideal for adding supplementary information such as subtitles, descriptions, or additional context.", - "default": "", - "type": "string" - }, - "footer": { - "title": "Footer", - "description": "Markdown text positioned below the `AgGrid`. Follows the CommonMark specification. Ideal for providing further details such as sources, disclaimers, or additional notes.", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "Button": { - "title": "Button", - "description": "Component provided to `Page` to trigger any defined `action` in `Page`.\n\nArgs:\n type (Literal[\"button\"]): Defaults to `\"button\"`.\n text (str): Text to be displayed on button. Defaults to `\"Click me!\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "button", - "enum": ["button"], - "type": "string" - }, - "text": { - "title": "Text", - "description": "Text to be displayed on button.", - "default": "Click me!", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "Card": { - "title": "Card", - "description": "Creates a card utilizing `dcc.Markdown` as title and text component.\n\nArgs:\n type (Literal[\"card\"]): Defaults to `\"card\"`.\n text (str): Markdown string to create card title/text that should adhere to the CommonMark Spec.\n href (str): URL (relative or absolute) to navigate to. If not provided the Card serves as a text card\n only. Defaults to `\"\"`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "card", - "enum": ["card"], - "type": "string" - }, - "text": { - "title": "Text", - "description": "Markdown string to create card title/text that should adhere to the CommonMark Spec.", - "type": "string" - }, - "href": { - "title": "Href", - "description": "URL (relative or absolute) to navigate to. If not provided the Card serves as a text card only.", - "default": "", - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - }, - "Figure": { - "title": "Figure", - "description": "Creates a figure-like object that can be displayed in the dashboard and is reactive to controls.\n\nArgs:\n type (Literal[\"figure\"]): Defaults to `\"figure\"`.\n figure (CapturedCallable): Function that returns a figure-like object. See [`vizro.figures`][vizro.figures].", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "figure", - "enum": ["figure"], - "type": "string" - } - }, - "additionalProperties": false - }, - "Graph": { - "title": "Graph", - "description": "Wrapper for `dcc.Graph` to visualize charts in dashboard.\n\nArgs:\n type (Literal[\"graph\"]): Defaults to `\"graph\"`.\n figure (CapturedCallable): Function that returns a graph.\n See `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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "graph", - "enum": ["graph"], - "type": "string" - }, - "title": { - "title": "Title", - "description": "Title of the `Graph`", - "default": "", - "type": "string" - }, - "header": { - "title": "Header", - "description": "Markdown text positioned below the `Graph.title`. Follows the CommonMark specification. Ideal for adding supplementary information such as subtitles, descriptions, or additional context.", - "default": "", - "type": "string" - }, - "footer": { - "title": "Footer", - "description": "Markdown text positioned below the `Graph`. Follows the CommonMark specification. Ideal for providing further details such as sources, disclaimers, or additional notes.", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "Table": { - "title": "Table", - "description": "Wrapper for `dash_table.DataTable` to visualize tables in dashboard.\n\nArgs:\n type (Literal[\"table\"]): Defaults to `\"table\"`.\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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "table", - "enum": ["table"], - "type": "string" - }, - "title": { - "title": "Title", - "description": "Title of the `Table`", - "default": "", - "type": "string" - }, - "header": { - "title": "Header", - "description": "Markdown text positioned below the `Table.title`. Follows the CommonMark specification. Ideal for adding supplementary information such as subtitles, descriptions, or additional context.", - "default": "", - "type": "string" - }, - "footer": { - "title": "Footer", - "description": "Markdown text positioned below the `Table`. Follows the CommonMark specification. Ideal for providing further details such as sources, disclaimers, or additional notes.", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "Tabs": { - "title": "Tabs", - "description": "Tabs to group together a set of containers on a page.\n\nArgs:\n type (Literal[\"tabs\"]): Defaults to `\"tabs\"`.\n tabs (list[Container]): See [`Container`][vizro.models.Container].", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "tabs", - "enum": ["tabs"], - "type": "string" - }, - "tabs": { - "title": "Tabs", - "type": "array", - "items": { - "$ref": "#/definitions/Container" - } - } - }, - "required": ["tabs"], - "additionalProperties": false - }, - "Layout": { - "title": "Layout", - "description": "Grid specification to place chart/components on the [`Page`][vizro.models.Page].\n\nArgs:\n grid (list[list[int]]): Grid specification to arrange components on screen.\n row_gap (str): Gap between rows in px. Defaults to `\"12px\"`.\n col_gap (str): Gap between columns in px. Defaults to `\"12px\"`.\n row_min_height (str): Minimum row height in px. Defaults to `\"0px\"`.\n col_min_width (str): Minimum column width in px. Defaults to `\"0px\"`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "grid": { - "title": "Grid", - "description": "Grid specification to arrange components on screen.", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "row_gap": { - "title": "Row Gap", - "description": "Gap between rows in px. Defaults to 12px.", - "default": "24px", - "pattern": "[0-9]+px", - "type": "string" - }, - "col_gap": { - "title": "Col Gap", - "description": "Gap between columns in px. Defaults to 12px.", - "default": "24px", - "pattern": "[0-9]+px", - "type": "string" - }, - "row_min_height": { - "title": "Row Min Height", - "description": "Minimum row height in px. Defaults to 0px.", - "default": "0px", - "pattern": "[0-9]+px", - "type": "string" - }, - "col_min_width": { - "title": "Col Min Width", - "description": "Minimum column width in px. Defaults to 0px.", - "default": "0px", - "pattern": "[0-9]+px", - "type": "string" - } - }, - "required": ["grid"], - "additionalProperties": false - }, - "Container": { - "title": "Container", - "description": "Container to group together a set of components on a page.\n\nArgs:\n type (Literal[\"container\"]): Defaults to `\"container\"`.\n components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component\n has to be provided.\n title (str): Title to be displayed.\n layout (Layout): Layout to place components in. Defaults to `None`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "container", - "enum": ["container"], - "type": "string" - }, - "components": { - "title": "Components", - "type": "array", - "items": { - "discriminator": { - "propertyName": "type", - "mapping": { - "ag_grid": "#/definitions/AgGrid", - "button": "#/definitions/Button", - "card": "#/definitions/Card", - "container": "#/definitions/Container", - "figure": "#/definitions/Figure", - "graph": "#/definitions/Graph", - "table": "#/definitions/Table", - "tabs": "#/definitions/Tabs" - } - }, - "oneOf": [ - { - "$ref": "#/definitions/AgGrid" - }, - { - "$ref": "#/definitions/Button" - }, - { - "$ref": "#/definitions/Card" - }, - { - "$ref": "#/definitions/Container" - }, - { - "$ref": "#/definitions/Figure" - }, - { - "$ref": "#/definitions/Graph" - }, - { - "$ref": "#/definitions/Table" - }, - { - "$ref": "#/definitions/Tabs" - } - ] - } - }, - "title": { - "title": "Title", - "description": "Title to be displayed.", - "type": "string" - }, - "layout": { - "$ref": "#/definitions/Layout" - } - }, - "required": ["components", "title"], - "additionalProperties": false - }, - "OptionsDictType": { - "title": "OptionsDictType", - "type": "object", - "properties": { - "label": { - "title": "Label", - "type": "string" - }, - "value": { - "title": "Value", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "string", - "format": "date" - } - ] - } - }, - "required": ["label", "value"], - "additionalProperties": false - }, - "Checklist": { - "title": "Checklist", - "description": "Categorical multi-option selector `Checklist`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.Checklist`](https://dash.plotly.com/dash-core-components/checklist).\n\nArgs:\n type (Literal[\"checklist\"]): Defaults to `\"checklist\"`.\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (Optional[MultiValueType]): See [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "checklist", - "enum": ["checklist"], - "type": "string" - }, - "options": { - "title": "Options", - "default": [], - "anyOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "date" - } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/OptionsDictType" - } - } - ] - }, - "value": { - "title": "Value", - "anyOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "date" - } - } - ] - }, - "title": { - "title": "Title", - "description": "Title to be displayed", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "DatePicker": { - "title": "DatePicker", - "description": "Temporal single/range option selector `DatePicker`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\nBased on the underlying [`dmc.DatePicker`](https://www.dash-mantine-components.com/components/datepicker) or\n[`dmc.DateRangePicker`](https://www.dash-mantine-components.com/components/datepicker#daterangepicker).\n\nArgs:\n type (Literal[\"date_picker\"]): Defaults to `\"date_picker\"`.\n min (Optional[date]): Start date for date picker. Defaults to `None`.\n max (Optional[date]): End date for date picker. Defaults to `None`.\n value (Union[list[date], date]): 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. Default to `True`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "date_picker", - "enum": ["date_picker"], - "type": "string" - }, - "min": { - "title": "Min", - "description": "Start date for date picker.", - "type": "string", - "format": "date" - }, - "max": { - "title": "Max", - "description": "End date for date picker.", - "type": "string", - "format": "date" - }, - "value": { - "title": "Value", - "description": "Default date for date picker", - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "format": "date" - } - }, - { - "type": "string", - "format": "date" - } - ] - }, - "title": { - "title": "Title", - "description": "Title to be displayed.", - "default": "", - "type": "string" - }, - "range": { - "title": "Range", - "description": "Boolean flag for displaying range picker.", - "default": true, - "type": "boolean" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "Dropdown": { - "title": "Dropdown", - "description": "Categorical single/multi-option selector `Dropdown`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.Dropdown`](https://dash.plotly.com/dash-core-components/dropdown).\n\nArgs:\n type (Literal[\"dropdown\"]): Defaults to `\"dropdown\"`.\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (Optional[Union[SingleValueType, MultiValueType]]): 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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "dropdown", - "enum": ["dropdown"], - "type": "string" - }, - "options": { - "title": "Options", - "default": [], - "anyOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "date" - } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/OptionsDictType" - } - } - ] - }, - "value": { - "title": "Value", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "string", - "format": "date" - }, - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "date" - } - } - ] - }, - "multi": { - "title": "Multi", - "description": "Whether to allow selection of multiple values", - "default": true, - "type": "boolean" - }, - "title": { - "title": "Title", - "description": "Title to be displayed", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "RadioItems": { - "title": "RadioItems", - "description": "Categorical single-option selector `RadioItems`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.RadioItems`](https://dash.plotly.com/dash-core-components/radioitems).\n\nArgs:\n type (Literal[\"radio_items\"]): Defaults to `\"radio_items\"`.\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (Optional[SingleValueType]): See [`SingleValueType`][vizro.models.types.SingleValueType].\n Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "radio_items", - "enum": ["radio_items"], - "type": "string" - }, - "options": { - "title": "Options", - "default": [], - "anyOf": [ - { - "type": "array", - "items": { - "type": "boolean" - } - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "type": "string", - "format": "date" - } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/OptionsDictType" - } - } - ] - }, - "value": { - "title": "Value", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "string", - "format": "date" - } - ] - }, - "title": { - "title": "Title", - "description": "Title to be displayed", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "RangeSlider": { - "title": "RangeSlider", - "description": "Numeric multi-option selector `RangeSlider`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.RangeSlider`](https://dash.plotly.com/dash-core-components/rangeslider).\n\nArgs:\n type (Literal[\"range_slider\"]): Defaults to `\"range_slider\"`.\n min (Optional[float]): Start value for slider. Defaults to `None`.\n max (Optional[float]): End value for slider. Defaults to `None`.\n step (Optional[float]): Step-size for marks on slider. Defaults to `None`.\n marks (Optional[dict[int, Union[str, dict]]]): Marks to be displayed on slider. Defaults to `{}`.\n value (Optional[list[float]]): Default start and end value for slider. Must be 2 items. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "range_slider", - "enum": ["range_slider"], - "type": "string" - }, - "min": { - "title": "Min", - "description": "Start value for slider.", - "type": "number" - }, - "max": { - "title": "Max", - "description": "End value for slider.", - "type": "number" - }, - "step": { - "title": "Step", - "description": "Step-size for marks on slider.", - "type": "number" - }, - "marks": { - "title": "Marks", - "description": "Marks to be displayed on slider.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "value": { - "title": "Value", - "description": "Default start and end value for slider", - "minItems": 2, - "maxItems": 2, - "type": "array", - "items": { - "type": "number" - } - }, - "title": { - "title": "Title", - "description": "Title to be displayed.", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "Slider": { - "title": "Slider", - "description": "Numeric single-option selector `Slider`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.Slider`](https://dash.plotly.com/dash-core-components/slider).\n\nArgs:\n type (Literal[\"range_slider\"]): Defaults to `\"range_slider\"`.\n min (Optional[float]): Start value for slider. Defaults to `None`.\n max (Optional[float]): End value for slider. Defaults to `None`.\n step (Optional[float]): Step-size for marks on slider. Defaults to `None`.\n marks (Optional[dict[int, Union[str, dict]]]): Marks to be displayed on slider. Defaults to `{}`.\n value (Optional[float]): Default value for slider. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "slider", - "enum": ["slider"], - "type": "string" - }, - "min": { - "title": "Min", - "description": "Start value for slider.", - "type": "number" - }, - "max": { - "title": "Max", - "description": "End value for slider.", - "type": "number" - }, - "step": { - "title": "Step", - "description": "Step-size for marks on slider.", - "type": "number" - }, - "marks": { - "title": "Marks", - "description": "Marks to be displayed on slider.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "value": { - "title": "Value", - "description": "Default value for slider.", - "type": "number" - }, - "title": { - "title": "Title", - "description": "Title to be displayed.", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "additionalProperties": false - }, - "Filter": { - "title": "Filter", - "description": "Filter the data supplied to `targets` on the [`Page`][vizro.models.Page].\n\nExamples:\n >>> print(repr(Filter(column=\"species\")))\n\nArgs:\n type (Literal[\"filter\"]): Defaults to `\"filter\"`.\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`.\n selector (SelectorType): See [SelectorType][vizro.models.types.SelectorType]. Defaults to `None`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "filter", - "enum": ["filter"], - "type": "string" - }, - "column": { - "title": "Column", - "description": "Column of DataFrame to filter.", - "type": "string" - }, - "targets": { - "title": "Targets", - "description": "Target component to be affected by filter. If none are given then target all components on the page that use `column`.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "selector": { - "title": "Selector", - "description": "Selectors to be used inside a control.", - "discriminator": { - "propertyName": "type", - "mapping": { - "checklist": "#/definitions/Checklist", - "date_picker": "#/definitions/DatePicker", - "dropdown": "#/definitions/Dropdown", - "radio_items": "#/definitions/RadioItems", - "range_slider": "#/definitions/RangeSlider", - "slider": "#/definitions/Slider" - } - }, - "oneOf": [ - { - "$ref": "#/definitions/Checklist" - }, - { - "$ref": "#/definitions/DatePicker" - }, - { - "$ref": "#/definitions/Dropdown" - }, - { - "$ref": "#/definitions/RadioItems" - }, - { - "$ref": "#/definitions/RangeSlider" - }, - { - "$ref": "#/definitions/Slider" - } - ] - } - }, - "required": ["column"], - "additionalProperties": false - }, - "Parameter": { - "title": "Parameter", - "description": "Alter the arguments supplied to any `targets` on the [`Page`][vizro.models.Page].\n\nExamples:\n >>> Parameter(targets=[\"scatter.x\"], selector=Slider(min=0, max=1, default=0.8, title=\"Bubble opacity\"))\n\nArgs:\n type (Literal[\"parameter\"]): Defaults to `\"parameter\"`.\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.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "parameter", - "enum": ["parameter"], - "type": "string" - }, - "targets": { - "title": "Targets", - "description": "Targets in the form of `.`.", - "type": "array", - "items": { - "type": "string" - } - }, - "selector": { - "title": "Selector", - "description": "Selectors to be used inside a control.", - "discriminator": { - "propertyName": "type", - "mapping": { - "checklist": "#/definitions/Checklist", - "date_picker": "#/definitions/DatePicker", - "dropdown": "#/definitions/Dropdown", - "radio_items": "#/definitions/RadioItems", - "range_slider": "#/definitions/RangeSlider", - "slider": "#/definitions/Slider" - } - }, - "oneOf": [ - { - "$ref": "#/definitions/Checklist" - }, - { - "$ref": "#/definitions/DatePicker" - }, - { - "$ref": "#/definitions/Dropdown" - }, - { - "$ref": "#/definitions/RadioItems" - }, - { - "$ref": "#/definitions/RangeSlider" - }, - { - "$ref": "#/definitions/Slider" - } - ] - } - }, - "required": ["targets", "selector"], - "additionalProperties": false - }, - "ActionsChain": { - "title": "ActionsChain", - "description": "All models that are registered to the model manager should inherit from this class.\n\nArgs:\n id (str): ID to identify model. Must be unique throughout the whole dashboard. Defaults to `\"\"`.\n When no ID is chosen, ID will be automatically generated.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "trigger": { - "title": "Trigger", - "type": "array", - "items": [ - { - "title": "Component Id", - "type": "string" - }, - { - "title": "Component Property", - "type": "string" - } - ], - "minItems": 2, - "maxItems": 2 - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/Action" - } - } - }, - "required": ["trigger"], - "additionalProperties": false - }, - "Page": { - "title": "Page", - "description": "A page in [`Dashboard`][vizro.models.Dashboard] with its own URL path and place in the `Navigation`.\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 to be displayed.\n description (str): Description for meta tags.\n layout (Layout): Layout to place components in. 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 `\"\"`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "components": { - "title": "Components", - "type": "array", - "items": { - "discriminator": { - "propertyName": "type", - "mapping": { - "ag_grid": "#/definitions/AgGrid", - "button": "#/definitions/Button", - "card": "#/definitions/Card", - "container": "#/definitions/Container", - "figure": "#/definitions/Figure", - "graph": "#/definitions/Graph", - "table": "#/definitions/Table", - "tabs": "#/definitions/Tabs" - } - }, - "oneOf": [ - { - "$ref": "#/definitions/AgGrid" - }, - { - "$ref": "#/definitions/Button" - }, - { - "$ref": "#/definitions/Card" - }, - { - "$ref": "#/definitions/Container" - }, - { - "$ref": "#/definitions/Figure" - }, - { - "$ref": "#/definitions/Graph" - }, - { - "$ref": "#/definitions/Table" - }, - { - "$ref": "#/definitions/Tabs" - } - ] - } - }, - "title": { - "title": "Title", - "description": "Title to be displayed.", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Description for meta tags.", - "default": "", - "type": "string" - }, - "layout": { - "$ref": "#/definitions/Layout" - }, - "controls": { - "title": "Controls", - "default": [], - "type": "array", - "items": { - "discriminator": { - "propertyName": "type", - "mapping": { - "filter": "#/definitions/Filter", - "parameter": "#/definitions/Parameter" - } - }, - "oneOf": [ - { - "$ref": "#/definitions/Filter" - }, - { - "$ref": "#/definitions/Parameter" - } - ] - } - }, - "path": { - "title": "Path", - "description": "Path to navigate to page.", - "default": "", - "type": "string" - }, - "actions": { - "title": "Actions", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/ActionsChain" - } - } - }, - "required": ["components", "title"], - "additionalProperties": false - }, - "Accordion": { - "title": "Accordion", - "description": "Accordion to be used as nav_selector in [`Navigation`][vizro.models.Navigation].\n\nArgs:\n type (Literal[\"accordion\"]): Defaults to `\"accordion\"`.\n pages (dict[str, list[str]]): Mapping from name of a pages group to a list of page IDs. Defaults to `{}`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "accordion", - "enum": ["accordion"], - "type": "string" - }, - "pages": { - "title": "Pages", - "description": "Mapping from name of a pages group to a list of page IDs.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - "NavLink": { - "title": "NavLink", - "description": "Icon that serves as a navigation link to be used in navigation bar of Dashboard.\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 `\"\"`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "pages": { - "title": "Pages", - "default": [], - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - ] - }, - "label": { - "title": "Label", - "description": "Text description of the icon for use in tooltip.", - "type": "string" - }, - "icon": { - "title": "Icon", - "description": "Icon name from Google Material icons library.", - "default": "", - "type": "string" - } - }, - "required": ["label"], - "additionalProperties": false - }, - "NavBar": { - "title": "NavBar", - "description": "Navigation bar to be used as a nav_selector for `Navigation`.\n\nArgs:\n type (Literal[\"nav_bar\"]): Defaults to `\"nav_bar\"`.\n pages (dict[str, list[str]]): Mapping from name of a pages group to a list of page IDs. Defaults to `{}`.\n items (list[NavLink]): See [`NavLink`][vizro.models.NavLink]. Defaults to `[]`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "type": { - "title": "Type", - "default": "nav_bar", - "enum": ["nav_bar"], - "type": "string" - }, - "pages": { - "title": "Pages", - "description": "Mapping from name of a pages group to a list of page IDs.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "items": { - "title": "Items", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/NavLink" - } - } - }, - "additionalProperties": false - }, - "Navigation": { - "title": "Navigation", - "description": "Navigation in [`Dashboard`][vizro.models.Dashboard] to structure [`Pages`][vizro.models.Page].\n\nArgs:\n pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.\n nav_selector (NavSelectorType): See [`NavSelectorType`][vizro.models.types.NavSelectorType].\n Defaults to `None`.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", - "default": "", - "type": "string" - }, - "pages": { - "title": "Pages", - "default": [], - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - ] - }, - "nav_selector": { - "title": "Nav Selector", - "anyOf": [ - { - "$ref": "#/definitions/Accordion" - }, - { - "$ref": "#/definitions/NavBar" - } - ] - } - }, - "additionalProperties": false - } - } -} diff --git a/vizro-core/schemas/0.1.26.json b/vizro-core/schemas/0.1.27.json similarity index 100% rename from vizro-core/schemas/0.1.26.json rename to vizro-core/schemas/0.1.27.json diff --git a/vizro-core/src/vizro/__init__.py b/vizro-core/src/vizro/__init__.py index e10f21fb0..0226de6f1 100644 --- a/vizro-core/src/vizro/__init__.py +++ b/vizro-core/src/vizro/__init__.py @@ -14,7 +14,7 @@ __all__ = ["Vizro"] -__version__ = "0.1.27.dev0" +__version__ = "0.1.27" # For the below _css_dist and _js_dist to be used by Dash, they must be retrieved by dash.resources.Css.get_all_css(). From c80b359b20448c300f37f0039112d8d493ef9fa7 Mon Sep 17 00:00:00 2001 From: Vizro Team <145135826+vizro-svc@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:06:01 +0000 Subject: [PATCH 5/5] [Release] Bump vizro-core to 0.1.28.dev0 [skip ci] --- .../changelog.d/20241114_170413_runner.md | 48 + vizro-core/schemas/0.1.28.dev0.json | 1444 +++++++++++++++++ vizro-core/src/vizro/__init__.py | 2 +- 3 files changed, 1493 insertions(+), 1 deletion(-) create mode 100644 vizro-core/changelog.d/20241114_170413_runner.md create mode 100644 vizro-core/schemas/0.1.28.dev0.json diff --git a/vizro-core/changelog.d/20241114_170413_runner.md b/vizro-core/changelog.d/20241114_170413_runner.md new file mode 100644 index 000000000..7c0d58d4f --- /dev/null +++ b/vizro-core/changelog.d/20241114_170413_runner.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-core/schemas/0.1.28.dev0.json b/vizro-core/schemas/0.1.28.dev0.json new file mode 100644 index 000000000..d5002ea1f --- /dev/null +++ b/vizro-core/schemas/0.1.28.dev0.json @@ -0,0 +1,1444 @@ +{ + "title": "Dashboard", + "description": "Vizro Dashboard to be used within [`Vizro`][vizro._vizro.Vizro.build].\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 `\"\"`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "array", + "items": { + "$ref": "#/definitions/Page" + } + }, + "theme": { + "title": "Theme", + "description": "Layout theme to be applied across dashboard. Defaults to `vizro_dark`", + "default": "vizro_dark", + "enum": ["vizro_dark", "vizro_light"], + "type": "string" + }, + "navigation": { + "$ref": "#/definitions/Navigation" + }, + "title": { + "title": "Title", + "description": "Dashboard title to appear on every page on top left-side.", + "default": "", + "type": "string" + } + }, + "required": ["pages"], + "additionalProperties": false, + "definitions": { + "Action": { + "title": "Action", + "description": "Action to be inserted into `actions` of relevant component.\n\nArgs:\n function (CapturedCallable): Action function. See [`vizro.actions`][vizro.actions].\n inputs (list[str]): Inputs in the form `.` passed to the action function.\n Defaults to `[]`.\n outputs (list[str]): Outputs in the form `.` changed by the action function.\n Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "inputs": { + "title": "Inputs", + "description": "Inputs in the form `.` passed to the action function.", + "default": [], + "pattern": "^[^.]+[.][^.]+$", + "type": "array", + "items": { + "type": "string", + "pattern": "^[^.]+[.][^.]+$" + } + }, + "outputs": { + "title": "Outputs", + "description": "Outputs in the form `.` changed by the action function.", + "default": [], + "pattern": "^[^.]+[.][^.]+$", + "type": "array", + "items": { + "type": "string", + "pattern": "^[^.]+[.][^.]+$" + } + } + }, + "additionalProperties": false + }, + "AgGrid": { + "title": "AgGrid", + "description": "Wrapper for `dash-ag-grid.AgGrid` to visualize grids in dashboard.\n\nArgs:\n type (Literal[\"ag_grid\"]): Defaults to `\"ag_grid\"`.\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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "ag_grid", + "enum": ["ag_grid"], + "type": "string" + }, + "title": { + "title": "Title", + "description": "Title of the `AgGrid`", + "default": "", + "type": "string" + }, + "header": { + "title": "Header", + "description": "Markdown text positioned below the `AgGrid.title`. Follows the CommonMark specification. Ideal for adding supplementary information such as subtitles, descriptions, or additional context.", + "default": "", + "type": "string" + }, + "footer": { + "title": "Footer", + "description": "Markdown text positioned below the `AgGrid`. Follows the CommonMark specification. Ideal for providing further details such as sources, disclaimers, or additional notes.", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "Button": { + "title": "Button", + "description": "Component provided to `Page` to trigger any defined `action` in `Page`.\n\nArgs:\n type (Literal[\"button\"]): Defaults to `\"button\"`.\n text (str): Text to be displayed on button. Defaults to `\"Click me!\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "button", + "enum": ["button"], + "type": "string" + }, + "text": { + "title": "Text", + "description": "Text to be displayed on button.", + "default": "Click me!", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "Card": { + "title": "Card", + "description": "Creates a card utilizing `dcc.Markdown` as title and text component.\n\nArgs:\n type (Literal[\"card\"]): Defaults to `\"card\"`.\n text (str): Markdown string to create card title/text that should adhere to the CommonMark Spec.\n href (str): URL (relative or absolute) to navigate to. If not provided the Card serves as a text card\n only. Defaults to `\"\"`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "card", + "enum": ["card"], + "type": "string" + }, + "text": { + "title": "Text", + "description": "Markdown string to create card title/text that should adhere to the CommonMark Spec.", + "type": "string" + }, + "href": { + "title": "Href", + "description": "URL (relative or absolute) to navigate to. If not provided the Card serves as a text card only.", + "default": "", + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + }, + "Figure": { + "title": "Figure", + "description": "Creates a figure-like object that can be displayed in the dashboard and is reactive to controls.\n\nArgs:\n type (Literal[\"figure\"]): Defaults to `\"figure\"`.\n figure (CapturedCallable): Function that returns a figure-like object. See [`vizro.figures`][vizro.figures].", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "figure", + "enum": ["figure"], + "type": "string" + } + }, + "additionalProperties": false + }, + "Graph": { + "title": "Graph", + "description": "Wrapper for `dcc.Graph` to visualize charts in dashboard.\n\nArgs:\n type (Literal[\"graph\"]): Defaults to `\"graph\"`.\n figure (CapturedCallable): Function that returns a graph.\n See `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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "graph", + "enum": ["graph"], + "type": "string" + }, + "title": { + "title": "Title", + "description": "Title of the `Graph`", + "default": "", + "type": "string" + }, + "header": { + "title": "Header", + "description": "Markdown text positioned below the `Graph.title`. Follows the CommonMark specification. Ideal for adding supplementary information such as subtitles, descriptions, or additional context.", + "default": "", + "type": "string" + }, + "footer": { + "title": "Footer", + "description": "Markdown text positioned below the `Graph`. Follows the CommonMark specification. Ideal for providing further details such as sources, disclaimers, or additional notes.", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "Table": { + "title": "Table", + "description": "Wrapper for `dash_table.DataTable` to visualize tables in dashboard.\n\nArgs:\n type (Literal[\"table\"]): Defaults to `\"table\"`.\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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "table", + "enum": ["table"], + "type": "string" + }, + "title": { + "title": "Title", + "description": "Title of the `Table`", + "default": "", + "type": "string" + }, + "header": { + "title": "Header", + "description": "Markdown text positioned below the `Table.title`. Follows the CommonMark specification. Ideal for adding supplementary information such as subtitles, descriptions, or additional context.", + "default": "", + "type": "string" + }, + "footer": { + "title": "Footer", + "description": "Markdown text positioned below the `Table`. Follows the CommonMark specification. Ideal for providing further details such as sources, disclaimers, or additional notes.", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "Tabs": { + "title": "Tabs", + "description": "Tabs to group together a set of containers on a page.\n\nArgs:\n type (Literal[\"tabs\"]): Defaults to `\"tabs\"`.\n tabs (list[Container]): See [`Container`][vizro.models.Container].", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "tabs", + "enum": ["tabs"], + "type": "string" + }, + "tabs": { + "title": "Tabs", + "type": "array", + "items": { + "$ref": "#/definitions/Container" + } + } + }, + "required": ["tabs"], + "additionalProperties": false + }, + "Layout": { + "title": "Layout", + "description": "Grid specification to place chart/components on the [`Page`][vizro.models.Page].\n\nArgs:\n grid (list[list[int]]): Grid specification to arrange components on screen.\n row_gap (str): Gap between rows in px. Defaults to `\"12px\"`.\n col_gap (str): Gap between columns in px. Defaults to `\"12px\"`.\n row_min_height (str): Minimum row height in px. Defaults to `\"0px\"`.\n col_min_width (str): Minimum column width in px. Defaults to `\"0px\"`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "grid": { + "title": "Grid", + "description": "Grid specification to arrange components on screen.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "row_gap": { + "title": "Row Gap", + "description": "Gap between rows in px. Defaults to 12px.", + "default": "24px", + "pattern": "[0-9]+px", + "type": "string" + }, + "col_gap": { + "title": "Col Gap", + "description": "Gap between columns in px. Defaults to 12px.", + "default": "24px", + "pattern": "[0-9]+px", + "type": "string" + }, + "row_min_height": { + "title": "Row Min Height", + "description": "Minimum row height in px. Defaults to 0px.", + "default": "0px", + "pattern": "[0-9]+px", + "type": "string" + }, + "col_min_width": { + "title": "Col Min Width", + "description": "Minimum column width in px. Defaults to 0px.", + "default": "0px", + "pattern": "[0-9]+px", + "type": "string" + } + }, + "required": ["grid"], + "additionalProperties": false + }, + "Container": { + "title": "Container", + "description": "Container to group together a set of components on a page.\n\nArgs:\n type (Literal[\"container\"]): Defaults to `\"container\"`.\n components (list[ComponentType]): See [ComponentType][vizro.models.types.ComponentType]. At least one component\n has to be provided.\n title (str): Title to be displayed.\n layout (Layout): Layout to place components in. Defaults to `None`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "container", + "enum": ["container"], + "type": "string" + }, + "components": { + "title": "Components", + "type": "array", + "items": { + "discriminator": { + "propertyName": "type", + "mapping": { + "ag_grid": "#/definitions/AgGrid", + "button": "#/definitions/Button", + "card": "#/definitions/Card", + "container": "#/definitions/Container", + "figure": "#/definitions/Figure", + "graph": "#/definitions/Graph", + "table": "#/definitions/Table", + "tabs": "#/definitions/Tabs" + } + }, + "oneOf": [ + { + "$ref": "#/definitions/AgGrid" + }, + { + "$ref": "#/definitions/Button" + }, + { + "$ref": "#/definitions/Card" + }, + { + "$ref": "#/definitions/Container" + }, + { + "$ref": "#/definitions/Figure" + }, + { + "$ref": "#/definitions/Graph" + }, + { + "$ref": "#/definitions/Table" + }, + { + "$ref": "#/definitions/Tabs" + } + ] + } + }, + "title": { + "title": "Title", + "description": "Title to be displayed.", + "type": "string" + }, + "layout": { + "$ref": "#/definitions/Layout" + } + }, + "required": ["components", "title"], + "additionalProperties": false + }, + "OptionsDictType": { + "title": "OptionsDictType", + "type": "object", + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "value": { + "title": "Value", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "string", + "format": "date" + } + ] + } + }, + "required": ["label", "value"], + "additionalProperties": false + }, + "Checklist": { + "title": "Checklist", + "description": "Categorical multi-option selector `Checklist`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.Checklist`](https://dash.plotly.com/dash-core-components/checklist).\n\nArgs:\n type (Literal[\"checklist\"]): Defaults to `\"checklist\"`.\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (Optional[MultiValueType]): See [`MultiValueType`][vizro.models.types.MultiValueType]. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "checklist", + "enum": ["checklist"], + "type": "string" + }, + "options": { + "title": "Options", + "default": [], + "anyOf": [ + { + "type": "array", + "items": { + "type": "boolean" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "string", + "format": "date" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/OptionsDictType" + } + } + ] + }, + "value": { + "title": "Value", + "anyOf": [ + { + "type": "array", + "items": { + "type": "boolean" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "string", + "format": "date" + } + } + ] + }, + "title": { + "title": "Title", + "description": "Title to be displayed", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "DatePicker": { + "title": "DatePicker", + "description": "Temporal single/range option selector `DatePicker`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or [`Parameter`][vizro.models.Parameter].\nBased on the underlying [`dmc.DatePicker`](https://www.dash-mantine-components.com/components/datepicker) or\n[`dmc.DateRangePicker`](https://www.dash-mantine-components.com/components/datepicker#daterangepicker).\n\nArgs:\n type (Literal[\"date_picker\"]): Defaults to `\"date_picker\"`.\n min (Optional[date]): Start date for date picker. Defaults to `None`.\n max (Optional[date]): End date for date picker. Defaults to `None`.\n value (Union[list[date], date]): 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. Default to `True`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "date_picker", + "enum": ["date_picker"], + "type": "string" + }, + "min": { + "title": "Min", + "description": "Start date for date picker.", + "type": "string", + "format": "date" + }, + "max": { + "title": "Max", + "description": "End date for date picker.", + "type": "string", + "format": "date" + }, + "value": { + "title": "Value", + "description": "Default date for date picker", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "format": "date" + } + }, + { + "type": "string", + "format": "date" + } + ] + }, + "title": { + "title": "Title", + "description": "Title to be displayed.", + "default": "", + "type": "string" + }, + "range": { + "title": "Range", + "description": "Boolean flag for displaying range picker.", + "default": true, + "type": "boolean" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "Dropdown": { + "title": "Dropdown", + "description": "Categorical single/multi-option selector `Dropdown`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.Dropdown`](https://dash.plotly.com/dash-core-components/dropdown).\n\nArgs:\n type (Literal[\"dropdown\"]): Defaults to `\"dropdown\"`.\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (Optional[Union[SingleValueType, MultiValueType]]): 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 actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "dropdown", + "enum": ["dropdown"], + "type": "string" + }, + "options": { + "title": "Options", + "default": [], + "anyOf": [ + { + "type": "array", + "items": { + "type": "boolean" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "string", + "format": "date" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/OptionsDictType" + } + } + ] + }, + "value": { + "title": "Value", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "string", + "format": "date" + }, + { + "type": "array", + "items": { + "type": "boolean" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "string", + "format": "date" + } + } + ] + }, + "multi": { + "title": "Multi", + "description": "Whether to allow selection of multiple values", + "default": true, + "type": "boolean" + }, + "title": { + "title": "Title", + "description": "Title to be displayed", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "RadioItems": { + "title": "RadioItems", + "description": "Categorical single-option selector `RadioItems`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.RadioItems`](https://dash.plotly.com/dash-core-components/radioitems).\n\nArgs:\n type (Literal[\"radio_items\"]): Defaults to `\"radio_items\"`.\n options (OptionsType): See [`OptionsType`][vizro.models.types.OptionsType]. Defaults to `[]`.\n value (Optional[SingleValueType]): See [`SingleValueType`][vizro.models.types.SingleValueType].\n Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "radio_items", + "enum": ["radio_items"], + "type": "string" + }, + "options": { + "title": "Options", + "default": [], + "anyOf": [ + { + "type": "array", + "items": { + "type": "boolean" + } + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "string", + "format": "date" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/OptionsDictType" + } + } + ] + }, + "value": { + "title": "Value", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "string", + "format": "date" + } + ] + }, + "title": { + "title": "Title", + "description": "Title to be displayed", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "RangeSlider": { + "title": "RangeSlider", + "description": "Numeric multi-option selector `RangeSlider`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.RangeSlider`](https://dash.plotly.com/dash-core-components/rangeslider).\n\nArgs:\n type (Literal[\"range_slider\"]): Defaults to `\"range_slider\"`.\n min (Optional[float]): Start value for slider. Defaults to `None`.\n max (Optional[float]): End value for slider. Defaults to `None`.\n step (Optional[float]): Step-size for marks on slider. Defaults to `None`.\n marks (Optional[dict[int, Union[str, dict]]]): Marks to be displayed on slider. Defaults to `{}`.\n value (Optional[list[float]]): Default start and end value for slider. Must be 2 items. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "range_slider", + "enum": ["range_slider"], + "type": "string" + }, + "min": { + "title": "Min", + "description": "Start value for slider.", + "type": "number" + }, + "max": { + "title": "Max", + "description": "End value for slider.", + "type": "number" + }, + "step": { + "title": "Step", + "description": "Step-size for marks on slider.", + "type": "number" + }, + "marks": { + "title": "Marks", + "description": "Marks to be displayed on slider.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "value": { + "title": "Value", + "description": "Default start and end value for slider", + "minItems": 2, + "maxItems": 2, + "type": "array", + "items": { + "type": "number" + } + }, + "title": { + "title": "Title", + "description": "Title to be displayed.", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "Slider": { + "title": "Slider", + "description": "Numeric single-option selector `Slider`.\n\nCan be provided to [`Filter`][vizro.models.Filter] or\n[`Parameter`][vizro.models.Parameter]. Based on the underlying\n[`dcc.Slider`](https://dash.plotly.com/dash-core-components/slider).\n\nArgs:\n type (Literal[\"range_slider\"]): Defaults to `\"range_slider\"`.\n min (Optional[float]): Start value for slider. Defaults to `None`.\n max (Optional[float]): End value for slider. Defaults to `None`.\n step (Optional[float]): Step-size for marks on slider. Defaults to `None`.\n marks (Optional[dict[int, Union[str, dict]]]): Marks to be displayed on slider. Defaults to `{}`.\n value (Optional[float]): Default value for slider. Defaults to `None`.\n title (str): Title to be displayed. Defaults to `\"\"`.\n actions (list[Action]): See [`Action`][vizro.models.Action]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "slider", + "enum": ["slider"], + "type": "string" + }, + "min": { + "title": "Min", + "description": "Start value for slider.", + "type": "number" + }, + "max": { + "title": "Max", + "description": "End value for slider.", + "type": "number" + }, + "step": { + "title": "Step", + "description": "Step-size for marks on slider.", + "type": "number" + }, + "marks": { + "title": "Marks", + "description": "Marks to be displayed on slider.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "value": { + "title": "Value", + "description": "Default value for slider.", + "type": "number" + }, + "title": { + "title": "Title", + "description": "Title to be displayed.", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "additionalProperties": false + }, + "Filter": { + "title": "Filter", + "description": "Filter the data supplied to `targets` on the [`Page`][vizro.models.Page].\n\nExamples:\n >>> print(repr(Filter(column=\"species\")))\n\nArgs:\n type (Literal[\"filter\"]): Defaults to `\"filter\"`.\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`.\n selector (SelectorType): See [SelectorType][vizro.models.types.SelectorType]. Defaults to `None`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "filter", + "enum": ["filter"], + "type": "string" + }, + "column": { + "title": "Column", + "description": "Column of DataFrame to filter.", + "type": "string" + }, + "targets": { + "title": "Targets", + "description": "Target component to be affected by filter. If none are given then target all components on the page that use `column`.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "selector": { + "title": "Selector", + "description": "Selectors to be used inside a control.", + "discriminator": { + "propertyName": "type", + "mapping": { + "checklist": "#/definitions/Checklist", + "date_picker": "#/definitions/DatePicker", + "dropdown": "#/definitions/Dropdown", + "radio_items": "#/definitions/RadioItems", + "range_slider": "#/definitions/RangeSlider", + "slider": "#/definitions/Slider" + } + }, + "oneOf": [ + { + "$ref": "#/definitions/Checklist" + }, + { + "$ref": "#/definitions/DatePicker" + }, + { + "$ref": "#/definitions/Dropdown" + }, + { + "$ref": "#/definitions/RadioItems" + }, + { + "$ref": "#/definitions/RangeSlider" + }, + { + "$ref": "#/definitions/Slider" + } + ] + } + }, + "required": ["column"], + "additionalProperties": false + }, + "Parameter": { + "title": "Parameter", + "description": "Alter the arguments supplied to any `targets` on the [`Page`][vizro.models.Page].\n\nExamples:\n >>> Parameter(targets=[\"scatter.x\"], selector=Slider(min=0, max=1, default=0.8, title=\"Bubble opacity\"))\n\nArgs:\n type (Literal[\"parameter\"]): Defaults to `\"parameter\"`.\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.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "parameter", + "enum": ["parameter"], + "type": "string" + }, + "targets": { + "title": "Targets", + "description": "Targets in the form of `.`.", + "type": "array", + "items": { + "type": "string" + } + }, + "selector": { + "title": "Selector", + "description": "Selectors to be used inside a control.", + "discriminator": { + "propertyName": "type", + "mapping": { + "checklist": "#/definitions/Checklist", + "date_picker": "#/definitions/DatePicker", + "dropdown": "#/definitions/Dropdown", + "radio_items": "#/definitions/RadioItems", + "range_slider": "#/definitions/RangeSlider", + "slider": "#/definitions/Slider" + } + }, + "oneOf": [ + { + "$ref": "#/definitions/Checklist" + }, + { + "$ref": "#/definitions/DatePicker" + }, + { + "$ref": "#/definitions/Dropdown" + }, + { + "$ref": "#/definitions/RadioItems" + }, + { + "$ref": "#/definitions/RangeSlider" + }, + { + "$ref": "#/definitions/Slider" + } + ] + } + }, + "required": ["targets", "selector"], + "additionalProperties": false + }, + "ActionsChain": { + "title": "ActionsChain", + "description": "All models that are registered to the model manager should inherit from this class.\n\nArgs:\n id (str): ID to identify model. Must be unique throughout the whole dashboard. Defaults to `\"\"`.\n When no ID is chosen, ID will be automatically generated.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "trigger": { + "title": "Trigger", + "type": "array", + "items": [ + { + "title": "Component Id", + "type": "string" + }, + { + "title": "Component Property", + "type": "string" + } + ], + "minItems": 2, + "maxItems": 2 + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + } + }, + "required": ["trigger"], + "additionalProperties": false + }, + "Page": { + "title": "Page", + "description": "A page in [`Dashboard`][vizro.models.Dashboard] with its own URL path and place in the `Navigation`.\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 to be displayed.\n description (str): Description for meta tags.\n layout (Layout): Layout to place components in. 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 `\"\"`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "components": { + "title": "Components", + "type": "array", + "items": { + "discriminator": { + "propertyName": "type", + "mapping": { + "ag_grid": "#/definitions/AgGrid", + "button": "#/definitions/Button", + "card": "#/definitions/Card", + "container": "#/definitions/Container", + "figure": "#/definitions/Figure", + "graph": "#/definitions/Graph", + "table": "#/definitions/Table", + "tabs": "#/definitions/Tabs" + } + }, + "oneOf": [ + { + "$ref": "#/definitions/AgGrid" + }, + { + "$ref": "#/definitions/Button" + }, + { + "$ref": "#/definitions/Card" + }, + { + "$ref": "#/definitions/Container" + }, + { + "$ref": "#/definitions/Figure" + }, + { + "$ref": "#/definitions/Graph" + }, + { + "$ref": "#/definitions/Table" + }, + { + "$ref": "#/definitions/Tabs" + } + ] + } + }, + "title": { + "title": "Title", + "description": "Title to be displayed.", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Description for meta tags.", + "default": "", + "type": "string" + }, + "layout": { + "$ref": "#/definitions/Layout" + }, + "controls": { + "title": "Controls", + "default": [], + "type": "array", + "items": { + "discriminator": { + "propertyName": "type", + "mapping": { + "filter": "#/definitions/Filter", + "parameter": "#/definitions/Parameter" + } + }, + "oneOf": [ + { + "$ref": "#/definitions/Filter" + }, + { + "$ref": "#/definitions/Parameter" + } + ] + } + }, + "path": { + "title": "Path", + "description": "Path to navigate to page.", + "default": "", + "type": "string" + }, + "actions": { + "title": "Actions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ActionsChain" + } + } + }, + "required": ["components", "title"], + "additionalProperties": false + }, + "Accordion": { + "title": "Accordion", + "description": "Accordion to be used as nav_selector in [`Navigation`][vizro.models.Navigation].\n\nArgs:\n type (Literal[\"accordion\"]): Defaults to `\"accordion\"`.\n pages (dict[str, list[str]]): Mapping from name of a pages group to a list of page IDs. Defaults to `{}`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "accordion", + "enum": ["accordion"], + "type": "string" + }, + "pages": { + "title": "Pages", + "description": "Mapping from name of a pages group to a list of page IDs.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + "NavLink": { + "title": "NavLink", + "description": "Icon that serves as a navigation link to be used in navigation bar of Dashboard.\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 `\"\"`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "pages": { + "title": "Pages", + "default": [], + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + ] + }, + "label": { + "title": "Label", + "description": "Text description of the icon for use in tooltip.", + "type": "string" + }, + "icon": { + "title": "Icon", + "description": "Icon name from Google Material icons library.", + "default": "", + "type": "string" + } + }, + "required": ["label"], + "additionalProperties": false + }, + "NavBar": { + "title": "NavBar", + "description": "Navigation bar to be used as a nav_selector for `Navigation`.\n\nArgs:\n type (Literal[\"nav_bar\"]): Defaults to `\"nav_bar\"`.\n pages (dict[str, list[str]]): Mapping from name of a pages group to a list of page IDs. Defaults to `{}`.\n items (list[NavLink]): See [`NavLink`][vizro.models.NavLink]. Defaults to `[]`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "type": { + "title": "Type", + "default": "nav_bar", + "enum": ["nav_bar"], + "type": "string" + }, + "pages": { + "title": "Pages", + "description": "Mapping from name of a pages group to a list of page IDs.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "items": { + "title": "Items", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/NavLink" + } + } + }, + "additionalProperties": false + }, + "Navigation": { + "title": "Navigation", + "description": "Navigation in [`Dashboard`][vizro.models.Dashboard] to structure [`Pages`][vizro.models.Page].\n\nArgs:\n pages (NavPagesType): See [`NavPagesType`][vizro.models.types.NavPagesType]. Defaults to `[]`.\n nav_selector (NavSelectorType): See [`NavSelectorType`][vizro.models.types.NavSelectorType].\n Defaults to `None`.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "ID to identify model. Must be unique throughout the whole dashboard.When no ID is chosen, ID will be automatically generated.", + "default": "", + "type": "string" + }, + "pages": { + "title": "Pages", + "default": [], + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + ] + }, + "nav_selector": { + "title": "Nav Selector", + "anyOf": [ + { + "$ref": "#/definitions/Accordion" + }, + { + "$ref": "#/definitions/NavBar" + } + ] + } + }, + "additionalProperties": false + } + } +} diff --git a/vizro-core/src/vizro/__init__.py b/vizro-core/src/vizro/__init__.py index 0226de6f1..a98bd0ff3 100644 --- a/vizro-core/src/vizro/__init__.py +++ b/vizro-core/src/vizro/__init__.py @@ -14,7 +14,7 @@ __all__ = ["Vizro"] -__version__ = "0.1.27" +__version__ = "0.1.28.dev0" # For the below _css_dist and _js_dist to be used by Dash, they must be retrieved by dash.resources.Css.get_all_css().