Hirdetés

Keresés

Új hozzászólás Aktív témák

  • wmati

    addikt

    válasz Sk8erPeter #17314 üzenetére

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Power levels</title>
    <link rel="stylesheet" type="text/css" href="./css/temperature.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
    <script src="http://code.highcharts.com/stock/highstock.js"></script>
    <script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    var options = {
    chart: {
    renderTo: 'container',
    type: 'spline',
    marginRight: 0,
    marginBottom: 150,
    zoomType: 'x'
    },
    title: {
    text: 'Telekom Power levels (vargalex)',
    x: -20 //center
    },
    subtitle: {
    text: '',
    x: -20
    },
    xAxis: {
    categories: []
    },
    yAxis: {
    title: {
    text: 'Power level (dBmV)'
    },
    plotLines: [{
    value: 0,
    width: 1,
    color: '#808080'
    }]
    },
    tooltip: {
    valueSuffix: "dBmV"
    /*formatter: function() {
    return '<b>'+ this.series.name +'</b><br/>'+
    this.x +': '+ this.y;
    }*/
    },
    legend: {
    enabled: true
    },
    series: []
    }

    $.getJSON("data.php", function(json) {
    options.xAxis.categories = json[0]['data'];
    options.xAxis.step = 6;
    options.series[0] = json[1];
    options.series[1] = json[2];
    options.series[2] = json[3];
    options.series[3] = json[4];
    options.series[4] = json[5];
    options.series[5] = json[6];
    options.series[6] = json[7];
    options.series[7] = json[8];
    options.series[8] = json[9];
    options.series[9] = json[10];
    options.series[10] = json[11];
    options.series[11] = json[12];
    chart = new Highcharts.Chart(options);
    });
    });
    </script>
    </head>
    <body>
    <div id="container" style="min-width: 500px; height: 600px; margin: 0 auto"></div>
    </body>
    </html>

Új hozzászólás Aktív témák