How can get my HighCharts plot below to resize when I change screen resolutions and when I minimize and maximize my dashboard window. It doesn't fit correctly when I change.
My code is below.
library(rCharts)
library(shiny)
library(shinydashboard)
header <- dashboardHeader(
)
sidebar <- dashboardSidebar(width = 350,
sidebarMenu(
menuItem("HighChart", tabName = "tab", icon = icon("dashboard"))
)
)
body <- dashboardBody(
tabItems(
tabItem("tab",
fluidRow(
box(title = "HighCharts",
width=6,
solidHeader = TRUE,
status = "primary",
collapsible = TRUE,
div(style='display:inline-block;width:100%',
wellPanel(showOutput("chart", "highcharts")))
))
)))
server <- function(input, output) {
output$chart <- renderChart2({
d <- hPlot(Pulse ~ Height, data = MASS::survey, type = "bubble", title = "Zoom Demo", subtitle = "Bubble Chart", size = "Age", group = "Exer")
d$chart(zoomType = "xy")
d$exporting(enabled = T)
d$chart(width=690,height=400,zoomType = "x",marginTop="50",marginBottom="50")
d
})
}
shinyApp(
ui = dashboardPage(header, sidebar, body, skin = "blue"),
server = server
)