Permalink
Browse files

First arrow head experiment

  • Loading branch information...
1 parent 8e6abca commit 39c4e83f14f1840344a96b1a280dad5218f0e742 @Munter committed Jan 24, 2013
Showing with 11 additions and 2 deletions.
  1. +2 −1 tpl/graph.js
  2. +9 −1 tpl/index.html
View
@@ -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
@@ -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>

0 comments on commit 39c4e83

Please sign in to comment.