awesome parameter1 parameter2
- awesome visualization
- moves and updates
- data scientist for the win
// this is some sample code
alert("foobar");
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
| <style type="text/css"> | |
| body { | |
| font: 300 13px "Helvetica Neue", Helvetica; | |
| background-color: black; | |
| color: white; | |
| } | |
| </style> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script> | |
| <script src="/js/libs/flotr2.min.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <div style="height: 600px; width: 800; border: none;" id="foo"></div> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| chart_id = "foo"; | |
| (function basic_bubble(container) { | |
| var | |
| d1 = [], | |
| d2 = [], | |
| point, graph, i; | |
| for (i = 0; i < 10; i++ ){ | |
| point = [i, Math.ceil(Math.random()*10), Math.ceil(Math.random()*10)]; | |
| d1.push(point); | |
| point = [i, Math.ceil(Math.random()*10), Math.ceil(Math.random()*10)]; | |
| d2.push(point); | |
| } | |
| // Draw the graph | |
| graph = Flotr.draw(container, [d1, d2], { | |
| bubbles : { show : true, baseRadius : 5 }, | |
| xaxis : { min : -4, max : 14 }, | |
| yaxis : { min : -4, max : 14 } | |
| }); | |
| })(document.getElementById(chart_id)); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
| $(document).ready(function() { | |
| chart_id = "chart-" + (new Date).getTime(); | |
| $terminal.print($('<div style="height: 300px; width: 800; border: none;" id="'+chart_id+'"></div>')); | |
| (function basic_bubble(container) { | |
| var | |
| d1 = [], | |
| d2 = [], | |
| point, graph, i; | |
| for (i = 0; i < 10; i++ ){ | |
| point = [i, Math.ceil(Math.random()*10), Math.ceil(Math.random()*10)]; | |
| d1.push(point); | |
| point = [i, Math.ceil(Math.random()*10), Math.ceil(Math.random()*10)]; | |
| d2.push(point); | |
| } | |
| // Draw the graph | |
| graph = Flotr.draw(container, [d1, d2], { | |
| bubbles : { show : true, baseRadius : 5 }, | |
| xaxis : { min : -4, max : 14 }, | |
| yaxis : { min : -4, max : 14 } | |
| }); | |
| })(document.getElementById(chart_id)); | |
| }); |
| name: Scatter Example w/Flot | |
| author: kordless | |
| description: This is a scatter graph example done with Flot. | |
| command: scatter | |
| externals: | |
| - http://d3js.org/d3.v2.js | |
| parameters: | |
| shape: | |
| required: True | |
| color: | |
| required: False | |
| default: "red" | |
| variables: | |
| height: 200 | |
| width: 200 | |
| title: "My Chart" | |
| data: [50,60,80,90,110,110,80,20] |