1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | (function () { Flotr.ExampleList.add({ key : 'basic-bubble', name : 'Basic Bubble', callback : basic_bubble }); 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 } }); } })(); |