Skip to content

Commit

Permalink
✈️ 🇧🇪 fix for #259
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasvdd committed Nov 9, 2023
1 parent 780062c commit f6869de
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions plotly_resampler/figure_resampler/figure_resampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ def show_dash(
), f"mode must be one of {available_modes}"
graph_properties = {} if graph_properties is None else graph_properties
assert "config" not in graph_properties # There is a param for config
if self["layout"]["autosize"] == True and self["layout"]["height"] == None:
graph_properties.setdefault("style", {}).update({"height": "100%"})

# 0. Check if the traces need to be updated when there is a xrange set
# This will be the case when the users has set a xrange (via the `update_layout`
Expand Down Expand Up @@ -569,17 +571,18 @@ def show_dash(
else:
# jupyter dash uses a normal Dash app as figure
app = dash.Dash("local_app", **app_init_kwargs)

# fmt: off
div = dash.html.Div(
[
dash.dcc.Graph(
id="resample-figure", figure=self, config=config, **graph_properties
),
TraceUpdater(
id="trace-updater", gdID="resample-figure", sequentialUpdate=False
),
]
style={
"display": "flex", "flex-flow": "column",
"height": "95vh", "width": "100%",
},
children=[
dash.dcc.Graph(id="resample-figure", figure=self, config=config, **graph_properties),
TraceUpdater(id="trace-updater", gdID="resample-figure", sequentialUpdate=False),
],
)
# # fmt: on
if self._create_overview:
overview_config = config.copy() if config is not None else {}
overview_config["displayModeBar"] = False
Expand Down

0 comments on commit f6869de

Please sign in to comment.