markrcote/flot-axislabels — Issue #5: Does not work with new multiples axis setup
Author: mivilleb
Created: 2012-02-04 21:05:39+00:00
State: open

Now that flot accepts multiples axis (not just 2 axes as before but n axes, the plugin only works for the first 2 axes, not the others.

Any chance that you will publish a revised version?

...
$(function () {
var data = [
{ data: [[1, 3], [2, 8], [3, 5], [7, 13]], bars: { show: true}, xaxis: 1, yaxis:1},
{ data: [[3, 3], [6, 8], [8, 5], [12, 13]], xaxis: 1, yaxis:2 },
{ data: [[5, 12], [7, 12], null, [7, 2.5], [12, 2.5]], xaxis: 1, yaxis:3 },
{ data: [[2, 3], [7, 8], [9, 5], [10, 13], [11,12]], xaxis: 1, yaxis: 4 }
];

$.plot($("#placeholder"),
data,
{
xaxes: [
{ position: 'bottom' }
],
yaxes: [
{ position: 'left', axisLabel: 'Hourly Rain (mm)', axisLabelPadding: 10, axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Arial' },
{ position: 'right', axisLabel: 'Temperature (C)', axisLabelPadding: 20, axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Arial' },
{ position: 'right', axisLabel: 'Relative Humidity (%)', axisLabelPadding: 20, axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Arial' },
{ position: 'right',axisLabel: 'Pressure (hPa)', axisLabelPadding: 20, axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Arial' }
],
grid: { hoverable: true, show: true }
});
});
...