-
Notifications
You must be signed in to change notification settings - Fork 4
Format
Richard Marcus edited this page Sep 10, 2020
·
4 revisions
We use JSON to represent the graphs. Such a file consists of an node array and an edge array.
{
"nodes": [
{
"id": "MiKoMH/AI/source/prolog/en/logic-programming-intro.tex",
"color": "#0000ff",
"label": "logic-programming-intro"
},
{
"id": "MiKoMH/AI/source/prolog/en/facts-rules.tex",
"color": "#0000ff",
"label": "facts-rules"
}
],
"edges": [
{
"id": "MiKoMH/AI/source/prolog/en/facts-rules.tex??MiKoMH/AI/source/prolog/en/logic-programming-intro.tex",
"style": "include",
"to": "MiKoMH/AI/source/prolog/en/facts-rules.tex",
"from": "MiKoMH/AI/source/prolog/en/logic-programming-intro.tex",
}
]
}
It is easy to add new fields to the JSON in the future but for now, we use the following:
- node: id for identification, color of the 3D node object and a text label
- edge: id for identificaiton, target and origin node id and a style, which is later mapped to a certain layout attribute.