无法在闪亮的仪表板中增加amfunnel图表的宽度

时间:2016-12-25 11:51:27

标签: r shiny amcharts shinydashboard

我正在尝试构建一个小型仪表板应用程序,我需要使用amfunnel of ramcharts绘制漏斗图。请参阅以下代码和屏幕截图。

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

我希望漏斗能够填充容器/盒子。我尝试增加框宽,但这会覆盖/限制页面中的其他框。如何增加漏斗的宽度,使其填满整个盒子。

1 个答案:

答案 0 :(得分:0)

在参考<?php $str = 'This is a ^*&^*&^@$ string with alphanumeric chars @ (test-exclude)'; preg_match_all('/(?:^|\s)([a-z0-9]+)(?=$|\s)/i', $str, $matches); $cleanedstr = implode($matches[1], ' '); echo $cleanedstr; 的文档后,您只需使用边距参数:

amFunnel

enter image description here