I use saveWidget
function in htmlwidgets
to save HTML widgets in R. I got the saved HTML files with width 960 and height 500.
I am pretty sure that I can resize the widget within knitrOptions
parameters but I can not find out the list of the parameters to resize the widget.
I have tried:
library(htmlwidgets)
saveWidget(htmlplot, file, knitrOptions = list(width = 1200, height = 700)
I also have tried using fig.width
, defaultWidth
, etc. but none of them are worked.
How could I resize the widget?