score:2

i haven't test my code but it should work.i hope you'll understand my idea.

    $(function () {
        $(document).ready(function () {
            highcharts.setoptions({
                global: {
                    useutc: false
                }
            });
            var chart;
            params = {
                chart: {
                    zoomtype: 'x',
                    type: 'area'
                },
                credits: {
                    enabled: false
                },
                title: {
                    text: 'temperature'
                },
                legend: {
                    enabled: false
                },
                xaxis: {
                    type: 'datetime'
                },
                series: [{
                    name: 'temperature',
                    color: '#ff851b',
                    marker: {
                        enabled: false
                    }
                }]
            };
            $.ajax({
                url: "https://urlhidden.com/ajaxsql.php?f=get_all_temperature",
                type: "get",
                async: false,
                context:document.body,
                success: function (data) {
                    //data should be converted to json object using  [..]
//remove data variable in this format you should get the data
                    data = [[1394908920000,20.87], [1394908980000,20.87], [1394909040000,20.87]];
                    params.series[0].data = data;
                    $('#graph_temperature').highcharts(params);
                }
            });
        })
    });

updated enter image description here


Related Query

More Query from same tag