@sega1985 wrote:
Hi Everyone
I have the data as below. How do i sort the data in my tree?
Say i want Dashboard, Sheets, Objects and not concerned about the other elements in nodeDataArray
or
Sheets, Dashboard, Objects and not concerned about the other elements in nodeDataArray
or
Objects, Sheets, Dashboard, Objects and not concerned about the other elements in nodeDataArray
var nodeDataArray = [
{ "name": "Dashboard" },
{ "name": "Sheets" },
{ "name": "Objects" },
{ "name": "Dimensions" },
{ "name": "Facts" },
{ "name": "Notes" }
];
var linkDataArray = [
{ "from": "Dashboard", "to": "Sheets" },
{ "from": "Dashboard", "to": "Notes" },
{ "from": "Sheets", "to": "Objects" },
{ "from": "Sheets", "to": "Notes" },
{ "from": "Objects", "to": "Dimensions" },
{ "from": "Objects", "to": "Facts" },
{ "from": "Objects", "to": "Notes" }
];
myDiagram.model = new go.GraphLinksModel(nodeDataArray, linkDataArray);
Posts: 1
Participants: 1