A dynamically updating SVG Line chart

This is an SVG version of an older dynamic canvas Line chart. There are lots of data points in the dataset (1200) and new ones are added every 16.666 milliseconds (ie 60 frames a second). It's purposefully not an overly-complicated chart so that there's not much to do on each redraw.

This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.line.js"></script>
Put this where you want the chart to show up:
<div style="width: 650px; height: 250px" id="cc"></div>
This is the code that generates the chart:
<script>
    var div       = document.getElementById("cc"),
        obj       = null,
        data      = [],
        l         = 0, // The letter 'L' - NOT a one
        numvalues = 1200,
        updates   = 0;

    // Pre-pad the arrays with null values
    for (var i=0; i<numvalues; ++i) {
        data.push(null);
    }

    function drawGraph ()
    {
        if (!obj) {
            obj = new RGraph.SVG.Line({
                id: 'cc',
                data: data,
                options: {
                    colors: ['black'],
                    linewidth: 0.75,
                    shadow: false,
                    marginTop: 10,
                    marginBottom: 15,
                    marginRight: 40,
                    backgroundGridBorder: false,
                    backgroundGridVlines: false,
                    xaxis: false
                }
            })
        } else {
            RGraph.SVG.clear(obj.svg);
        }

        // Add some data to the data arrays
        var len          = data.length,
            lastvalue    = RGraph.SVG.isNull(data[len - 1]) ? 26 : data[len - 1],
            random_value = RGraph.SVG.random({
                min: lastvalue  - 2,
                max: lastvalue + 2
            });
       
       random_value = Math.max(random_value, 0);
       random_value = Math.min(random_value, 250);

        data.push(random_value);
        
        if (data.length > numvalues) {
            data.shift();
        }

        obj.originalData[0] = data;
        obj.draw();
        setTimeout(drawGraph, 16.666);
    }
    
    drawGraph();
</script>