AMCharts 4 有向树 - 查找节点并缩放它

发布于 2025-01-13 23:20:34 字数 252 浏览 2 评论 0原文

我正在尝试使用 JavaScript 使用 Amcharts 4 搜索力定向树中的节点。找到节点后,我想缩放节点上的图表。

我试图在 DOM 中按节点名称搜索节点,但它没有按预期工作。

chart.zoomToDataItem(itemToFind, Zoom = 1.85, true);

不幸的是,我不知道如何查找项目,而且在文档中也找不到。有人可以帮助我吗?

感谢您的帮助,

亲切的问候

I'm trying to search a node in a Force Directed Tree with Amcharts 4 using JavaScript. After I found the node, I'd like to zoom the chart on the node.

I'm trying to search the node by its name in the DOM but it's not working as expected.

chart.zoomToDataItem(itemToFind, zoom = 1.85, true);

Unfortunatly I don't know how to find an item, and I can't find in the doc either. Does any one can help me ?

Thank you for your help,

Kind Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文