I know that when we use plotoutplot, we can set height and weight to "auto". Then the plot will resize automatically when the size of the windows change.
But I am using google chart, I'll need to use htmlOutput, which won't resize the chart automatically.
I figured out a way to do this:
1. Create a fake bar plot, and set the height = 0.1, so the plot won't show up.
2. Then I use session$clientData$output_barplot_width in rendergvis:
```
output$image_pie <- renderGvis({
session$clientData$output_fakeplot_width
gvisPieChart(data(), labelvar = "Image", numvar = "count",
options = list( height = 500))
})
```
This works nice on my first tabpage. But when I tried to do the same thing in my second tabpage, it won't work. The google chart won't show up. Then I somehow add something and move something unimportant, it works.
Now I am creating my third tabpage, this problem happen again....... It works sometimes when you move something in the layout.....
Is there anyone know what happen? Or other better way to achieve this?