2016-12-25 49 views
0

我正在尝试构建一个小型仪表板应用程序,需要使用ramcharts的amfunnel来绘制漏斗图。请参阅下面的代码和屏幕截图。无法增加闪亮仪表板中的amfunnel图表的宽度

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

我想漏斗填充容器/盒。我试图增加框宽度,但这是覆盖/限制页面中的其他框。如何增加漏斗的宽度以便填充整个框。

+0

我不太清楚你在找什么。图表的顶部(蓝色部分)是否应与嵌入的框宽度相同? –

+0

是的,它与盒子的宽度相同。我正在寻找的是改变尺寸或调整由amfunnel创建的情节。 – Kits228

+0

@MartinSchmelzer如果你看到漏斗图非常窄,盒子里漏斗图的周围有很多空白区域。所以我想增加宽度/加宽漏斗图,以使图看起来不错,并填满整个框 – Kits228

回答

0

指的的amFunnel文档后,您只需要使用保证金参数:

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

enter image description here