Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translating Graph Representations to DOT Code #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hecriv23
Copy link

This code creates a function within the Karl interface that allows for users to copy an automatically generated DOT language representation that can be pasted into the GraphViz DOT playground where the same structure will appear. To do this, first go into the text_graph_html.ts file in the src/sidebar file. In line 39, a specific graph can be chosen for viewing. If you would like to keep this graph, then leave it , if not then change it and run build. After, go to the interface and at the bottom under 'Text Graph' click save. The code will be copied to your clipboard. You can then go to GraphViz and paste the copied item onto the left side, and your visual will be shown.

…anslated to text read by the dot DSL. The file first starts with creating the save and reset buttons to be used to create the said text version of the graph. Then, with graphToWords(), the elements of the graph (modules, sensors, direction of information flow, and network details) are each added to a string that resembles the dot language. Each element of the graph is read through specific values that make it up, and the output is the dot version of the graph.
representation of nodes through adding their inputs and outputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant