Skip to content

Commit

Permalink
Add space between button and chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac-Flath committed Feb 1, 2025
1 parent 45b4328 commit 77ab535
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions examples/visualizations/observable_plot/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
@rt
def index():
return Div(
H1(A("Observable", href="https://observablehq.com/@observablehq/plot", target="_blank"), " Plot Demo"),
P("The data is randomly generated on the server and is fetched on initial page load."),
P("Try opening the browser developer tools and viewing the Network tab to see the data reponse for each http request."),
# On bytton click it sends a get request to the `get_data` route and puts the response in the `data-store` div
Button("Fetch New Data", get=get_data, hx_target="#data-store", cls='btn btn-primary'),
Section(
H1(A("Observable", href="https://observablehq.com/@observablehq/plot", target="_blank"), " Plot Demo"),
P("The data is randomly generated on the server and is fetched on initial page load."),
P("Try opening the browser developer tools and viewing the Network tab to see the data reponse for each http request."),
# On bytton click it sends a get request to the `get_data` route and puts the response in the `data-store` div
Button("Fetch New Data", get=get_data, hx_target="#data-store")),
# Store for the JSON chart data
Div(id="data-store", get=get_data, hx_trigger="load", hidden=True),
# Plot container
Expand Down

0 comments on commit 77ab535

Please sign in to comment.