树图放大缩小时,富文本没变化
Version
4.7.0
Reproduction link
https://gallery.echartsjs.com/editor.html?c=xxtKKOPNWd&comment=0
Steps to reproduce
1、设置roam=true 2、滚轮滚动进行放大缩小
What is expected?
富文本也随着node节点放大而放大,缩小而缩小
What is actually happening?
node节点放大缩小,但是富文本不变化
Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical questions.
If you are interested in the project, you may also subscribe our mail list.
Have a nice day! 🍵
By design, reply in #12261
这么多人都提了,是不是考虑修改或者添加配置项
@pissang Should we consider to add this feature in 5.0?
文本不放大缩小的好处是,保证文字的尺寸处在一个初始设定的适合阅读的大小。 如果缩放文字,很小的文字或许并不适合阅读? 而,如果缩放到很小时,导致文本块互相重叠,外观奇怪,那么是否可从 “限制缩放范围” 角度来解决这个问题?
@woowgaga ,可不可以说说,为何想要文本缩放?
因为我的tree node很多,所以有时候会叠在一起,用户在观看的时候观感不好,所以就开放了收缩的功能,但是收缩时,只有node本身的节点收缩了,富文本没有收缩,导致观感很差。我截个效果图
如上图,node放大了,但是富文本没有放大,导致我富文本外的地方也能进行按钮点击,收缩节点
可能确实是个要解决的场景。
因为我的tree node很多
@woowgaga 你的场景中,大概有多少这样的节点?
这个不限制,用户自由设置,但是我给个用户之前用tree,我模拟的一个截图


图好像看不到,一层有20个node
其实最终我想解决的是node 堆叠问题,因为用户有时候是需要截图,但是现在截图就会堆叠,看不清有的node 目前我有两种思路, 1、收缩的方式,但是收缩现在的问题就是node收缩,富文本不收缩 2、没有地方设置node的间距
还一种就是调整画布大小,但是现在找不到好的方式去计算如果不堆叠,宽度怎么计算
@woowgaga 多谢,了解了。这个堆叠确实是个问题。 树的布局中对节点大小的考虑有一定的问题。 另外可能也应该有些手动设置间距的,或者节点缩放的配置。
我们也有类似需求,类似 gojs 那种缩放,整体进行缩放方面用户截图预览
2022年了,请问这个问题有什么解决方案了吗?
可以试试 rem
@susiwen8 谢谢了。我这边现在采用的办法是用非原生的react-map-interaction来实现zoom
@hjyssg 我最终用了OrgChart
2024年了,看来是没戏了