# HG changeset patch # User casties # Date 1449856984 18000 # Node ID cccbcc845d5455f6e4a33045e6ce1eefd6686f39 # Parent 2564732249b3ee02f42b488538c3e7c5d02f1f13 add arrowheads to commentary chains. diff -r 2564732249b3 -r cccbcc845d54 ismi-python-neo4jrestclient/static/commentaries_authors2.html --- a/ismi-python-neo4jrestclient/static/commentaries_authors2.html Thu Dec 10 16:00:49 2015 -0500 +++ b/ismi-python-neo4jrestclient/static/commentaries_authors2.html Fri Dec 11 13:03:04 2015 -0500 @@ -100,7 +100,8 @@ .node.TEXT { fill: #888; } .node.TEXT.marked { stroke: red; } .node.TEXT.selected { fill: red; } - .link { stroke: #999; stroke-opacity: .6; stroke-width: 1px; } + .link { stroke: #999; stroke-opacity: .6; stroke-width: 2px; } + .arrowHead { fill: #999 } tr.marked {border: 2px solid red;} @@ -187,13 +188,30 @@ var force = d3.layout.force() .charge(-100) // -200 - .linkDistance(15) // 30 + .linkDistance(20) // 30 .size([width, height]); var svg = d3.select("#graph").append("svg") .attr("width", "1400px").attr("height", "1400px") .attr("pointer-events", "all"); + // arrow head marker + var defs = svg.append("defs").append("marker") + .attr({ + "id":"arrow", + "markerUnits": "strokeWidth", + "viewBox":"0 -5 10 10", + "refX": 20, // 5 + "refY":0, + "markerWidth":4, + "markerHeight":4, + "orient":"auto" + }) + .append("path") + .attr("d", "M0,-5 L10,0 L0,5") + .attr("class","arrowHead"); + + // load graph d3.json(backendApiPrefix+"/graph?limit=1000", function(error, graph) { if (error) return; @@ -201,7 +219,10 @@ var link = svg.selectAll(".link") .data(graph.links).enter() - .append("line").attr("class", "link"); + .append("line").attr({ + "class": "link", + "marker-end": "url(#arrow)" + }); var node = svg.selectAll(".node") .data(graph.nodes).enter()