blob: 6576f7544247170f3435fef241e2d7678d074050 [file] [log] [blame]
ramangrover29a04696c2013-07-31 21:50:38 -07001<!DOCTYPE html>
2<html>
3 <head>
4 <script type="text/javascript" src="/webui/static/js/smoothie.js"></script>
5 <script type="text/javascript"></script>
6 </head>
7 <body>
8 <canvas id="chart" width="400" height="100"></canvas>
9
10 <script type="text/javascript">
11
12 // Random data
13
14 var feedSeries = new TimeSeries();
15 setInterval(function() {
16 line1.append(new Date().getTime(), Math.random());
17 line2.append(new Date().getTime(), Math.random());
18 }, 1000);
19
20 var smoothie = new SmoothieChart({ grid: { strokeStyle: 'rgb(125, 0, 0)', fillStyle: 'rgb(60, 0, 0)', lineWidth: 1, millisPerLine: 250, verticalSections: 6 } });
21 smoothie.addTimeSeries(line1, { strokeStyle: 'rgb(0, 255, 0)', fillStyle: 'rgba(0, 255, 0, 0.4)', lineWidth: 3 });
22 smoothie.addTimeSeries(line2, { strokeStyle: 'rgb(255, 0, 255)', fillStyle: 'rgba(255, 0, 255, 0.3)', lineWidth: 3 });
23 smoothie.streamTo(document.getElementById("mycanvas"), 1000);
24
25 </script>
26 </body>
27</html>