请问,可编辑的案例edit-chart.html,想在编辑图表之后生成json数据,设置了'verticalLevel': 4,属性之后然后调用getHierarchy方法,报错了,有啥办法吗?

This issue has been tracked since 2021-01-27.

image
loopChart: function ($chart, includeNodeData) {
includeNodeData = (includeNodeData !== null && includeNodeData !== undefined) ? includeNodeData : false;
var that = this;
var $tr = $chart.find('tr:first');
// console.log($tr.find('.node'),"----");
var subObj = { 'id': $tr.find('.node')[0].id };
if (includeNodeData) {
var $node = $($tr.find('.node')[0])
$.each($node.data('nodeData'), function (key, value) {
subObj[key] = value;
});
}
$tr.siblings(':last').children().each(function() {
if (!subObj.children) { subObj.children = []; }
subObj.children.push(that.loopChart($(this), includeNodeData));
});
return subObj;
},

More Details About Repo
Owner Name dabeng
Repo Name OrgChart
Full Name dabeng/OrgChart
Language JavaScript
Created Date 2016-02-06
Updated Date 2022-11-25
Star Count 2498
Watcher Count 150
Fork Count 746
Issue Count 358

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date