shiny - Unable to appropriately assign a size to NVD3 chart -


i experimenting nvd3 chart, , though renders correctly in shiny dashboard, div contains chart overflows shiny dashboards box() container (does not fit snugly box). explicitly setting height , width chart changes charts size not containing div, continues overflow box container; seemingly have no control on divs size? code below:

app.r

library(shiny) library(shinydashboard) library(rcharts) library(curl)  consent <- read.csv(curl("https://raw.githubusercontent.com/kilimba/data/master/consent.csv"))  ui <- dashboardpage(   dashboardheader(),   dashboardsidebar(),   dashboardbody(     fluidrow(       box(showoutput("distplot2"),width = 6)       )     ) )  server <- function(input, output) {     output$distplot2 <- renderchart2({     p2 <- nplot(hivconsentrate ~ year,                  group = 'hivrefused',                  data = consent,                  type = 'stackedareachart',                 height = 250,                 width = 450)      return(p2)   }) }  shinyapp(ui, server) 

any appreciated, tumaini

i tested code , added library argument nvd3 ui section this: box(showoutput("distplot2",'nvd3'),width = 6) load javascript library. able adjust width of box on ui side and/or width of chart on server side.


Comments