Multiple axis with one series in Flot
Is it possible to have two axis with only one data series in Flot?
开发者_StackOverflow社区Thanks
Yes: https://www.google.com/search?q=flot+multiple+axes
Multiple axes - Flot Example
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 we are to the right alignTicksWithAxis: position == "right" ? 1 : null, position: position, tickFormatter: euroFormatter } ], legend: { position: 'sw' } }); } doPlot("right"); $("button").click(function () { doPlot($(this).text()); });
Tutorial: Flot – How to Create Charts with Multiple Axes
精彩评论