|
1 | 1 | # DGMLViewer - Visual Studio Code extension
|
2 | 2 |
|
| 3 | +The [Directed Graph Markup Language (dgml)](https://en.wikipedia.org/wiki/DGML) can be used to visualize things like processes, hierarchies flows and many other things. |
3 | 4 |
|
4 |
| -## Features |
| 5 | +This extension for Visual Studio Code can be used to render a *.dgml file into a graphical representation of the graph. |
5 | 6 |
|
| 7 | +## Visualize DGML files |
| 8 | + |
| 9 | +To visualize a dgml file i Visual Studio code you click on the file to open it, then you select the DGML Viewer command from the command pallette to render the graph into a graphical representation. |
| 10 | + |
| 11 | +When the dgml file has been rendered you can save the representation into a PNG file. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +You can also choose to only save a selected part of the graph. |
| 16 | + |
| 17 | +You do this by clicking the 'Save selection as png' button, then right-click and drag to select the area you want to save. The selection is saved when you let go of the mouse button. |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +By default if the DirectedGraph element of the dgml file has a GraphDirection attribute, then this value is used to layout the graph. But by clicking the 'Change layout' checkbox you can change the layout of the graph. It will not change the dgml file itself, it will only change the rendering of the file. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +## Show information about the DGML file |
| 26 | + |
| 27 | +The file-info command of the extension shows some metadata about the dgml file: |
| 28 | + |
| 29 | + |
6 | 30 |
|
7 | 31 | ## Extension Settings
|
8 | 32 |
|
| 33 | +In the Visual Studio Code settings you find under File --> Preferences --> Settings, under Extensions, there is a section with all the settings for DGMLViewer. It is possible to change the default filenames used when the extension saves a file to the workspace folder. You can change how the graph nodes are rendered, the edge endings, the color of the root nodes and more. |
9 | 34 |
|
10 |
| -## Known Issues |
| 35 | +See the full list of settings below the screenshot. |
11 | 36 |
|
| 37 | + |
| 38 | + |
| 39 | +| Setting | Description | |
| 40 | +| --- | --- | |
| 41 | +| dgmlViewer.defaultNodeBackgroundColor | The color of the nodes of the directed graph. The string should be in rgb format. | |
| 42 | +| dgmlViewer.edgeArrowToType | The default ending of the edges. | |
| 43 | +| dgmlViewer.nodeShape | The shape of the nodes in the directed graph. Notice that 'ellipse','circle','database','box' and 'text' have the label inside the shape, the rest have the label outside the shape. | |
| 44 | +| dgmlViewer.graphSelectionGuidelineColor | The color of the guidelines used when selecting part of a directed graph. The string should be in rgba format or standard css color names. | |
| 45 | +| dgmlViewer.graphSelectionGuidelineWidth | The width of the guide lines shown when selecting part of a directed graph | |
| 46 | +| dgmlViewer.graphSelectionColor | The color of the selection rectangle used when selecting part of a directed graph. The string should be in rgba format or standard css color names. | |
| 47 | +| dgmlViewer.graphSelectionWidth | The width of the selection rectangle shown when selecting part of a directed graph. | |
| 48 | +| dgmlViewer.pngFilename | The default name used when saving the directed graph to a Png file. | |
| 49 | + |
| 50 | +## Known Issues |
12 | 51 |
|
| 52 | +The [Directed Graph Markup Language (dgml)](https://en.wikipedia.org/wiki/DGML) has the ability to specify conditional rendering of the graph. This is done by using the Style elements in the specification. In the current version of this DGMLViewer extension for Visual Studio code this conditional rendering has not been implemented. This extension only renders the colors of the nodes and links if they have categories specified or any of the styling attributes. |
0 commit comments