jquery - Multiple axis with one series in Flot -
is possible have 2 axis 1 data series in flot?
thanks
yes: https://www.google.com/search?q=flot+multiple+axes
-
function doplot(position) { $.plot($("#placeholder"), [ { data: oilprices, label: "oil price ($)" }, { data: exchangerates, label: "usd/eur exchange rate", yaxis: 2 }], { xaxes: [ { mode: 'time' } ], yaxes: [ { min: 0 }, { // align if right aligntickswithaxis: position == "right" ? 1 : null, position: position, tickformatter: euroformatter } ], legend: { position: 'sw' } }); } doplot("right"); $("button").click(function () { doplot($(this).text()); });
Comments
Post a Comment