Skip to content

Commit 026d72b

Browse files
committed
fix: allow dynamic height adjustment for plotly plots
1 parent 41b7002 commit 026d72b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/plot_with_settings.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ plot_with_settings_srv <- function(id,
383383
plotly::renderPlotly({
384384
plotly::event_register(
385385
plotly::layout(
386-
plotly::ggplotly(plot_r(), layerData = 1),
386+
plotly::ggplotly(plot_r(), layerData = 1, height = p_height()),
387387
dragmode = "select"
388388
),
389389
"plotly_selected"
@@ -442,7 +442,7 @@ plot_with_settings_srv <- function(id,
442442
output$plot_out_main <- renderUI({
443443
req(plot_suppress(plot_r()))
444444
if (identical(plot_type(), "ggplotly")) {
445-
plotly::plotlyOutput(ns("plot_main"))
445+
plotly::plotlyOutput(ns("plot_main"), height = "100%")
446446
} else {
447447
tags$div(
448448
align = graph_align,

0 commit comments

Comments
 (0)