Skip to content

Commit

Permalink
docs: simplify jupyter dashboard app layout
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Dec 11, 2023
1 parent b740888 commit a569a1d
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions solara/website/pages/apps/jupyter-dashboard-1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a569a1d

Please sign in to comment.