This is a demo of a scrolling filled Line chart. The chart is redrawn every 50 millseconds (ie approximately 20 times a second). The new data is pushed on to the end of the data array and the array is then shifted (using the shift()
function) in order to knock one off of the beginning of the array.
<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: