In jqPlot
, I have two series rendered in the graph. They show different data, measured in different units, so they each have their own y-axis (yaxis
and y2axis
).
jqPlot
constructs both y-axes automatically to suit the range of the data. That is ok - I don't want to set the axis min, max, ticks
manually, as the range of the data may vary greatly.
However, I would like to align the 0
ticks for both y-axes
to the same level. Is this possible?
Note: One may argue that there is no point to align, for example, 0° C
temperature with 0 ms^-1
wind speed, as there is no mathematical relation between the values. But it does look a lot better if it is so, and looking good is the whole point of graphs :)
Testing example:
var data1 = [[0, 0], [3, 50]];
var data2 = [[0, 0], [3, -50]];
$.jqplot('chart', [data1, data2], {
series: [
{ yaxis: 'yaxis' },
{ yaxis: 'y2axis' },
]
});