Reputation: 21723
I would like to plot two sets of values on a bar chart, that have different scales. For example, for each day of the week, I have a proportion (say the proportion of colleagues that were late that day) and a value (how late they were, on average).
These two values can be plot on two separate charts, but it would be useful to have them on the same, for better comparison. The problem is that they don't have the same scale, thus it's not possible to use one common scale for the Y axis. The solution is to have two separate scales for the Y axis.
Is it possible to do this using Google Chart Tools? I am using the JS api to generate interactive SVG charts, not the "still image" version.
Upvotes: 1
Views: 3741
Reputation: 53
This is possible with defining two axis:
vAxis: {
0: {
viewWindow: {
min: 0,
max: 1000
}
},
1: {
viewWindow: {
min: 0,
max: 200
}
}
}
This will plot the chart with two vertical axes, both with their own scale from min to max.
Upvotes: 3
Reputation: 21723
I was not able to find a way, so I switched to HighCharts for my plots. It can handle multiple y axes:
http://www.highcharts.com/demo/combo-dual-axes
Upvotes: 0