A Line chart with dynamically updating data

This is a demo of a Line chart that shows a constantly updating line. It updates every second with new data. The labels are updated too and are just increasing numbers. There's only one Line chart object and its data is updated (new data is added and the last data-piece is removed from the datasets) every second.

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: 750px; height: 300px" id="chart-container"></div>
This is the code that generates the chart: