需要一个好的库来绘制曲线[关闭]

I am looking for something like http://www.flotcharts.org/flot/examples/tracking/index.html. The only problem is that I need y axis to show altitude and x axis to show time of the day. How can I do this; I can use php or jquery for this work, so any suggestions will be appreciated.

Thanks in advance

have a look at

highcharts.com

may that helps.

or maybe you find something in this library.

http://d3js.org/

You could do it with Flot plugin by setting:

xaxis: {
    mode: "time",
    timeformat: "%Y/%m/%d"
}

You can adjust it by other options as well. Take a look at this: https://github.com/flot/flot/blob/master/API.md#time-series-data


---- EDIT ----

Here you go: 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();
    });
});