datastorm-open / rAmCharts

API for Amcharts
48 stars 17 forks source link

Using rAmCharts with Flex Dashboard #37

Closed ThoDuyNguyen closed 8 years ago

ThoDuyNguyen commented 8 years ago

I try to use rAmCharts with FlexDashboard from RStudio (http://rstudio.github.io/flexdashboard/using.html)

I played around with the layout and it seems to me that rAmCharts could not auto re-size the chart to fit the size of the dashboard.

Is there anything I could do to fix the issue?

Attachment is my Rmd (I have to put it in a docx since GitHub does not accept zip or rmd file extension)

Thank you in advance

Rmd.docx

bthieurmel commented 8 years ago

Hi,

You just have to add plot(width = "100%", height = "100%") for each graphic

### 3D Bar plot
data("data_bar")
amBarplot(x = "country", y = "visits", data = data_bar, horiz = TRUE, depth = 15) %>>% 
plot(width = "100%", height = "100%")