diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-01 17:37:17 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-01 17:37:17 +0200 |
| commit | 4180d54aef2022f0f5e75e9e300e6b427d331d5a (patch) | |
| tree | b71ee9015e6775f64e06c89d4e715199005694ea | |
| parent | 962b1ec3ded7a0ccc77765e973f6321dc92ec688 (diff) | |
| download | vortrag-knn-4180d54aef2022f0f5e75e9e300e6b427d331d5a.tar.gz vortrag-knn-4180d54aef2022f0f5e75e9e300e6b427d331d5a.zip | |
fix colors and descriptions
| -rw-r--r-- | code/weightvis.js | 12 | ||||
| -rw-r--r-- | index.css | 2 | ||||
| -rw-r--r-- | index.html | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/code/weightvis.js b/code/weightvis.js index 409eb90..10a9ed2 100644 --- a/code/weightvis.js +++ b/code/weightvis.js @@ -20,17 +20,16 @@ var primaryColor = [pDeepPurple[1], pDeepPurple[5], pDeepPurple[7]], secondaryColor = pBlueA[3], - tertiaryColor = [pPink[1], pPink[5], pPink[7]], themeColor = pLight, accentColor = secondaryColor, bgColor = themeColor[3], - linkColor = primaryColor[0], - linkColorAlt = tertiaryColor[0], - linkHighlightColor = primaryColor[1], - linkHighlightColorAlt = tertiaryColor[1], - nodeColor = textColor[0], + linkColor = pDeepPurple[2], + linkColorAlt = pPink[2], + linkHighlightColor = pDeepPurple[5], + linkHighlightColorAlt = pPink[5], + nodeColor = pDeepPurple[4], nodeHighlightColor = accentColor ; @@ -341,6 +340,7 @@ var Visualizer = (function() { }; Visualizer.prototype.reposition = function() { + if (!this.svg) return; var width = parseInt(this.svg.style("width")) || 800, height = parseInt(this.svg.style("height")) || 600; var node = this.svg.selectAll(".node"); @@ -21,6 +21,8 @@ time, mark, audio, video { } .svgContainer { + margin-top: 1.5em; + margin-bottom: 1.5em; height: 70%; } @@ -71,8 +71,8 @@ var attrFontSize = 20; function placeAttributes() { - var inputNodes = d3.selectAll(".layer-1").node(); - var attrs = d3.selectAll(".attribute").node(); + var inputNodes = d3.selectAll(".layer-1")[0]; + var attrs = d3.selectAll(".attribute")[0]; for (node=0; node<inputNodes.length; node++) { var iNode = d3.select(inputNodes[node]); d3.select(attrs[node]) @@ -86,9 +86,9 @@ d3.select("#visContainer").node().appendChild(svg.node()); var attributeNames = ["CRIM", "ZN", "INDUS", "CHAS", "NOX", "RM", "AGE", "DIS", "RAD", "TAX", "PTRATIO", "B", "LSTAT"]; - var inputNodes = d3.selectAll(".layer-1").node(); + var inputNodes = d3.selectAll(".layer-1")[0]; + console.log(inputNodes); for (node=0; node<inputNodes.length; node++) { - var iNode = d3.select(inputNodes[node]); svg .append("text") .attr("class", "attribute") |
