commit bc5c32b6c4d6a53bd630bbe28a9eff32f8dc6300
parent cc07168ab1a82a943eefed0c749729b2db790fac
Author: l0bsterz <hide4653@gmail.com>
Date: Thu, 17 Sep 2020 05:19:14 +0000
white svg lines
Diffstat:
2 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/d34.html b/d34.html
@@ -39,10 +39,29 @@ p{
}
#col{
+ color: white;
+
+}
+text{
+ stroke-width: 0.09;
+ stroke: white;
+ fill: white;
+}
+.node {
+ color: white;
+ stroke-width: 1.0px;
+ fill: white;
+}
+
+.link {
+ stroke: #555;
+ stroke-width: 1.0px;
}
-.text{
- color:black;
+
+.node text {
+ font: 13px ;
+
}
/* */
@@ -80,12 +99,11 @@ input::placeholder {
<div class="col-xsm-12" id = "col">
<script src="https://d3js.org/d3.v3.min.js"></script>
-
<script>
//Constants for the SVG
- var width = 450,
- height = 420;
+ var width = 350,
+ height = 300;
//Set up the colour scale
var color = d3.scale.category20c()
@@ -94,9 +112,9 @@ input::placeholder {
.range(["#87404f", "#615772" , "#4c9882"]);
//Set up the force layout
var force = d3.layout.force()
- .gravity(0.03)
- .charge(-240)
- .linkDistance(100)
+ .gravity(0.05)
+ .charge(-150)
+ .linkDistance(80)
.size([width, height]);
@@ -144,6 +162,7 @@ input::placeholder {
.data(graph.links)
.enter().append("line")
.attr("class", "link")
+ .attr('font-color', 'white')
.style("stroke-width", function (d) {
return Math.sqrt(d.value);
});
@@ -157,6 +176,7 @@ input::placeholder {
node.append("circle")
.attr("r", 10)
+ .attr('font-color', 'white')
.style("fill", function (d) {
return color(d.group);
@@ -172,11 +192,12 @@ input::placeholder {
.attr("xlink:href",function(d) { return d.url; })
.attr("target", "_blank")
//.text(function(d) { return d.url; }) (this isnt clugy enough)
- .append("text")
+ .append("text", "fill", "white")
.attr("dx", 8)
.attr("dy", 3)
.attr("text-anchor", "start")
-
+ .attr('font-color', 'white')
+ .attr('font-color', 'white')
.text( function(d) { return d.name; });
} else {
@@ -184,7 +205,7 @@ input::placeholder {
.attr("dx", -8)
.attr("dy", 3)
.attr("text-anchor", "end")
-
+ .attr('font-color', 'white')
.text(function(d) { return d.name; });
}
});
@@ -226,6 +247,7 @@ input::placeholder {
</script>
+
</div>
</div>
</div>
diff --git a/slkscr.ttf b/slkscr.ttf
Binary files differ.