Zoom, zoom, googleVis
The Google Charts API is quite powerful and via googleVis you can access it from R. Here is an example that demonstrates how you can zoom into your chart.In the example below I set the maximum zoom level to 5% of the chart. Drag and pan with a left mouse button to zoom in; use a right mouse click to zoom out again. The functionality is available in other core charts as well, such as line, column and bar charts. For more configuration options of the explorer settings visit the Google documentation.
R code
Bonus tip
Add to the list of optionscrosshair="{trigger:'both'}"
and you get crosshair navigation lines as well. For further information see the googleVis vignettes and visit the examples on my blog.
Session Info
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
other attached packages:
[1] googleVis_0.5.5
loaded via a namespace (and not attached):
[1] RJSONIO_1.3-0 tools_3.1.1
No comments :
Post a Comment