-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fixed subgroup and add rank #43
base: 1.x
Are you sure you want to change the base?
Conversation
`subgroup` should include `edges` and `rank`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Yahasana, thanks for taking the time to file this PR! 👍
Unfortunately, the PR does not contain any documentation or tests, so it's a bit unclear what you're trying to achieve from the snippet you've posted.
May I ask you provide a simple gist of what you're trying to achieve and how this looks from a consumer perspective? Thanks!
@clue $i0 = $graph->createVertex(['graphviz.group' => 'g0']);
$i1 = $graph->createVertex(['graphviz.group' => 'g0']);
$i2 = $graph->createVertex(['graphviz.group' => 'g0']);
$j0 = $graph->createVertex(['graphviz.group' => 'g1']);
$j1 = $graph->createVertex(['graphviz.group' => 'g1']);
$j2 = $graph->createVertex(['graphviz.group' => 'g1']);
$graphviz->setRanks(0, [$i0, $i1, $i2])
->setRanks(1, [$j0, $j1, $j2]); |
One more thing, there is a fail test case because of i make escape |
@Yahasana Thanks for the background info! This is definitely an interesting feature addition and I would love to see this supported in this project. That being said, I'm not sure about the best API. In particular, this seems to be somewhat related to #38, so I wonder if we can come up with a consistent API. What do you think? |
How about to change API look like this one? $i0 = $graph->createVertex(['graphviz.group' => 'g0', 'graphviz.rank' => 0]);
$i1 = $graph->createVertex(['graphviz.group' => 'g0', 'graphviz.rank' => 0]);
$i2 = $graph->createVertex(['graphviz.group' => 'g0', 'graphviz.rank' => 0]);
$j0 = $graph->createVertex(['graphviz.group' => 'g1', 'graphviz.rank' => 1]);
$j1 = $graph->createVertex(['graphviz.group' => 'g1', 'graphviz.rank' => 1]);
$j2 = $graph->createVertex(['graphviz.group' => 'g1', 'graphviz.rank' => 1]); the same as $v = $graph->createVertex();
$v->setAttribute('graphviz.group', 'g0');
$v->setAttribute('graphviz.rank', 0); |
subgroup
should includeedges
andrank