Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

First arrow head experiment

  • Loading branch information...
commit 39c4e83f14f1840344a96b1a280dad5218f0e742 1 parent 8e6abca
@Munter authored
Showing with 11 additions and 2 deletions.
  1. +2 −1  tpl/graph.js
  2. +9 −1 tpl/index.html
View
3  tpl/graph.js
@@ -47,7 +47,8 @@ window.onload = function () {
.data(force.links())
.enter()
.append('path')
- .attr('id', function (d, i) { return 'p' + i; });
+ .attr('id', function (d, i) { return 'p' + i; })
+ .attr('marker-end', 'url("#arrow")');
var edgeLabels = svg.append('g')
.attr('class', 'relationLabels')
View
10 tpl/index.html
@@ -5,7 +5,15 @@
</head>
<body>
- <svg class="graph"></svg>
+ <svg class="graph">
+ <defs>
+ <marker id="arrow" orient="auto"
+ markerWidth="200" markerHeight="200" markerUnits="userSpaceOnUse"
+ refX="6" refY="2">
+ <path d="M0,0 V4 L2,2 Z" />
+ </marker>
+ </defs>
+ </svg>
<script src="vendor/d3.v3.min.js"></script>
<script src="graph.js"></script>
Please sign in to comment.
Something went wrong with that request. Please try again.