| <html> |
| <head> |
| <script type="text/javascript" src="/webui/static/js/smoothie.js"></script> |
| <script type="text/javascript"> |
| |
| var random = new TimeSeries(); |
| setInterval(function() { |
| |
| $.get('/feed/data?dataverse=%s&dataset=%s&feed=%s', function(data) { |
| feedSeries.append(data[“time”], data[“value”]); |
| }, 500); |
| |
| function createTimeline() { |
| var chart = new SmoothieChart(); |
| chart.addTimeSeries(random, { strokeStyle: 'rgba(0, 255, 0, 1)', fillStyle: 'rgba(0, 255, 0, 0.2)', lineWidth: 4 }); |
| chart.streamTo(document.getElementById("chart"), 500); |
| } |
| </script> |
| </head> |
| <body onload="createTimeline()"> |
| |
| <p>The <em>hello world</em> of <a href="../">Smoothie Charts</a>. View source.</p> |
| |
| <canvas id="chart" width="400" height="100"></canvas> |
| |
| </body> |
| </html> |