What problem does this feature solve?
当tree中含有大量节点,比如几百个,上千个, 为了避免节点间的重叠,我按照网上搜索还有issue中的方法( #16181 ),计算需要的最大高度和宽度,设置为echarts的宽高。
这就导致画布canvas 高度有2w px,宽度有4000px。
这个时候,画布的任何操作都会非常卡顿。
What does the proposed API look like?
大宽高的canvas会很卡顿,所以需要在页面宽高的canvas下, 灵活设置节点间隔的方法。
或者能帮忙提供一个 超多节点的优化显示方式(设置超大画布会导致很卡顿)
3条答案
按热度按时间ca1c2owp1#
@shmilyoo 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
[Feature] tree map node gap, overlapping or canvas stuttering caused by a large number of nodes
BODY
What problem does this feature solve?
When the tree contains a large number of nodes, such as hundreds, thousands, in order to avoid overlap between nodes, I calculated the maximum height and width required according to the method in the online search and issue ( #16181 ), and set it to the width and height of echarts.
This results in a canvas canvas with a height of 2w px and a width of 4000px.
At this time, any operation of the canvas will be very stuttering.
What does the proposed API look like?
Large and wide canvas will be very stuttering, so you need to flexibly set the node interval under the page width and height canvas.
Or it can help provide an optimized display method with a large number of nodes (setting a large canvas will cause a lot of stuttering)
deyfvvtc2#
2w px 宽度的 canvas 是不合理的,有性能问题也是理所当然的。这个问题的解法不是用更大的画布,而是支持树图的缩放功能。 #17471 这个 PR 支持了这一个功能,但好像 @100pah 还要优化下才能在下一个版本中发布,请关注一下这个 PR。
ukdjmx9f3#
@Ovilia 请务必使用超大量节点树图或关系图进行测试。
根据我的使用场景,当树节点非常多,比如800个节点的时候,保持画布原始大小,即使zoom放大了很多倍,仍然有很多节点是重叠的。
这个时候,我想动态的更改symbol的size来进行适配,但是就会显得整个图非常的空旷。