network_styling_with_d3 icon indicating copy to clipboard operation
network_styling_with_d3 copied to clipboard

Feature request: Directed edges (with curve)

Open ulfaslak opened this issue 6 years ago • 8 comments

ulfaslak avatar Sep 17 '18 15:09 ulfaslak

started experimenting with that here:

https://github.com/benmaier/curved-edges

benmaier avatar May 20 '19 20:05 benmaier

Neat! Doesn't look like it would be too hard to implement. Don't have time to look into it right now, but what would be reeeeeally cool (and probably look better) is edge bundling. Seems like d3 has an API for this.

ulfaslak avatar May 21 '19 07:05 ulfaslak

don't know exactly how you would like to apply edge bundling but I'm actually quite happy with this now:

http://benmaier.org/curved-edges/

edges are straight by default and only curved when two nodes both point to each other. Arrow heads are properly drawn, too. (wiggle around a bit and play around with the parameters)

benmaier avatar May 21 '19 17:05 benmaier

I've rewritten my code for easy usage and think it'd be neat to apply now.

https://github.com/benmaier/curved-edges

what do you think? :)

benmaier avatar May 22 '19 13:05 benmaier

I think you should write your damn thesis, Ben!

Jokes it'll write itself. (jokes it wont :()

It's fucking awesome! You're welcome to integrate it, otherwise I'll do it sometime next week :(.

ulfaslak avatar May 23 '19 12:05 ulfaslak

oh don't worry about integration yet, I think it'd be too much work currently -- We'd have to think about how to handle thresholding, how to redraw in matplotlib and how to design the whole process in Python. For the paper we don't really need it yet.

Yes. Thesis 🤒

benmaier avatar May 23 '19 12:05 benmaier

The way zoom works here is also very nice. I honestly can't remember why I implemented it the way I did, I think somehow I couldn't get it to work properly with canvas or something. But it's always annoyed me that I can't pan and zoom.

ulfaslak avatar May 23 '19 12:05 ulfaslak

ha. just copied bostock's force-directed layout :S

benmaier avatar May 23 '19 12:05 benmaier