dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.84k stars 587 forks source link

'stroke-dasharray' lines do not seem to be rendering properly when connecting with clusters #312

Closed ghost closed 6 years ago

ghost commented 6 years ago

For example:- image

node1 & node3 are connected with an edge that has the following property: {style: "stroke-dasharray: 5, 5; fill:#333";}

If I remove the fill attribute, this is what it ends up looking like: image

I basically want a normal dotted-line to be displayed as the edge between the two nodes, is this a bug? or am I missing something else? I am not sure how this should be done as I am new to dagre-d3.

cpettitt commented 6 years ago

It looks like something else is also adding a fill style to that line. If you post your graph input we could see if it is coming from there. Either way, your best bet would be to inspect the line in your browser's dev tools to see what is applying a fill.

ghost commented 6 years ago

Hi @cpettitt , Just found out the problem. It's like you said, the problem was with the external CSS that I was using to fill the arrowheads of the edges, got rid of it and now using {arrowheadStyle: "fill: #bbb"} instead and now it works. Thanks for the quick feedback and I apologize for the late reply.