attribute types #802
-
Really liking this library so far! Thanks for putting it together. Question on supporting attributes. It doesn't seem the types support all options in: https://www.graphviz.org/doc/info/attrs.html. Not sure if that's intentional or not. Is this something I can add a PR to add more options and documentation? Also not sure what the preferred method for setting attributes on an object is. For now I'm doing: Thanks again! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi, Thank you for using my library and noticing the flaws! PR is welcome! To add types and documentation for attributes, edit the file. https://github.com/ts-graphviz/ts-graphviz/blob/master/src/attribute.ts
Also, as a method to specify attributes at once, an https://ts-graphviz.github.io/ts-graphviz/classes/attributes.html#apply You call like this. g.attributes.node.apply({
shape: 'square',
}); Thanks! |
Beta Was this translation helpful? Give feedback.
-
The issue will be closed as if the question was resolved. PR is always welcome! |
Beta Was this translation helpful? Give feedback.
-
@all-contributors please add @seethroughdev for question. |
Beta Was this translation helpful? Give feedback.
-
I've put up a pull request to add @seethroughdev! 🎉 |
Beta Was this translation helpful? Give feedback.
Hi,
Thank you for using my library and noticing the flaws!
PR is welcome!
To add types and documentation for attributes, edit the file.
https://github.com/ts-graphviz/ts-graphviz/blob/master/src/attribute.ts
Also, as a method to specify attributes at once, an
apply
method is prepared.https://ts-graphviz.github.io/ts-graphviz/classes/attributes.html#apply
You call like this.
Thanks!