![]() The notebook I forked from already toggles the styling of nodes, so I think it establishes the principle that such things can be exposed fully to scripting, … it’s just a matter of working out the details (and thinking about mobile/desktop/accessibility UX-level concerns). Note that I forked from a notebook which depends on the hpcc-js-wasm re-packaging of graphviz, rather than the Observable built-in. My rough experiments are here: Can GraphViz dot be made more interactive? fork: with click/selection handling? / Dan Brickley / Observable It isn’t working, but realistically I’m not going to have time to figure this out for a while so I thought I’d share the half-baked idea in case it’s interesting for others here. What I have tried to do is tweak a notebook I found, such that if you click a node it will call a nominated callback. The closest was Hyperlink in Graphviz node doesn't work which is concerned with URLs being clickable. I searched the forum and couldn’t see any discussion of this. For example, to show more details, state or offer interaction opportunities contextualized to one of the possibly very many nodes in a graph. Sometimes it seems to take a few seconds after you reload. Exiting the node reverts back to the original text. Clicking on node c should change the text in the cell to yield of click count. If you check out the notebook, you should notice that the graph and text live in two different cells. However it would be so much richer if the nodes in the dot diagram could be made to interact with the rest of the notebook. Here’s an example: Mark McClure Graphviz click demo. An image-map is basically a set of coordinates, adding hyperlink-areas to an image. I am working with graph data models that are very nicely visualizable using graphviz/dot. Using Dot-generated graphs as clickable HTML nodes. ![]() I have only recently appreciated how clever Observable is, so I may be missing some basics.
0 Comments
Leave a Reply. |