flow icon indicating copy to clipboard operation
flow copied to clipboard

Clickable charts?

Open moodymudskipper opened this issue 3 years ago • 5 comments

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.

moodymudskipper avatar Aug 10 '20 09:08 moodymudskipper

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

joint-hubs avatar Dec 28 '21 09:12 joint-hubs

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.

moodymudskipper avatar Dec 28 '21 13:12 moodymudskipper

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)?

joint-hubs avatar Dec 28 '21 14:12 joint-hubs

@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 avatar Dec 28 '21 17:12 moodymudskipper

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

We need to investigate:

  • Clickable nodes
  • Clickable words

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.

moodymudskipper avatar Jun 24 '22 07:06 moodymudskipper