http://www.flotcharts.org/flot/examples/tracking/index.htmlのようなものを探しています。唯一の問題は、y 軸で高度を表示し、x 軸で時刻を表示する必要があることです。これどうやってするの; この作業にはphpまたはjqueryを使用できるため、提案をいただければ幸いです。
前もって感謝します
http://www.flotcharts.org/flot/examples/tracking/index.htmlのようなものを探しています。唯一の問題は、y 軸で高度を表示し、x 軸で時刻を表示する必要があることです。これどうやってするの; この作業にはphpまたはjqueryを使用できるため、提案をいただければ幸いです。
前もって感謝します
見て
highcharts.com
それが役立つかもしれません。
または、このライブラリで何かを見つけたかもしれません。
次のように設定することで、Flot プラグインでそれを行うことができます。
xaxis: {
mode: "time",
timeformat: "%Y/%m/%d"
}
他のオプションでも調整できます。これを見てください: https://github.com/flot/flot/blob/master/API.md#time-series-data
- - 編集 - -
どうぞ: http://jsfiddle.net/ZDt7h/7/
$(function(){
var $placeholder = $('#placeholder');
var start = 1361399340000;
var serie = [[start, 1],[start+60E3, 2],[start+120E3, 3],[start+180E3, 2]];
var myplot = $.plot($placeholder, [serie], {
xaxis: {
mode: 'time',
timeformat: '%H:%M:%S'
},
series: {
'shadowSize': 0,
'points': {
'show': true
},
'lines': {
'show': true
}
},
crosshair: { 'mode': 'x' },
grid: { 'hoverable': true, 'autoHighlight': true }
});
$('#update').click(function(){
serie.push([start+(serie.length)*60E3, Math.floor(Math.random()*10)]);
myplot.setData([serie]);
myplot.setupGrid();
myplot.draw();
});
});