How to get Leaflet for R use 100% of Shiny dashboard height

后端 未结 6 613
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 01:44

I am in the process of creating a Shiny dashboard application, where the dashboard body is supposed to show some maps. So far no problem to get the map expand over the entir

6条回答
  •  醉梦人生
    2020-12-13 02:26

    Try adding the pixel size manually:

    ...
      dashboardBody(
        tabItems(
          tabItem(
            tabName = "m_water",
            box(
              title = "Baltic catchment areas",
              collapsible = TRUE,
              width = "100%",
              height = "1000px",
              leafletOutput("l_watershed",width="100%",height="1000px")
            )
          ),
          tabItem(
            tabName = "m_pop",
            # Map in Dashboard
            leafletOutput("l_population",width="100%",height="1000px")
          ),
          tabItem(
            tabName = "charts",
            h2("Second tab content")
          )
        )
      )
    ...
    

提交回复
热议问题