dynamic area

by jayhilwig

HTML

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

JavaScript

$(function () {
    var chart;
    var lastdate = 1343387830000;
    $(document).ready(function () {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'area',
                animation: false,
                events: {
                    load: function () {

                        // set up the updating of the chart each second
                        var serieslist = this.series;
                        setInterval(function () {
                            lastdate = lastdate + 10000
                            for (seriesidx in serieslist) {
                                var x = lastdate, // current time
                                    y = parseInt(Math.random() * 10000);
                                serieslist[seriesidx].addPoint([x, y], true, true);
                            }
                        }, 100);
                    }
                }
            },
            legend: {
                enabled: false
            },
            title: {
                text: null
            },

            xAxis: {
                labels: {
                    enabled: false
                },
                tickmarkPlacement: 'off',
                title: {
                    enabled: false
                },
                tickWidth: 0,
                type: 'datetime'
            },
            yAxis: {
                gridLineColor: '#ffffff',
                gridLineWidth: 1,
                gridLineDashStyle: 'Dot',
                gridZIndex: 12,
                tickPixelInterval: 100,
                title: {
                    text: null
                },
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            tooltip: {
                enabled: false
            },
            plotOptions: {
                area: {
                    stacking:...