You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "zz112 (via GitHub)" <gi...@apache.org> on 2025/01/08 08:47:58 UTC
Re: [I] [Bug] polyline树图,包含子级的子级全部收缩后,再收缩父级,会残留父子级之间的连线 [echarts]
zz112 commented on issue #20209:
URL: https://github.com/apache/echarts/issues/20209#issuecomment-2577105536
before new vision release, width small data, this code may be helpful
`
// polyline;
myChart.on("click", function (params) {
if (params.componentType === "series") {
const chartView = myChart._chartsViews[0];
const mainGroup = chartView._mainGroup;
const treeNodes = chartView._data.tree._nodes;
const collapseNodes = treeNodes.filter(
(node) => !node.isExpand && node.children.length > 0
);
collapseNodes.forEach((node) => {
const symbolEl = chartView._data.getItemGraphicEl(node.dataIndex);
if (symbolEl && symbolEl.__edge) {
mainGroup.remove(symbolEl.__edge);
}
});
}
});
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org