Changing the width of bars and columns in googleVis

Changing the plotting width in bar-, column- and combo-charts of googleVis works identical and is defined by the bar.groupWidth argument. The dot in the argument means that it has to be split in R into bar="{groupWidth:'10%'}".

Example

library(googleVis)<br />cc <- gvisColumnChart(head(Population,10), <br />                      xvar="Country", yvar="Population",<br />                      options=list(seriesType="bars", legend="top",<br />                                   bar="{groupWidth:'10%'}",<br />                                   width=500, height=450),<br />                      chartid="thincolumns")<br />plot(cc)

Session Info

R version 3.0.1 (2013-05-16)<br />Platform: x86_64-apple-darwin10.8.0 (64-bit)<br /><br />locale:<br />[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8<br /><br />attached base packages:<br />[1] stats     graphics  grDevices utils     datasets  methods   base     <br /><br />other attached packages:<br />[1] googleVis_0.4.5<br /><br />loaded via a namespace (and not attached):<br />[1] RJSONIO_1.0-3 tools_3.0.1

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)