Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We need a way to add attributes to vertex::group #39

Closed
clemens-tolboom opened this issue Jun 5, 2013 · 3 comments
Closed

We need a way to add attributes to vertex::group #39

clemens-tolboom opened this issue Jun 5, 2013 · 3 comments

Comments

@clemens-tolboom
Copy link
Collaborator

While trying to fix #36 it seems we need something like a cluster class for graphviz to add local attributes for the cluster like

  • title
  • defaults for the contained elements like node, edge and graph

We do have a group concept for vertices but their group needs attributes. We can call this a subgraph but that would mean the users of Graph must create these.

A group is just tagging vertice with a belongs to relation.

Kan we call this class Group?

@clue
Copy link
Member

clue commented Jun 5, 2013

I agree that it's very useful to handle groups in an OOP manner 👍 Eventually it should implement the LayoutableInterface, so that each group can be styled independently.

A group is just tagging vertice with a belongs to relation.

Afaict, that's exactly what a subgraph does.

Explicitly creating subgraphs has the benefit of well, being explicit... But then again, we can also provide some convenience SubgraphBuilder class which automatically creates nested subgraphs based on a given separator character?

$builder = new SubgraphBuilder($graph);
$builder->setAutoCreateOnGet(true);
$builder->setNestingSeparator(':');

$subgraph = $builder->getSubgraphNested('this:is:on:level4');

$subgraph->createVertex('a vertex within level4 subgraph');

I'm trying not to clutter this ticket with my SubgraphBuilder idea, but getting back on topic, I think we should stick with the name Subgraph.

@clue
Copy link
Member

clue commented Mar 4, 2015

Ping @clemens-tolboom, what's the status on this ticket?

GraphViz has been split off via #115, while #103 introduced general purpose attributes for all entities.

Afaict this ticket asks for a way to assign attributes to a group of entities at once?

matthiasnoback added a commit to matthiasnoback/graph that referenced this issue Feb 6, 2019
This relates to graphp#39.

I decided to break BC and introduce a new entity to represent a Group.
Design choices:

- A group is unique in the entire graph.
- An entity doesn't have to be in a group.
- A group can use its Graph to find out which vertices are also in it.
- A group has to be created before it can be used (same for vertices).
@clue
Copy link
Member

clue commented Oct 4, 2019

Closed via #168, see graphp/graphviz#38 instead.

@clue clue closed this as completed Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants