Version
5.4.3
Link to Minimal Reproduction
Steps to Reproduce
setInterval(function() {
const data = {
name: 'a',
children: [
{
name: Math.random(),
},
]
};
option = {
series: [
{
type: 'tree',
data: [data],
edgeShape: "polyline",
label: {
backgroundColor: '#fff',
position: 'left',
verticalAlign: 'middle',
align: 'right'
},
leaves: {
label: {
position: 'right',
verticalAlign: 'middle',
align: 'left'
}
},
}
]
};
myChart.setOption(option);
}, 2000);
Current Behavior
当数据更新时,连接线消失
Expected Behavior
当数据更新时,连接线不消失
Environment
- OS: Windows 10.8.4
- Browser: Chrome 115
- Framework: None
Any additional comments?
No response
7条答案
按热度按时间kkbh8khc1#
@genezx It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] Treemap polyline connector disappears when updating data
6qqygrtg2#
This looks like a replace operation, not an update.
For a proper replace, use
myChart.setOption(option, true);
.For an updatedo this .
Both work as intended.
0yg35tkg3#
This looks like a replace operation, not an update. For a proper replace, use
myChart.setOption(option, true);
. For an updatedo this . Both work as intended.Thank you for reply, but the first solution
myChart.setOption(option, true);
does not work, and the second solution works.And the third solution is:
I don't know why the first solution does not work.
yc0p9oo04#
Because of
edgeShape: "polyline",
- remove it, sorry did not mention that.NB: please close issue if problem solved.
7z5jn7bk5#
I'm sorry but I need
edgeShape: "polyline"
because of the line style.So the issue is not solved for update operation.
The only workaround is to dispose the instance and re-init.
frebpwbc6#
It is all related to this bug #18448
v64noz0r7#
Yes I agree