forcegraph: color theme 4

This commit is contained in:
Nils Schneider 2015-07-07 11:59:47 +02:00
parent b1d876026b
commit d1beb51868
2 changed files with 10 additions and 15 deletions

View file

@ -309,13 +309,13 @@ define(["d3"], function (d3) {
} }
}) })
ctx.fillStyle = "rgba(220, 0, 103, 0.7)" ctx.fillStyle = "#99173C"
ctx.fill() ctx.fill()
if (highlightedLinks.length) { if (highlightedLinks.length) {
ctx.save() ctx.save()
ctx.lineWidth = 10 ctx.lineWidth = 10
ctx.strokeStyle = "#FFD486" ctx.strokeStyle = "#F2AB38"
highlightedLinks.forEach(function (d) { highlightedLinks.forEach(function (d) {
ctx.beginPath() ctx.beginPath()
@ -351,12 +351,9 @@ define(["d3"], function (d3) {
ctx.arc(d.x, d.y, 8, 0, 2 * Math.PI) ctx.arc(d.x, d.y, 8, 0, 2 * Math.PI)
}) })
ctx.strokeStyle = "#d00000" ctx.fillStyle = "#555152"
ctx.fillStyle = "#ffffff"
ctx.lineWidth = 2.5
ctx.fill() ctx.fill()
ctx.stroke()
ctx.beginPath() ctx.beginPath()
nodes.filter(visibleNodes).forEach(function (d) { nodes.filter(visibleNodes).forEach(function (d) {
@ -364,16 +361,14 @@ define(["d3"], function (d3) {
ctx.arc(d.x, d.y, 8, 0, 2 * Math.PI) ctx.arc(d.x, d.y, 8, 0, 2 * Math.PI)
}) })
ctx.strokeStyle = "#AEC7E8" ctx.fillStyle = "#EFFFCD"
ctx.fillStyle = "#ffffff"
ctx.fill() ctx.fill()
ctx.stroke()
if (highlightedNodes.length) { if (highlightedNodes.length) {
ctx.save() ctx.save()
ctx.strokeStyle = "#FFD486" ctx.strokeStyle = "#F2AB38"
ctx.fillStyle = "orange" ctx.fillStyle = "#EFFFCD"
ctx.lineWidth = 6 ctx.lineWidth = 6
highlightedNodes.forEach(function (d) { highlightedNodes.forEach(function (d) {
@ -569,7 +564,7 @@ define(["d3"], function (d3) {
e.target = newNodesDict[d.target.id] e.target = newNodesDict[d.target.id]
if (d.vpn) if (d.vpn)
e.color = "rgba(0, 0, 0, " + (0.5 / d.tq) + ")" e.color = "rgba(170, 162, 164, " + (0.6 / d.tq) + ")"
else else
e.color = linkScale(d.tq).hex() e.color = linkScale(d.tq).hex()
@ -602,8 +597,8 @@ define(["d3"], function (d3) {
bctx.textAlign = "center" bctx.textAlign = "center"
bctx.lineWidth = lineWidth bctx.lineWidth = lineWidth
bctx.lineCap = "round" bctx.lineCap = "round"
bctx.strokeStyle = "rgba(255, 255, 255, 0.8)" bctx.strokeStyle = "rgba(85, 81, 82, 0.03)"
bctx.fillStyle = "rgba(0, 0, 0, 0.6)" bctx.fillStyle = "rgba(220, 233, 190, 0.8)"
bctx.miterLimit = 2 bctx.miterLimit = 2
bctx.strokeText(name, buffer.width / (2 * scale), buffer.height / (2 * scale)) bctx.strokeText(name, buffer.width / (2 * scale), buffer.height / (2 * scale))
bctx.fillText(name, buffer.width / (2 * scale), buffer.height / (2 * scale)) bctx.fillText(name, buffer.width / (2 * scale), buffer.height / (2 * scale))

View file

@ -1,7 +1,7 @@
.graph { .graph {
height: 100%; height: 100%;
width: 100%; width: 100%;
background: url(img/gplaypattern.png); background: #2E2633;
canvas { canvas {
display: block; display: block;