You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe someone from the development team should help streamline our code examples in the documentation. Upon rereading them, I noticed many instances where simplification is possible. Here are some specific recommendations:
Remove any unnecessary filter interactions or actions.
Exclude any secondary or tertiary components that aren't essential.
In general, we should remove everything that isn't required to demonstrate the feature in question. This approach will keep the tutorials focused and prevent distractions from the main purpose.
Example:
from vizro import Vizro
import vizro.models as vm
import vizro.plotly.express as px
df = px.data.gapminder()
gapminder_data = (
df.groupby(by=["continent", "year"]).
agg({"lifeExp": "mean", "pop": "sum", "gdpPercap": "mean"}).reset_index()
)
first_page = vm.Page(
title="First Page",
layout=vm.Layout(grid=[[0, 0], [1, 2], [1, 2], [1, 2]]),
components=[
vm.Card(
text="""
# First dashboard page
This pages shows the inclusion of markdown text in a page and how components
can be structured using Layout.
""",
),
vm.Graph(
id="box_cont",
figure=px.box(gapminder_data, x="continent", y="lifeExp", color="continent",
labels={"lifeExp": "Life Expectancy", "continent": "Continent"}),
),
vm.Graph(
id="line_gdp",
figure=px.line(gapminder_data, x="year", y="gdpPercap", color="continent",
labels={"year": "Year", "continent": "Continent",
"gdpPercap":"GDP Per Cap"}),
),
],
controls=[
vm.Filter(column="continent", targets=["box_cont", "line_gdp"]),
],
)
dashboard = vm.Dashboard(pages=[first_page])
Vizro().build(dashboard).run()
What could be removed:
id provision inside the charts
Removal of targets inside vm.Filter as it will target all charts if not specified
Removal of labels argument inside charts
The text was updated successfully, but these errors were encountered:
I believe someone from the development team should help streamline our code examples in the documentation. Upon rereading them, I noticed many instances where simplification is possible. Here are some specific recommendations:
id
in docs examples #713 - if this won't be done in the GHC, we should do itIn general, we should remove everything that isn't required to demonstrate the feature in question. This approach will keep the tutorials focused and prevent distractions from the main purpose.
Example:
What could be removed:
id
provision inside the chartstargets
insidevm.Filter
as it will target all charts if not specifiedlabels
argument inside chartsThe text was updated successfully, but these errors were encountered: