Highcharts Demo

author(s): Torstein Hønsi

by Santosh Giridhara

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>

JavaScript

$(function () {
    Highcharts.setOptions({
        global: {
            useUTC: true
        }
    });

    $('#container').highcharts({
        chart: {
            renderTo: 'container',
            zoomType: 'x',
            type: 'area',
            width: 650,
            height: 400
        },
        xAxis: {
            type: 'datetime',
            plotLines: [{
                color: '#FF0000',
                width: 2,
                value: 1366103390066
            }]

        },
        yAxis: {
            title: {
                text: ""
            },
            labels: {
                formatter: function () {
                    return Math.abs(this.value);
                }
            }
        },
        tooltip: {
            //valueSuffix : ' MB',
            useHTML: true,
            shared: true,
            formatter: function () {
                var tooltip = '<span style="font-size:10px;">' + Highcharts.dateFormat('%A, %b %e %Y - %H:%M:%S', this.x) + '</span><br/>';
                $.each(this.points, function (i, e) {
                    tooltip += '<span style=" color:' + this.series.color + '">' + this.series.name + ':  </span><b>' + Highcharts.numberFormat(Math.abs(this.point.y), 0) + '</b><br/>';
                });
                return tooltip;

            }
        },
        series: [{
            name: 'one',
            data: [{
                'y': 731,
                    'x': 1366032438641
            }, {
                'y': 4305,
                    'x': 1366037838641
            }, {
                'y': 605,
                    'x': 1366043238641
            }, {
                'y': 4150,
                    'x': 1366048638641
            }, {
                'y': 1108,
                    'x': 1366054038641
            }, {
                'y': 3448,
                    'x': 1366059438641
            }, {
                'y': 3674,
                    'x': 1366064838641
            }, {
               ...