Team:TU-Eindhoven/Template:InteractiveGraph

From 2013.igem.org

(Difference between revisions)
 
(24 intermediate revisions not shown)
Line 1: Line 1:
-
<html><script src="https://2013.igem.org/Team:TU-Eindhoven/JS:Flot?action=raw&ctype=text/js</html>"></script>
+
<html>
-
<div id="placeholder" class="demo-placeholder"></div>
+
<div class="row"><div class="span1"><span class="graph_label" id="graph_ylabel" style="display:none;">ylabel</span></div><div id="placeholder" class="demo-placeholder span10"></div><button id="loadgraph_button" class="btn" style="display: block; margin: 50px auto;" onclick="$('#loadgraph_button').hide();$('#placeholder').height(500);$('#graph_value_select').show();loadGraphLibrary();">Load interactive graph</button></div>
-
<script>
+
<span id="graph_xlabel" class="graph_label" style="display:none;float:right;">xlabel</span>
-
$(function() {
+
<select id="graph_value_select" style="display: none; width: 300px;">
-
 
+
</select>
-
var d1 = [];
+
-
for (var i = 0; i < 14; i += 0.5) {
+
-
d1.push([i, Math.sin(i)]);
+
-
}
+
-
 
+
-
var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
+
-
 
+
-
// A null signifies separate line segments
+
-
 
+
-
var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
+
-
 
+
-
$.plot("#placeholder", [ d1, d2, d3 ]);
+
-
});
+
-
</script>
+
</html>
</html>

Latest revision as of 12:56, 17 August 2013