ford icon indicating copy to clipboard operation
ford copied to clipboard

[Feature request] Download graphs

Open victorsndvg opened this issue 6 years ago • 2 comments

Dear all,

sometimes graphs, when they are big or complex, are hard to see and explore.

As a documentation reader, sometimes I need a bigger window to see Ford graphs.

How to do that?

I really don't know, but 2 alternatives come to my mind:

  1. Add a button to see the graphs in the whole screen
  2. Add a button to download the image (SVG) and I will open the picture locally with my preferred tool/viewer.

Option 1 is nice to have "everything on the browser", but option 2 seem to be more versatile. In addition, with option 2 you can directly take this graphs and use them in a document/article, edit the picture, etc ...

I found issue #97 and (in the past) it seems that the second option could be easier to implement.

What do you think? Is it an interesting feature for other devs?

Thanks in advance, BR.

victorsndvg avatar Aug 30 '19 07:08 victorsndvg

Regarding option 2: This should be rather easy in conjunction with the graph_dir option, which stores the files in svg format in a separate directory. Just a link to these svg files would be needed?

As the view box for the html-rendered graphs is too small for more complex dependency graphs, this option would be really helpful for larger projects.

mscfd avatar Feb 15 '24 13:02 mscfd

I have done some changes to solve the problem for big graphs. For anybody who also has problems with graphs on big projects, these adjustments might be useful. But those are hacks, not proper html solution, as I have zero experience with html-rendering.

In order to make use of my wide desktop screen, I replaced the fixed width container by a fluid container, changed html templates (e.g. md-3 to md-2 for the left side navigation columns), increased the width of dot-graphs and adjusted some other dot-options (like monospace, fontsize).

However, the width of graphs does not seem to be flexible and depends on screen size and zoom level, and I have zero experience with html-rendering to make this proper.

mscfd avatar Feb 27 '24 10:02 mscfd