CoderAllan / vscode-dgmlviewer

DGML Viewer is a extension for rendering dgml files in Visual Studio code.
MIT License
13 stars 2 forks source link

Standalone DGML Rendering JS Library? #230

Closed TheXenocide closed 4 weeks ago

TheXenocide commented 4 weeks ago

Any chance of extracting the rendering portion of this into a standalone JavaScript/TypeScript library? Would love to be able to render even simple interactive DGML in the browser and it feels like so much of that is here. I don't see anything else like it out on the web and the only styling support I need at present is HasCategory-based so this looks like a perfect fit, save for it being hosted in vscode.

CoderAllan commented 4 weeks ago

There are no plans for creating a standalone library. You have most of the logic for doing it yourself in the source code for the extension. The DGML file parser is her: https://github.com/CoderAllan/vscode-dgmlviewer/blob/main/src/dgmlParser.ts and you can find the code for generating the JavaScript for the rendering here: https://github.com/CoderAllan/vscode-dgmlviewer/blob/main/src/commands/dgmlViewer.ts The graph is rendered using this js-library: https://js.cytoscape.org/