-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/mckinsey/vizro into circlec…
…i_to_github
- Loading branch information
Showing
14 changed files
with
193 additions
and
87 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...o-core/changelog.d/20240718_151233_huong_li_nguyen_validation_error_captured.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!-- | ||
A new scriv changelog fragment. | ||
Uncomment the section that is right (remove the HTML comment wrapper). | ||
--> | ||
|
||
<!-- | ||
### Highlights ✨ | ||
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) | ||
--> | ||
<!-- | ||
### Removed | ||
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) | ||
--> | ||
|
||
### Added | ||
|
||
- Added validation error message if `CapturedCallable` is directly provided. ([#590](https://github.com/mckinsey/vizro/pull/590)) | ||
|
||
<!-- | ||
### Changed | ||
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) | ||
--> | ||
<!-- | ||
### Deprecated | ||
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) | ||
--> | ||
<!-- | ||
### Fixed | ||
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) | ||
--> | ||
<!-- | ||
### Security | ||
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1)) | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,34 @@ | ||
"""Example app to show all features of Vizro.""" | ||
|
||
# check out https://github.com/mckinsey/vizro for more info about Vizro | ||
# and checkout https://vizro.readthedocs.io/en/stable/ for documentation | ||
|
||
import pandas as pd | ||
import vizro.models as vm | ||
import vizro.plotly.express as px | ||
from vizro import Vizro | ||
from vizro.figures import kpi_card | ||
|
||
df = px.data.iris() | ||
|
||
page = vm.Page( | ||
title="Vizro on PyCafe", | ||
layout=vm.Layout( | ||
grid=[[0, 0, 0, 1, 2, 3], [4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5]], | ||
row_min_height="175px", | ||
), | ||
components=[ | ||
vm.Card( | ||
text=""" | ||
### What is Vizro? | ||
gapminder = px.data.gapminder() | ||
|
||
Vizro is a toolkit for creating modular data visualization applications. | ||
""" | ||
), | ||
vm.Card( | ||
text=""" | ||
### Github | ||
Checkout Vizro's github page. | ||
""", | ||
href="https://github.com/mckinsey/vizro", | ||
), | ||
vm.Card( | ||
text=""" | ||
### Docs | ||
# data from the demo app | ||
df_kpi = pd.DataFrame( | ||
{ | ||
"Actual": [100, 200, 700], | ||
"Reference": [100, 300, 500], | ||
"Category": ["A", "B", "C"], | ||
} | ||
) | ||
|
||
Visit the documentation for codes examples, tutorials and API reference. | ||
""", | ||
href="https://vizro.readthedocs.io/", | ||
), | ||
vm.Card( | ||
text=""" | ||
### Nav Link | ||
|
||
Click this for page 2. | ||
""", | ||
href="/page2", | ||
), | ||
vm.Graph(id="scatter_chart", figure=px.scatter(df, x="sepal_length", y="petal_width", color="species")), | ||
vm.Graph(id="hist_chart", figure=px.histogram(df, x="sepal_width", color="species")), | ||
], | ||
controls=[ | ||
vm.Filter(column="species", selector=vm.Dropdown(value=["ALL"])), | ||
vm.Filter(column="petal_length"), | ||
vm.Filter(column="sepal_width"), | ||
home = vm.Page( | ||
title="Page Title", | ||
components=[ | ||
# kpi_card(data_frame=df_kpi, value_column="Actual", title="KPI with value"), | ||
vm.Figure(figure=kpi_card(data_frame=df_kpi, value_column="Actual", title="KPI with value")), | ||
], | ||
) | ||
|
||
page2 = vm.Page( | ||
title="Page2", components=[vm.Graph(id="hist_chart2", figure=px.histogram(df, x="sepal_width", color="species"))] | ||
) | ||
|
||
dashboard = vm.Dashboard(pages=[page, page2]) | ||
dashboard = vm.Dashboard(pages=[home]) | ||
|
||
|
||
if __name__ == "__main__": | ||
Vizro().build(dashboard).run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.