treant-js
treant-js copied to clipboard
how to add text on the connect edge?
how to add text on the connect edge as the following?
simple_chart_config = {
chart: {
container: "#tree-simple",
rootOrientation: "WEST",
levelSeparation: 450,
nodeAlign: "BOTTOM",
connectors: {
type: "step",
style: {
"stroke-width": 2
}
},
},
nodeStructure: {
text: { name: "Parent node" },
children: [
{
text: { name: "First child" }
},
{
text: { name: "Second child" }
}
]
}
};
var my_chart = new Treant(simple_chart_config);
Is there any way for the same??