tintinweb / vscode-interactive-graphviz

Interactive Graphviz Dot Preview for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=tintinweb.graphviz-interactive-preview
GNU General Public License v3.0
157 stars 28 forks source link

Is it possible to load stylesheet? #147

Open zizhengwu opened 1 year ago

zizhengwu commented 1 year ago

For example, vscode-interactive-graphviz doesn't seem to pick up the following stylesheet

digraph {
    stylesheet = "/Users/zizhengwu/Downloads/graphviz-style.css"
}
bigbug commented 1 year ago

Hi, thanks for this. At the moment loading stylesheets is not possible. We will look into this, but this won't happen any time soon. However, you should be able to use this using the export SVG function. The exported SVG should pick up your CSS file.

LaoshuBaby commented 9 months ago

Hi, thanks for this. At the moment loading stylesheets is not possible.

The current effect is this:

图片

I'm very curious about how this effect is achieved in the preview. Is it because it uses a special tool to generate dots?

https://github.com/tintinweb/vscode-interactive-graphviz/blob/1074d8c264b05c9460aeacf1027fc5c61e43ac29/README.md?plain=1#L14

bigbug commented 9 months ago

Hi, thanks for this. At the moment loading stylesheets is not possible.

The current effect is this:

图片

I'm very curious about how this effect is achieved in the preview. Is it because it uses a special tool to generate dots?

https://github.com/tintinweb/vscode-interactive-graphviz/blob/1074d8c264b05c9460aeacf1027fc5c61e43ac29/README.md?plain=1#L14

In the preview it is done with inline styles. See available attributes at https://graphviz.org/doc/info/attrs.html