aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/static/packages/novus-nvd3-d51729c/deprecated/scatterChart.html
diff options
context:
space:
mode:
authorLei Yan2014-07-14 16:23:12 +0000
committerLei Yan2014-07-14 17:02:01 +0000
commit214bf0128b8ecdda718983c5563cf34160743758 (patch)
tree917e7a5ae78dc4ff65dc08d107a0e3ae3a47c67c /wqflask/wqflask/static/packages/novus-nvd3-d51729c/deprecated/scatterChart.html
parent8de6fec18cd98a10c58702c448a1e01e147dc5f7 (diff)
parentfbdbf4b7410185e2a978ecc8e120ae56ff6da0ce (diff)
downloadgenenetwork2-214bf0128b8ecdda718983c5563cf34160743758.tar.gz
Merge /home/zas1024/gene
Conflicts: wqflask/wqflask/static/new/javascript/dataset_select_menu.js wqflask/wqflask/templates/corr_scatter_plot_old.html
Diffstat (limited to 'wqflask/wqflask/static/packages/novus-nvd3-d51729c/deprecated/scatterChart.html')
-rwxr-xr-xwqflask/wqflask/static/packages/novus-nvd3-d51729c/deprecated/scatterChart.html110
1 files changed, 110 insertions, 0 deletions
diff --git a/wqflask/wqflask/static/packages/novus-nvd3-d51729c/deprecated/scatterChart.html b/wqflask/wqflask/static/packages/novus-nvd3-d51729c/deprecated/scatterChart.html
new file mode 100755
index 00000000..7bb78ae5
--- /dev/null
+++ b/wqflask/wqflask/static/packages/novus-nvd3-d51729c/deprecated/scatterChart.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+
+<link href="../src/d3.css" rel="stylesheet" type="text/css">
+
+<style>
+
+body {
+ overflow-y:scroll;
+ margin: 0;
+ padding: 0;
+}
+
+svg {
+ overflow: hidden;
+}
+
+div {
+ border: 0;
+ margin: 0;
+}
+
+/*
+#offsetDiv {
+ margin-left: 100px;
+ margin-top: 100px;
+}
+*/
+
+#test1 {
+ margin: 0;
+ height: 500px;
+}
+
+#test1 svg {
+ height: 500px;
+}
+
+</style>
+
+<body>
+
+<div id="offsetDiv">
+ <div id="test1" class="chartWrap">
+ <svg></svg>
+ </div>
+</div>
+
+<script src="../lib/d3.v2.js"></script>
+<script src="../lib/fisheye.js"></script>
+<script src="../nv.d3.js"></script>
+<script src="../src/tooltip.js"></script>
+<script src="../src/models/legend.js"></script>
+<script src="../src/models/axis.js"></script>
+<script src="../src/models/distribution.js"></script>
+<script src="../src/models/scatter.js"></script>
+<script src="../src/models/scatterChart.js"></script>
+<script>
+
+
+
+//Format A
+nv.addGraph(function() {
+ var chart = nv.models.scatterChart()
+ .showDistX(true)
+ .showDistY(true)
+ //.height(500)
+ .color(d3.scale.category10().range());
+
+ chart.xAxis.tickFormat(d3.format('.02f'))
+ chart.yAxis.tickFormat(d3.format('.02f'))
+
+ d3.select('#test1 svg')
+ .datum(randomData(4,40))
+ .transition().duration(500)
+ .call(chart);
+
+ nv.utils.windowResize(chart.update);
+
+ return chart;
+});
+
+
+function randomData(groups, points) { //# groups,# points per group
+ var data = [],
+ shapes = ['circle', 'cross', 'triangle-up', 'triangle-down', 'diamond', 'square'],
+ random = d3.random.normal();
+
+ for (i = 0; i < groups; i++) {
+ data.push({
+ key: 'Group ' + i,
+ values: []
+ });
+
+ for (j = 0; j < points; j++) {
+ data[i].values.push({
+ x: random(),
+ y: random(),
+ size: Math.random(),
+ shape: shapes[j % 6]
+ });
+ }
+ }
+
+ return data;
+}
+
+
+
+</script>