dabeng / OrgChart

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
MIT License
2.86k stars 768 forks source link

Get Node by id #648

Open Lo2David opened 2 years ago

Lo2David commented 2 years ago

Hello I'm searching a simple way to select a node by id in javascript. var ExtractNode = oc.node[i] or oc.orgchart.node[i] doesn't work !

var datascource = { 'id':0, 'name': 'Ball game', 'children': [ { 'id':1 , 'name': 'Football' }, { 'id':2 , 'name': 'Basketball' }, { 'id':3 , 'name': 'Volleyball' } ] }; var oc = $('#chart-container').orgchart({ 'data' : datascource, 'nodeTitle' : 'name' } });

mm05112 commented 2 years ago

你的邮件我已收到,愿七色之夏的光辉永远守护你