ramnathv / htmlwidgets

HTML Widgets for R
http://htmlwidgets.org
Other
788 stars 208 forks source link

dynamically adjust height and width of an htmlwidget in Shiny #102

Open timelyportfolio opened 9 years ago

timelyportfolio commented 9 years ago

https://github.com/rich-iannone/DiagrammeR/issues/93 brings up an interesting point that I have not considered before. What is the best way to handle this, since initialize and resize are not called in this scenario? I can only think to provide height and width also in x so that the adjustment can be made in renderValue.

Using renderPlot as an example, should we add height and width as arguments to the template render* for htmlwidgets?

jrowen commented 9 years ago

I'm also running into this issue with rhandsontable and shinydashboard,

shiny::runGitHub("rhandsontable", "jrowen", 
             subdir="inst/examples/rhandsontable_dash")

When resizing the window and show/hiding the sidebar, I see the boxes resize but not the widget. As noted, resize and initialize are not called. Was a solution to this issue ever identified?

ziyadsaeed commented 8 years ago

This is a problem with DT package as well. Im using the responsive plugin in DT to have the table resize the width.