Combing charts with gvisMerge
The function gvisMerge takes two gvis-objects and merges the underlying components into one page. The charts are aligned either horizontally or vertically next to each other in an HTML table.
The output of gvisMerge is a gvis-object again. This allows us to apply the same function iteratively to create more complex chart layouts. The following example, aligns a geo chart and table below each other, and combines the output with a motion chart to the right:
G <- gvisGeoChart(Exports, "Country", "Profit", options=list(width=210, height=100))
T <- gvisTable(Exports, options=list(width=210, height=270))
GT <- gvisMerge(G,T, horizontal=FALSE)
M <- gvisMotionChart(Fruits, "Fruit", "Year",
options=list(width=410, height=370))
GTM <- gvisMerge(GT, M, horizontal=TRUE,
tableOptions="bgcolor=\"#CCCCCC\" cellspacing=10")
plot(GTM)
Is there a way to link the charts. So that when you click on a feature, it highlights the feature with the same identifier on the other chart?
You can use JavaScript? to achieve an interactive dashboard. See the Google Charts Tools documentation for more details. However, this is currently not possible from googleVis.