在D3中搜索元素 - 强制布局或树 [英] Search for an element in D3 - force layout or tree

查看:138
本文介绍了在D3中搜索元素 - 强制布局或树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个例子,在d3js布局(强制引导或树)中搜索一个元素并突出显示该元素?



我认为会有一个

我写了一个工具,允许浏览生物监管网络,显示了两个SVG面板并排。每个面板包含由d3.js API绘制的转录因子(节点)的力布局网络。您可以输入转录因子的名称,并使用与发生 mouseover 事件时使用的代码相同的代码突出显示它。探索代码可能会让您深入了解如何完成。


Is there an example of searching for an element in a d3js layout (force directed or tree) and highlighting that element?

I am thinking that there would be a text field where user enters values to search.

解决方案

I wrote a tool that allows browsing biological regulatory networks, showing two SVG panels side-by-side. Each panel contains a force-layout network of transcription factors (the nodes), as drawn by the d3.js API. You can type in the name of a transcription factor and it will highlight it using the same code as is used when a mouseover event occurs. Exploring the code might give you some insight into how it's done.

这篇关于在D3中搜索元素 - 强制布局或树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆