Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add custom attribute to a dot SVG edge using jQuery

I am working on the generation of interactive graphs. So far, I have started with a dot graph that I generate SVG from.

I'd like to add custom classes to the edge so that it would be easier for me to dynamically add some information with a script.

So far, I have only found a way to add a custom identifier. Is there any way to add also a custom class?

Actually since I'm going to use jQuery to select attributes it would be enough to be able to add a custom attribute to the edge element.

like image 893
mariosangiorgio Avatar asked Sep 21 '11 09:09

mariosangiorgio


1 Answers

The dot guide recommends using the comment field for custom data. Alternatively you could use the URL field.

like image 188
Wouter Lievens Avatar answered Oct 19 '22 10:10

Wouter Lievens