moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Clickable charts? #34

Open moodymudskipper opened 3 years ago

moodymudskipper commented 3 years ago

When we output html with svg = TRUE we can select text. If we can do that there might be a way to change this text to a hyperlink . I have no idea how that would work (post process the html file?) but for package doc this would have great value for instance.

joint-hubs commented 2 years ago

hi, thats a good idea ;) btw how i can zoom in to the image details? I have a problem that the function is quite long and i cant read it in the viewer., also saved it to .png but the resolution is poor and i cant see the text.

flow
moodymudskipper commented 2 years ago

Hi, have you tried out = "pdf" or out = "html" ? If it doesn't work out please open a separate issue and provide an example of a problematic function so I can reproduce it on my side.

joint-hubs commented 2 years ago

thanks, yes, i found it in the function description and it worked out with out = example.png

If i got it right the function displays if and for and related chunks of code. Would it be possible to add more shapes for different elements of a function (for example: data, transforming tables, training model)?

moodymudskipper commented 2 years ago

@joint-hubs it might be possible, everything that can be done with diagrams to understand code better is in scope for this package. I'd need more details and examples though, can you open a dedicated issue for those ? It's better to keep the discussions focussed on a the given topic (clickable charts in this case) to be able to track progress and make it easier for users and contributors to find their way.

moodymudskipper commented 2 years ago

See https://github.com/cynkra/dm/issues/1153 for dm/DiagrammeR solution (WIP). We can probably do the something similar.

We need to investigate:

1st step is to detect click / hover and display something 2nd step is more advanced dynamic diagrams Among 2nd step is jumping from diagram to diagram, and folding/unfolding. Folding/unfolding is technically possible without server input, we can store all children in a node and have a nested structure, but that's probably more xml manipulation that what I'm ready to do.