Correct Usage Of Stack.values([accessor]) In D3 Streamgraph?
I am trying to create a D3 streamgraph chart with additional data per layer using a values accessor, as demonstrated in the D3 API reference and this question at Stack Overflow. Th
Solution 1:
The stack layout knows the values accessor you've specified, but the area generator does not. So, you have to pass d.values
rather than d
to the area generator, like so:
.attr("d", function(d) { return area(d.values); })
Post a Comment for "Correct Usage Of Stack.values([accessor]) In D3 Streamgraph?"