highcharter
highcharter copied to clipboard
chart height is not responsive in shiny
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
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.