Commit f1829b22 by zhaochengxiang

bug fix

parent 81ad1b4e
...@@ -75,7 +75,8 @@ const init = (ctx) => function (container, data, onCenterClick, onExpandClick) { ...@@ -75,7 +75,8 @@ const init = (ctx) => function (container, data, onCenterClick, onExpandClick) {
const model = e.item.getModel(); const model = e.item.getModel();
if (e.item.getType() === 'node') { if (e.item.getType() === 'node') {
return `${model.text||''} (${model.count})`; return `${model.text||''} (${model.count??0})`;
} }
return ''; return '';
}, },
...@@ -314,7 +315,7 @@ const init = (ctx) => function (container, data, onCenterClick, onExpandClick) { ...@@ -314,7 +315,7 @@ const init = (ctx) => function (container, data, onCenterClick, onExpandClick) {
group.addShape("text", { group.addShape("text", {
attrs: { attrs: {
text: (cfg.simple)?'':`${cfg.count}`, text: (cfg.simple)?'':`${cfg.count??0}`,
x: raduis, x: raduis,
y: raduis + 5, y: raduis + 5,
fontSize: textFontSize, fontSize: textFontSize,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment