diff --git a/index.html b/index.html index 0ebf93b790e457c045505556d58df2e0e789cd1b..03597b731db0719eac6a303fb6d70fb1d2397c08 100644 --- a/index.html +++ b/index.html @@ -60,9 +60,9 @@ .append('text') .append("textPath") .attr("xlink:href", "#path905") //place the ID of the path here - .style("text-anchor", "middle") //place the text halfway on the arc + .style("text-anchor", "middle") .attr("startOffset", function (d) { return arrgen.center(d) }) - .text('blah') + .text(function (d) { return d.value }) .attr("font-family", "sans-serif") .attr("font-size", "10") .attr("fill", "black"); diff --git a/src/cyclicarrow.js b/src/cyclicarrow.js index a258aafe30922f638a89df9a88254247a32a1622..e0dd9f49b5ee7dc5b340180fb333ff6aef6413da 100644 --- a/src/cyclicarrow.js +++ b/src/cyclicarrow.js @@ -14,6 +14,7 @@ export default function () { for (var i = 0; i < fractions; i++) { segments[i] = { index: i, + value: data[i], start: i * seg, end: (i + 1) * seg }