# Interactive graph providing information when passing mouse on node

**URL:** <https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157>\
**Category:** Uncategorized\
**Created:** [May 8, 2022, 4:14am UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157 "2022-05-08T04:14:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frow](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@Frow](https://forum.graphviz.org/u/Frow)\
**Post date:** [May 8, 2022, 4:14am UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/1 "2022-05-08T04:14:15Z")

</div>

All is in the title. Is there some libraries with which I could produce graph with graphviz, reacting to mouse selection like providing additional information when node is selected or opening a web link?  
I think the best would be to load the graph inside a web browser for instance but I am not expert and if you have knowledge of solutions, I would be happy you share it here

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [May 8, 2022, 5:27pm UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/2 "2022-05-08T17:27:36Z")

</div>

Consider the **svg** output format and the **URL** ([URL | Graphviz](https://graphviz.org/docs/attrs/URL/)) & **tooltip** ([tooltip | Graphviz](https://graphviz.org/docs/attrs/tooltip/)) attributes.

---

<div class="post-metadata">

**Author:** ![Frow](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@Frow](https://forum.graphviz.org/u/Frow)\
**Post date:** [May 8, 2022, 6:19pm UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/3 "2022-05-08T18:19:18Z")

</div>

Thank you steveroush. Is there an option that could highlight the selected node or edge?

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [May 8, 2022, 6:40pm UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/4 "2022-05-08T18:40:31Z")

</div>

Not that I know of.

---

<div class="post-metadata">

**Author:** ![scnorth](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/scnorth/32/89_2.png) [@scnorth](https://forum.graphviz.org/u/scnorth)\
**Post date:** [May 10, 2022, 12:00pm UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/5 "2022-05-10T12:00:12Z")

</div>

This is a very reasonable idea. It’s just not possible as far as I know, in SVG. Implementations of this idea use CSS or Javascript, which we don’t generate. I wonder if there are already good implementations of wrappers or in a transpiler environment like d3-graphviz. Probably @magjac knows?

---

<div class="post-metadata">

**Author:** ![magjac](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/magjac/32/16_2.png) [@magjac](https://forum.graphviz.org/u/magjac)\
**Post date:** [May 10, 2022, 8:18pm UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/6 "2022-05-10T20:18:35Z")

</div>

If you are prepared to write some JavaScript code you can use [d3-graphviz](https://github.com/magjac/d3-graphviz). This example might serve as an inspiration:

> <https://gist.github.com/magjac/28a70231e2c9dddb84b3b20f450a215f>

---

<div class="post-metadata">

**Author:** ![Frow](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@Frow](https://forum.graphviz.org/u/Frow)\
**Post date:** [May 10, 2022, 9:48pm UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/7 "2022-05-10T21:48:14Z")

</div>

Thank you magjac, I will give it a try with d3-graphviz

---

<div class="post-metadata">

**Author:** ![scnorth](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/scnorth/32/89_2.png) [@scnorth](https://forum.graphviz.org/u/scnorth)\
**Post date:** [May 11, 2022, 1:26am UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/8 "2022-05-11T01:26:40Z")

</div>

I wonder if we should provide this as an example. I wonder if we should highlight this work more prominently on our website.

---

<div class="post-metadata">

**Author:** ![ronman](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@ronman](https://forum.graphviz.org/u/ronman)\
**Post date:** [May 13, 2022, 12:27am UTC](https://forum.graphviz.org/t/interactive-graph-providing-information-when-passing-mouse-on-node/1157/9 "2022-05-13T00:27:55Z")

</div>

If I understand what you’re wanting correctly, [IdeaTree.net](https://www.ideatree.net) does this. A mouseover of a node displays comments, a longer description of the node, who created the node and date of creation.
