From a569a1de8ecae5b931410ede48b8d8e5c5d2503b Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Mon, 11 Dec 2023 13:40:20 +0100 Subject: [PATCH] docs: simplify jupyter dashboard app layout --- .../website/pages/apps/jupyter-dashboard-1.py | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/solara/website/pages/apps/jupyter-dashboard-1.py b/solara/website/pages/apps/jupyter-dashboard-1.py index 3b8d7329e..35049208c 100644 --- a/solara/website/pages/apps/jupyter-dashboard-1.py +++ b/solara/website/pages/apps/jupyter-dashboard-1.py @@ -82,18 +82,16 @@ def crime_map(df): @solara.component def View(): - with solara.Column(): - dff = crime_filter(df_crime, districts.value, categories.value) - row_count = len(dff) - if row_count > limit.value: - solara.Warning(f"Only showing the first {limit.value} of {row_count:,} crimes on map") - with solara.Column(): - with solara.Column(style={"max-height": "400px"}): - crime_map(dff.iloc[: limit.value]) - if row_count > 0: - crime_charts(dff) - else: - solara.Warning("You filtered out all the data, no charts shown") + dff = crime_filter(df_crime, districts.value, categories.value) + row_count = len(dff) + if row_count > limit.value: + solara.Warning(f"Only showing the first {limit.value} of {row_count:,} crimes on map") + with solara.Column(style={"max-height": "400px"}): + crime_map(dff.iloc[: limit.value]) + if row_count > 0: + crime_charts(dff) + else: + solara.Warning("You filtered out all the data, no charts shown") @solara.component