Reputation: 1
Assume I had a json data like this :
{
"node1": {
id: "1",
name: "node1",
type: "A",
children: [
{
id: "11",
name: "node11",
children: [
{
id: "node111",
name: "node111",
leaf: true
},
{
id: "node112",
name: "node112",
leaf: true
}
]
}
]},
"node2": {
id: "12",
name: "node12",
children: [
{
id: "node121",
name: "node121",
leaf: true
}
]
}
}
I want to show such a data in graphical tree by use of js framework. I google it and found some good libraries like raphael, d3 ... but all of them can not read the json data and create the relational path from one node to another. I need a smart library which should recognize the parent and child relation of my data and add line between them. any idea for this? thanks in advance
Upvotes: 0
Views: 898
Reputation: 5224
Your data is tree stuctured. The Infovis library seems do visualize that good: http://thejit.org/demos/
But as @Felix Kling says, you might have to restructure your data to match the X library.
Upvotes: 1