We use a short-hand json format to configure added emphasis for Graphviz nodes and edges based on the types we find in graphs.
["Color Module by Type",
{
"Ruby": "fillcolor=lightblue",
"Shell": "fillcolor=lightblue",
"Graphviz": "fillcolor=white"
}]["Institution Colors",
{
"Institution": "fillcolor=bisque",
"Political": "fillcolor=\"#5ccfec\"",
"Physical": "fillcolor=\"#aaf098\"",
"Graphviz": "fillcolor=white",
"Relates": "label=\" \""
}]["New Pattern Language",
{
"Section": "fillcolor=bisque",
"Pattern": "fillcolor=lightblue",
"From": "style=dashed",
"Has": "style=dotted label=\" \""
}]["Learning Journey Surprise",
{
"Learner": "fillcolor=lightblue",
"Curiosity": "fillcolor=lightblue",
"Wonderment": "fillcolor=lightblue",
"Surprise": "fillcolor=gold"
}]["Learning Journey Colors",
{
"Learner": "fillcolor=lightblue",
"Curiosity": "fillcolor=aquamarine",
"Wonderment": "fillcolor=bisque",
"Surprise": "fillcolor=gold"
}]["Linked Pages & Slugs",
{
"Page": "fillcolor=bisque",
"Slug": "fillcolor=white",
"Link": "label=\"\""
}]["Directions",
{
"Forward": "dir=forward",
"Back": "dir=back",
"Both": "dir=both",
"None": "dir=none"
}]["Story & Garden",
{
"Story": "fillcolor=lightblue",
"Garden": "fillcolor=aquamarine",
"Work": "fillcolor=bisque",
"Slug": "fillcolor=white"
}]["Algebraic Causes",
{
"Increases": "label=\"+\"",
"Decreases": "label=\"-\""
}]["Styled Causes",
{
"Increases": "style=solid label=\"\"",
"Decreases": "style=dashed label=\"\""
}]["Colored Causes",
{
"Increases": "color=blue label=\"\"",
"Decreases": "color=red label=\"\""
}]Paste json samples from above or invent your own.
http://hsc.fed.wiki/assets/scripts/import-foreign-json.html HEIGHT 240
Add code here to extract nodes and relations from _json_ and add them to _graph_. Remember node ids in _nids_.
const [name,emphasis] = json graph.addNode('Graphviz', {name,emphasis})