Commit eac71f92ea7e77dd2d1ef4167d0072badbb81fb5
1 parent
7d7c3631
Exists in
master
and in
11 other branches
proposals_discussion: remove file added by accident
Showing
1 changed file
with
0 additions
and
53 deletions
Show diff stats
public/proposals_graph.js~
@@ -1,53 +0,0 @@ | @@ -1,53 +0,0 @@ | ||
1 | -(function basic_time(container) { | ||
2 | - | ||
3 | - var | ||
4 | - d1 = [], | ||
5 | - start = new Date("2009/01/01 01:00").getTime(), | ||
6 | - options, | ||
7 | - graph, | ||
8 | - i, x, o; | ||
9 | - | ||
10 | - for (i = 0; i < 100; i++) { | ||
11 | - x = start+(i*1000*3600*24*36.5); | ||
12 | - d1.push([x, i+Math.random()*30+Math.sin(i/20+Math.random()*2)*20+Math.sin(i/10+Math.random())*10]); | ||
13 | - } | ||
14 | - | ||
15 | - options = { | ||
16 | - xaxis : { | ||
17 | - mode : 'time', | ||
18 | - labelsAngle : 45 | ||
19 | - }, | ||
20 | - selection : { | ||
21 | - mode : 'x' | ||
22 | - }, | ||
23 | - HtmlText : false, | ||
24 | - title : 'Time' | ||
25 | - }; | ||
26 | - | ||
27 | - // Draw graph with default options, overwriting with passed options | ||
28 | - function drawGraph (opts) { | ||
29 | - | ||
30 | - // Clone the options, so the 'options' variable always keeps intact. | ||
31 | - o = Flotr._.extend(Flotr._.clone(options), opts || {}); | ||
32 | - | ||
33 | - // Return a new graph. | ||
34 | - return Flotr.draw( | ||
35 | - container, | ||
36 | - [ d1 ], | ||
37 | - o | ||
38 | - ); | ||
39 | - } | ||
40 | - | ||
41 | - graph = drawGraph(); | ||
42 | - | ||
43 | - Flotr.EventAdapter.observe(container, 'flotr:select', function(area){ | ||
44 | - // Draw selected area | ||
45 | - graph = drawGraph({ | ||
46 | - xaxis : { min : area.x1, max : area.x2, mode : 'time', labelsAngle : 45 }, | ||
47 | - yaxis : { min : area.y1, max : area.y2 } | ||
48 | - }); | ||
49 | - }); | ||
50 | - | ||
51 | - // When graph is clicked, draw the graph with default area. | ||
52 | - Flotr.EventAdapter.observe(container, 'flotr:click', function () { graph = drawGraph(); }); | ||
53 | -})(document.getElementById("editor-render-0")); |