Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from stackD3V3 to d3.stack v4 #1375

Closed
gordonwoodhull opened this issue Mar 22, 2018 · 2 comments
Closed

Move from stackD3V3 to d3.stack v4 #1375

gordonwoodhull opened this issue Mar 22, 2018 · 2 comments
Milestone

Comments

@gordonwoodhull
Copy link
Contributor

gordonwoodhull commented Mar 22, 2018

It's a significantly different API but it provides the same or better functionality.

https://github.com/d3/d3-shape/blob/master/README.md#stack

https://github.com/d3/d3/blob/master/CHANGES.md#shapes-d3-shape

@gordonwoodhull
Copy link
Contributor Author

As a first step, I'm leaving all the existing stack infrastructure (layer objects) in place, transforming the data on input to d3v4 stack, and reading it back out into the layer objects after layout is done.

This works fine and doesn't break any tests. At first glance, it looks like streamgraphs do work out of the box, although they would need dots & lines at the bottom as well:

image

  chart
      .stackLayout(d3.stack()
                   .order(d3.stackOrderInsideOut)
                   .offset(d3.stackOffsetWiggle))

Unclear to me if there is any benefit to moving closer to the d3v4 paradigm on this - since it doesn't have any stack/layer objects, that would be a big change.

gordonwoodhull added a commit that referenced this issue Apr 20, 2018
transforming data into and out of the d3v4 format
but keeping the old layer/stack objects

fixes #1375
@gordonwoodhull
Copy link
Contributor Author

Released in 3.0 alpha 12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant