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

bundle curve throws error with area #70

Closed
jharris4 opened this issue Jun 7, 2016 · 3 comments
Closed

bundle curve throws error with area #70

jharris4 opened this issue Jun 7, 2016 · 3 comments
Assignees

Comments

@jharris4
Copy link

jharris4 commented Jun 7, 2016

While trying out the various curves with an area shape generator I noticed that I get the following error when using the bundle curve:

Uncaught TypeError: output.areaStart is not a function

which occurs at this line of area.js

It works fine with the line generator, and I see that bundle-test.js doesn't have any tests for areas.

I guess this means bundle curves are only designed to work with lines?

In case you want a quick way to reproduce, I've attached a short example
index_html.txt

@mbostock
Copy link
Member

mbostock commented Jun 7, 2016

Correct, d3.curveBundle is only intended to work with d3.line. It’s for hierarchical edge bundling, not for rendering areas. I’ll update the documentation accordingly.

@mbostock mbostock self-assigned this Jun 7, 2016
@jharris4
Copy link
Author

jharris4 commented Jun 8, 2016

awesome, thanks for clearing that up!

@fabswt
Copy link

fabswt commented May 29, 2018

Was there any particular reason for reserving d3.curveBundle to the interpolation of lines to the exclusion of areas, starting in v4?

Back in D3 v3, I could use it on areas as well (e.g.: .interpolate("bundle").tension(0)).

FYI, I needed it in v4/v5 as well, so created a custom curve for it with some help from StackOverflow.

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

No branches or pull requests

3 participants