blob: addf706e4f99886fa038684648209d6a3f4b55da [file] [log] [blame]
ramangrover29a04696c2013-07-31 21:50:38 -07001<html>
2 <head>
3 <script type="text/javascript" src="/webui/static/js/smoothie.js"></script>
ramangrover29a04696c2013-07-31 21:50:38 -07004 <script type="text/javascript">
5
ramangrover29c996e282013-08-03 14:36:45 -07006 var random = new TimeSeries();
7 setInterval(function() {
ramangrover2940636ee2013-08-04 22:05:49 -07008
9 $.get('/feed/data?dataverse=%s&dataset=%s&feed=%s', function(data) {
10 feedSeries.append(data[“time”], data[“value”]);
ramangrover29c996e282013-08-03 14:36:45 -070011 }, 500);
12
13 function createTimeline() {
14 var chart = new SmoothieChart();
15 chart.addTimeSeries(random, { strokeStyle: 'rgba(0, 255, 0, 1)', fillStyle: 'rgba(0, 255, 0, 0.2)', lineWidth: 4 });
16 chart.streamTo(document.getElementById("chart"), 500);
17 }
ramangrover29a04696c2013-07-31 21:50:38 -070018 </script>
ramangrover29c996e282013-08-03 14:36:45 -070019 </head>
20 <body onload="createTimeline()">
21
22 <p>The <em>hello world</em> of <a href="../">Smoothie Charts</a>. View source.</p>
23
24 <canvas id="chart" width="400" height="100"></canvas>
25
ramangrover29a04696c2013-07-31 21:50:38 -070026 </body>
27</html>