I am struggling to create a map in plotly that fully fits the height and width of a card in Shiny. See a minimum reproducible example below and a screenshot of what I would like to achieve. Any advice on how to proceed would be much appreciated.
library(shiny)
library(plotly)
library(bslib)
ui <- fluidPage(
card(plotlyOutput("plot", width = "100%", height = "100%"))
)
server <- function(input, output, session) {
output$plot <- renderPlotly({
plot_geo(type = 'scattermapbox') %>%
layout(
showlegend = FALSE,
paper_bgcolor="#F0F9FE",
geo = list(scope = 'world'))
})
}
shinyApp(ui, server)