treant-js icon indicating copy to clipboard operation
treant-js copied to clipboard

how to add text on the connect edge?

Open autodataming opened this issue 5 years ago • 1 comments

how to add text on the connect edge as the following? addtext

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);

autodataming avatar Oct 15 '19 05:10 autodataming

Is there any way for the same??

tatha-technicise avatar Jul 10 '20 12:07 tatha-technicise