hustcc / hustcc/echarts-for-react
树形图处理大量数据时(叶子节点数约为2600),如果对展开层级做动态设置,页面报错
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 650
- PR merge metrics
- No merged PRs in 30d
Description

option的配置如下
`
return {
tooltip: {
trigger: 'item',
triggerOn: 'mousemove',
},
series: [
{
type: 'tree',
data: [data],
top: '1%',
left: '7%',
bottom: '1%',
right: '20%',
symbolSize: 7,
label: {
position: 'left',
verticalAlign: 'middle',
align: 'right',
fontSize: 9,
},
leaves: {
label: {
position: 'right',
verticalAlign: 'middle',
align: 'left',
},
},
emphasis: {
focus: 'descendant',
},
// initialTreeDepth: 1,
initialTreeDepth: data?.nodeCount < 50 ? -1 : 1, // -1 表示展开所有节点
animationDuration: 550,
animationDurationUpdate: 750,
},
],
};
`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.