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
curved edges/paths #305
Comments
Latest version of dagre-d3 got updated to D3.js v4: See ebbb84f. Instead of This took me a while to figure out also. |
Change edge.lineCurve to edge.curve to match D3.js and update samples (#305)
In dagre-d3 v0.6.1 this will change to |
worked like a charm! thanks guys!! |
It looks like what you want is orthogonal routing of the edge, which is not something currently supported by dagre. |
Thanks @cpettitt I noticed I can pass in a function to the like this:
|
The x, y coordinates are control points - points where the edge must pass
through per the layout assignment. As those are prefixed with an underscore
I think that is internal data (either from dagre or d3). Take a look at
https://github.com/dagrejs/dagre/wiki#an-example-layout, which describes
the public way to get the control points.
…On Fri, Feb 2, 2018 at 11:20 AM, Tzook ***@***.***> wrote:
Thanks @cpettitt <https://github.com/cpettitt>
I noticed I can pass in a function to the lineCurve
and I see the path, but can't wrap my head around of what to do with it.
like this:
{
lineCurve: context => {
console.log(context);
return new d3.curveBasis(context);
}
}
Path:
_: "M518.6015625,120.0625L518.6015625,120.0625C518.6015625,120.0625,518.6015625,120.0625,518.6015625,120.0625C518.6015625,120.0625,518.6015625,120.0625,518.6015625,120.0625L518.6015625,120.0625",
_x0: 518.6015625,
_x1: 518.6015625,
_y0: 120.0625,
_y1: 120.0625
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAt9rKDvIg81SRTCOFF9FC0AkSobwYhks5tQ1C2gaJpZM4Rhfa0>
.
|
Thanks @cpettitt it looks great, but I want to keep using Dagre-D3 and it seems like I can pass the I could probably go find the points and connect them by myself, but surely there is a better way :/ |
@tzookb did you find any way to create custom curves? |
Sorry @sateesh2499 I moved from Dagre |
Okay. Thanks @tzookb |
It's working at Angular 7 component mapping also. g.setEdge(sourceEdge, targetEdge, { curve: d3.curveBasis }); |
It's a bit old but for future reference, here's how I handled it: Create a curve function:
Assign the curve function to the edges:
|
@herzaso any tips or idea to convert bezierCurveTo for arcTo? |
Tried to go over the docs and google but could not find nothing :/
the only thing similar is this:
but it didnt curved my edge, any ideas?
thanks!
The text was updated successfully, but these errors were encountered: