Skip to content

Commit

Permalink
fix: allow dynamic height adjustment for plotly plots
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Nov 19, 2024
1 parent 41b7002 commit 026d72b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/plot_with_settings.R
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ plot_with_settings_srv <- function(id,
plotly::renderPlotly({
plotly::event_register(
plotly::layout(
plotly::ggplotly(plot_r(), layerData = 1),
plotly::ggplotly(plot_r(), layerData = 1, height = p_height()),
dragmode = "select"
),
"plotly_selected"
Expand Down Expand Up @@ -442,7 +442,7 @@ plot_with_settings_srv <- function(id,
output$plot_out_main <- renderUI({
req(plot_suppress(plot_r()))
if (identical(plot_type(), "ggplotly")) {
plotly::plotlyOutput(ns("plot_main"))
plotly::plotlyOutput(ns("plot_main"), height = "100%")
} else {
tags$div(
align = graph_align,
Expand Down

0 comments on commit 026d72b

Please sign in to comment.