Comments (4)
I see how this could be related, but I do consider these significantly different. The sugiyama method as it's currently written makes several assumptions about edges being distinct. It may be possible to relax this by forcing that nodes that have more than one edge between them must be at least two layers apart, but it needs more thought.
It is true that the dag methods themselves don't require such a guarantee so it would be possible to allow the dags to be built and for the time being, not allow any of the layout methods to run on them, although it's not clear how useful that is.
I also want to point out that self loops are still a problem because the dag representation doesn't have a concept of dummy nodes, and a self loop necessarily requires it. In this sense I think the solution would be to augment the initial data to do this, and then in rendering handle appropriately. I think building that in may overcomplicate the library, but maybe I should see what seems to make the most sense for handling non-dags in the api, and maybe dummy nodes in this fashion will then also make sense.
from d3-dag.
Hmm. I'm sure there's something I'm not understanding, but two questions. Worst case, you'll teach me something :-}:
-
If you just put in two dummy nodes (A -> B, A -> B ===> A-> C -> B, A -> D -> B) doesn't that solve the mismatch between the Sugiyama method and supporting multiple paths?
-
Why does the dag representation need to have a concept of dummy nodes? It currently has a concept of nodes and edges, and the edges are (IIUC) created from the previously existing dummy nodes. So why isn't the current representation fine, with a spline with a series of points where the midpoint is where the dummy node was, and both of the endpoints are at the same node?
from d3-dag.
- Yes, I think that generally would, but that adds a different constraint to the layering step, which currently isn't there, and more importantly, I'm not sure there aren't parts of the code that make that assumption implicitly. So yes, it is possible, but slightly more complicated.
- A dummy representation isn't necessary for multi-graphs, but it is necessary to allow self loops because the self loop edge violates the dag criteria.
from d3-dag.
@curiouserrandy since you're the only one who requested it I think it was fine to close on master. multi dags should now be fully supported. Note that now ichildren()
iterates over unique children, while ichildLinks()
iterates over all links regardless of duplicate children.
I considered adding a way to tell links that have identical targets and data apart, but have held off. You can use the index when iterating, or modify the data to add relevant features.
from d3-dag.
Related Issues (20)
- Basic TypeScript type check error HOT 6
- Tips for writing my own layering HOT 2
- General question about node ordering HOT 2
- Specific key order appears to cause decrossOpt to hang HOT 4
- TS: Errors with typescript version 4.9.4 HOT 3
- example code not runable HOT 4
- How to plot a horizonal sugiyama graph HOT 1
- Guidance on Implementing Radial Drawing with d3-dag's Sugiyama Algorithm HOT 3
- Implement Brandes/Kรถpf Coordinate Assignment
- Dynamic nodeSize? HOT 1
- TS, export SugiNode<NodeDatum = unknown, LinkDatum = unknown> ? HOT 3
- TS Sugestion(?) HOT 4
- Possible linking bug in docs HOT 3
- elkjs, external layout algorithms? HOT 1
- is it possible to establish node order explicitly in grid? HOT 8
- Support for TypeScript <4.5
- How to extend DagNode in vanilla js? HOT 6
- Error: size of dag to decrossOpt is too large and will likely crash instead of complete, enable "large" grahps to run anyway HOT 9
- Layout direction HOT 2
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 d3-dag.