I need to render a graph on the Web (using cytoscape.js) which includes compound nodes and custom data attributes. Which means a JSON like this:
{
"nodes": [
{ "data": { "id": "a", "parent": "b" }, "position": { "x": 215,"y": 85 } },
{ "data": { "id": "b" } },
{ "data": { "id": "c", "parent": "b" }, "position": { "x": 300,"y": 85 } },
{ "data": { "id": "d" }, "position": { "x": 215, "y": 175 } },
{ "data": { "id": "e" } },
{ "data": { "id": "f", "parent": "e" }, "position": { "x": 300,"y":175 } }
],
"edges": [
{ "data": { "id": "ad", "source": "a", "target": "d" } },
{ "data": { "id": "eb", "source": "e", "target": "b" } }
]
}