Reputation: 13
Need help to set options for multiple y axes in Flot. This is the current graph:
I want to apply these properties to the y axes:
$.plot("#placeholder", data, {
xaxis: {
tickDecimals: 0
},
yaxis: [{
position: "left",
min: 0,
tickFormatter: function (val, axis) {
return val + "v";
},
},{
min: 0,
position: "right",
tickFormatter: function (val, axis) {
return val + "M";
},
}]
});
But I do not understand why my code does not work here: Fiddle here
Upvotes: 1
Views: 363
Reputation: 17550
The option for multiple axes is yaxes
instead of yaxis
. See this update fiddle and the documentation.
Upvotes: 1