Reputation: 213
I'm trying to plot some data on a webpage. I have 4+ series with a common Xaxis but the scaling on the Yaxis should be unique for each series.
Something like the below picture (you can see multiple scales on both Y and Y2 axis)
I've been testing out jqplot it supports a Y and Y2 axis but I cannot see a way to have more that one scale on each axis is this possible?
If not is there another package I can use that can do this?
Upvotes: 2
Views: 376
Reputation: 213
I have discovered JQplot supports more than two YAxis but each Axis after the first axis will be displayed on the right hand side of the plot I've found no simple way to modify this behaviour. The below picture is a plot I was able to create using 4 yaxis scales
Something like the below Javascript in the plot statement will do it.
axes: {
xaxis: {
show: true,
renderer: $.jqplot.LinearAxisRenderer,
drawMajorGridlines: true,
min: 0,
max: 21,
numberTicks: 7,
},
yaxis: {
show: true,
renderer: $.jqplot.LinearAxisRenderer,
},
y2axis: {
show: true,
renderer: $.jqplot.LinearAxisRenderer,
},
y3axis: {
show: true,
renderer: $.jqplot.LinearAxisRenderer,
},
y4axis: {
show: true,
renderer: $.jqplot.LinearAxisRenderer,
},
},
Upvotes: 1