OrgChart
OrgChart copied to clipboard
rendering graph in bullet list format
The code snippet that I am trying to use looks like this
const test = {
'name': 'Lao Lao',
'title': 'general manager',
'children': [
{ 'name': 'Bo Miao', 'title': 'department manager' },
{ 'name': 'Su Miao', 'title': 'department manager',
'children': [
{ 'name': 'Tie Hua', 'title': 'senior engineer' },
{ 'name': 'Hei Hei', 'title': 'senior engineer',
'children': [
{ 'name': 'Dan Dan', 'title': 'engineer' }
]
},
{ 'name': 'Pang Pang', 'title': 'senior engineer' }
]
},
{ 'name': 'Hong Miao', 'title': 'department manager' },
]
};
console.log(test, JSON.stringify(test));
setTimeout(() => {
this.orgChart = $(this.$refs.chartContainer).orgchart({
data: test,
nodeContent: 'title',
});
}, 1000);
But it currently outputs this structure in the div referenced by the $refs.chartContainer, can anyone help pls? I could't find anything in options to set/change this behavior.. using latest npm version