Say we have nodes and taxonomies linked together in no hierarchical relations.
When we concatenate two views one representing the taxonomy parent child graph and the other representing the node-taxonomy_term we can then merge both views output into 1 big graph.
Is that useful or are there other ways?
See ie #1429168: Does this also support the reference module? have 5 node references on one node
Comments
Comment #1
clemens.tolboomAn alternative is #1398768: Why not use the views relations to get relations?
I added a new render engine graphapi_raw.module for this purpose. It's output can be merged with other graph output to form a whole.
Comment #2
clemens.tolboomFor this to happen we need a 'raw' rendering mode which spits out just graph API data.
This would also help debugging graph data.
Comment #3
clemens.tolboomMaybe this is better code practise (thanks to li_ tw_ o_l)
A hint from merlin@irc
Not sure what's best now :p
Comment #4
clemens.tolboom@See http://drupal.org/project/views_groupby
@See http://diggit.drupalextras.com/node/17873/related_links
Comment #5
clemens.tolboom@see http://drupal.stackexchange.com/questions/31786/how-to-create-a-union-of...
Comment #6
s.daniel commentedI have come across this requirenment before and think it should be adressed at a different level than graphapi. For example if someone ants to build a search based on views across different entity types that is currently not easy to do afaik. (One would probably use searchapi or such)
However since to my knowledge there currently is no such solution I think we probably may think of use case specific code. e.g.:
> How would we create a graph of all users and their relations to all nodes they have via author status or comments.
Comment #7
clemens.tolboomThe relationship user-comment-node-user would need 2 views.
user-comment-node
+
node-user
and that needs a merge I'm afraid. But it's not a big deal for me now. I'll try to sketch a views UI next week.
Trouble is with views arguments.
Comment #8
clemens.tolboomComment #9
socialnicheguru commentedHave you ever tried http://drupal.org/project/views_cross_join?
Comment #10
clemens.tolboom@SocialNicheGuru thanks for the pointer. That project does a cross join which only create a http://en.wikipedia.org/wiki/Complete_graph
The idea for this issue is to merge two graphs. That is merge from/to's and add links.
But I guess I could study their code on how do merge views data.
Comment #11
naught101 commentedI was just thinking along the same lines, that graph nodes/vertexes could be added in one view, and then graph edges could be added in a views attachment. Is it possible for graphapi to take control of both outputs in a single canvas though?
The other way to do it would be to just add the relationship type as one field on the node, and the relationship other end point as another field (and possibly the relationship's directionality). That would lead to a lot of data duplication, especially if you wanted to put lots of other data on the node, but at least it'd be fairly simple.Ignore me, I see that's already the standard method.Comment #12
clemens.tolboom@naught101 my though of line is to render a sub view / graph in a raw format (the array or object 7.x-2.x)
The merge lies in the parent view when outputting to take and integrate the raw data.
Problem I'm facing is duplicate links from child views. When is a link duplicated and when not? #1209426: Multiple links from A to B are not supported
Comment #12.0
clemens.tolboomUpdated issue summary.
Comment #13
clemens.tolboomThis is postponed for 8.x-1.x