d3 / d3-shape

Graphical primitives for visualization, such as lines and areas.
https://d3js.org/d3-shape
ISC License
2.48k stars 310 forks source link

Request an Updated d3.stack() Example #93

Closed drewpc closed 7 years ago

drewpc commented 7 years ago

The changes from v3 (d3.layout.stack) to v4 (d3.stack) are confusing because it seems that the the new function cannot operate on the same data. For example, I attempted to convert the stacked to multiples example from v3 to v4. Based on the CHANGELOG comment about the stack.out function, I can't figure out how to use the exact same data from the v3 version and still use the new function. Can someone add a new example or further clarify how to use the new stack function with the same data from the v3 implementation?

mbostock commented 7 years ago
mbostock commented 7 years ago
indepth2 commented 7 years ago

Anyone ever get the stacked-to-multiples example working in D3 V4? I've been working on it for hours and just can't get it. I can only imagine how busy Mike must be; but based on my experience and A LOT of the questions/comments on stack exchange, I think it would really be helpful to a lot of us to see some of these EXACT V3 examples we've been using updated to work with V4.

drewpc commented 7 years ago

Nope. The examples given prior to closing this request don't address the issue. I ended up having to go back to D3 v3 in order to do what I needed to.

indepth2 commented 7 years ago

Thanks Drew. I'm going to give it one more try, but man there are just so many differences in the way things are done. And I'm not exactly proficient in D3 at this point.

indepth2 commented 7 years ago

Hey Drew, I had posted this over on stack exchange as well and (it took about a week) but someone did finally go ahead and convert the example to V4 for me. Here is the link to the jsFiddle they provided: https://jsfiddle.net/levvsha/vrbq7ebz/