Comments (5)
The code in commit 185121f is a proof of concept, but works fine so far.
from ford.
Something a bit simpler that might be sufficient:
modified ford/graphs.py
@@ -450,11 +450,11 @@ class TypeNode(BaseNode):
node.visible = getattr(proto, "visible", True)
if self in node.comp_of:
- node.comp_of[self] += ", " + var.name
+ node.comp_of[self] += f"\n{var.name}"
else:
node.comp_of[self] = var.name
if node in self.comp_types:
- self.comp_types[node] += ", " + var.name
+ self.comp_types[node] += f"\n{var.name}"
else:
self.comp_types[node] = var.name
from ford.
This stacks names in a column, instead of printing them in a row, right? I have tried this, and it is definitely an improvement. But from looking at some of my graphs, I concluded that a compact box (a few lines with restricted width) uses the typical real estate in a graph optimally. That's why I arrived at my rather complex logic. I definitely would restrict the size of the label horizontally as well as vertically if there are too many items to avoid degenerating the graph.
from ford.
Have you looked at textwrap.wrap
?
I do also think the graphs should be comprehensive rather than compact, so I don't think it should cut off components.
from ford.
Thanks for pointing to this module, did not know about it. Indeed something like textwrap.fill(s, width=40, max_lines=3, placeholder='...')
yields the same result as my code block.
This is not about having compact graphs. It is about having readable graphs. I have already replaced the container by a container-fluid to really use my screen size for graphs, otherwise most graphs are unusable, see #293. With long edges (or long nodes), the whole graph shrinks and labels become unreadable without zooming.
One could question whether nesting levels greater than 2 or 3 are really necessary. But it really helps with refactoring and decoupling in a matured and grown code base.
from ford.
Related Issues (20)
- Derived-types declared in submodules are missing HOT 6
- Parser failure in associate block with []-arrays
- Division by zero exception in lines_description of sourceform.py HOT 4
- Some attributes are missing from derived types
- Option coloured_edges is broken HOT 1
- Can't link from a page to source code HOT 3
- Bug in logic to skip big or incomplete graphs HOT 1
- show_proc_parent is ignored HOT 2
- Create FAQ
- Feature request: Option to turn off certain homepage components HOT 1
- Idea: "Source File" link to GitHub
- Update to fontawesome v6 HOT 2
- Fortran keywords are highlighed in a regular preformatted code block HOT 3
- Links are case sensitive HOT 2
- Issue with the BLOCK Statement HOT 1
- Markdown line breaks not working in lists HOT 2
- Documentation generation on my local machine and on github gives different outcomes HOT 6
- Path.resolve can not resolve urls
- Absurdly tall graphs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ford.