Skip to content
Snippets Groups Projects
Commit 00f11fad authored by wonko's avatar wonko
Browse files

use text from data as label

parent 2e9ab026
Branches
No related tags found
No related merge requests found
......@@ -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");
......
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment