A Line chart with a scrolling effect

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.line.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
    [No canvas support]
This is the code that generates the chart:
    data = RGraph.arrayPad([], 500);
    last = 0;

    (function drawGraph ()

        var line = new RGraph.Line({
            id: 'cvs',
            data: data,
            options: {
                colors: ['rgb(200,0,0)'],
                linewidth: 1,
                filled: true,
                filledColors: 'rgba(255,0,0,0.5)',
                yaxisScaleMax: 60,
                tickmarksStyle: null,
                shadow: false,
                xaxisTickmarksCount: 5,
                xaxisLabels: ['Now','25s','50s','75s','100s','125s'],
                backgroundGridVlinesCount: 5

        n    = RGraph.random(last - 5, last + 5);
        last = n;
        // Bounds constraints
        Math.max(0, n);
        Math.min(500, n);

        data = [n].concat(data);

        setTimeout(drawGraph, 250);