Unable to increase the width of amfunnel chart in shiny dashboard

283 Views Asked by At

I am trying to build a small dashboard application where I need to plot a funnel plot using amfunnel of ramcharts. Please see the below code and screenshot.

body <- dashboardBody(
  tags$style(type = "text/css", "#map {height: calc(100vh - 80px) !important;}"),
  fluidRow(
    box(
      title = "Box title", width = 6, status = "primary",
      amChartsOutput(outputId = "amfunnel",width = "100%")
    ),
    box(
      status = "warning", width = 4,
      "Box content"
    ),
    box(
      status = "warning", width = 2, 
      "Box Content"
    )

  )
)  
server <- function(input, output) {
  output$amfunnel <-  renderAmCharts({
    amFunnel(data = data_funnel, inverse = FALSE, label_side = "left")
  })

Output dashboard

I want the funnel to fill the container/box. I tried increasing the box width but this is overlaying/restricting the other boxes in the page. How to increase the width of the funnel so that it fills the entire box.

1

There are 1 best solutions below

0
On BEST ANSWER

After refering to the documentation of amFunnel you just have to use the margin parameters:

amFunnel(data = data_funnel, inverse = FALSE, margin_right = 0, label_side = 'left')

enter image description here