4
A
回答
8
請通過插件的代碼,這是一個例子的源檢查鏈接tooo http://people.iola.dk/olau/flot/examples/multiple-axes.html - 謝謝@Mads Skjern糾正鏈接
這是由jflot開發團隊示例的示例部分
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Flot Examples</title>
<link href="layout.css" rel="stylesheet" type="text/css"></link>
<!--[if IE]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="../jquery.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
</head>
<body>
<h1>Flot Examples</h1>
<div id="placeholder" style="width:600px;height:300px;"></div>
<p>Dual axis support showing the raw oil price in US $/barrel of
crude oil (left axis) vs. the exchange rate from US $ to € (right
axis).</p>
<p>As illustrated, you can put in secondary y and x axes if you
need to. For each data series, simply specify the axis number.</p>
<script id="source" language="javascript" type="text/javascript">
$(function() {
var oilprices = [[1167692400000,61.05], [1167778800000,58.32], [1167865200000,57.35], [1167951600000,56.31], .... some data..... [1219874400000,115.59], [1219960800000,115.46], [1220306400000,109.71], [1220392800000,109.35], [1220565600000,106.23], [1220824800000,106.34]];
var exchangerates = [[1167606000000,0.7580], [1167692400000,0.7580], [1167778800000,0.75470], ... some data..[1220738400000,0.70120], [1220824800000,0.7010], [1220911200000,0.70050]];
$.plot($("#placeholder"),
[ { data: oilprices, label: "Oil price ($)" },
{ data: exchangerates, label: "USD/EUR exchange rate", yaxis: 2 }],
{
xaxis: { mode: 'time' },
yaxis: { min: 0 },
y2axis: { tickFormatter: function (v, axis) { return v.toFixed(axis.tickDecimals) +"€" }},
legend: { position: 'sw' } });
});
</script>
</body>
</html>
相關問題
- 1. flot中的雙軸
- 2. jQuery Flot - 舍入x軸值?
- 3. jQuery Flot:24小時軸
- 4. 輪數x軸jquery flot圖
- 5. jQuery Flot:縮放時更改x軸
- 6. JQuery FLOT圖表動態Y軸
- 7. JQuery Flot X軸標籤格式化
- 8. 使用flot繪製雙y軸的組合條和折線圖
- 9. 隱藏標籤x軸,但仍然保持垂直軸jquery flot
- 10. Flot與時間軸異常
- 11. Flot中的軸標籤
- 12. flot和mysql jquery
- 13. jQuery mobile/Flot/resize.js
- 14. JQuery,Flot,valuelabels,center
- 15. Lift,Flot和JQuery
- 16. 爲什麼我的Flot y軸標籤出現在軸上? JQM
- 17. jQuery flot - 縮放導致圖縮小,軸標籤消失
- 18. 使用flot和jquery在x軸上固定小時數
- 19. jQuery Flot圖形的基於字符串的軸?
- 20. jQuery Flot基於時間軸的平移問題
- 21. jQuery flot:帶很長軸標籤的條形圖
- 22. 帶有多軸和複選框的jQuery Flot
- 23. jQuery flot chart - 更改y軸的標籤(tick)
- 24. 雙軸控制
- 25. 雙軸標籤
- 26. 雙軸在Highstock?
- 27. FLOT圖表值標籤與多軸
- 28. 不能轉換flot圖的y軸
- 29. flot圖 - x軸起點差異
- 30. 與等距x軸的flot條形圖
鏈接已死亡。我認爲文檔和功能已經改變。也許看看:http://people.iola.dk/olau/flot/examples/multiple-axes.html。 – 2014-03-08 19:06:26