jbkunst / highcharter

R wrapper for highcharts
http://jkunst.com/highcharter/
Other
720 stars 148 forks source link

chart height is not responsive in shiny #781

Open CamilaAchuri opened 1 year ago

CamilaAchuri commented 1 year ago

the display is responsive by default, however when I using highcharter::highchartOutput it does not include the height option at 100% or auto, and by default it generates a height of 400px

library(shiny)
library(highcharter)
app <- shinyApp(
  ui = fluidPage(
    highchartOutput("plot", height = "100%")
  ),
  server = function(input, output) {
    output$plot <- renderHighchart({
      highcharter::highchart() %>%
        highcharter::hc_add_series(data = cumsum(rnorm(100))) %>%
        highcharter::hc_responsive()
    })
  }
)

runApp(app)

this is strange because the shinyWidgetOutput function allows you to enter the height size in a format other than pixels, for example, for leaflet it works correctly

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to reopen it if you find it necessary.