Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.0

Bug #16872 Cluster display
Submitted: 2009-12-04 15:08 UTC
From: gbougeard Assigned: jausions
Status: Closed Package: Image_GraphViz (version 1.3.0RC3)
PHP Version: 5.2.1 OS: Centos 5.3
Roadmaps: (Not assigned)    
Subscription  


 [2009-12-04 15:08 UTC] gbougeard (Greg Bougeard)
Description: ------------ Hello, I have an issue between 1.2.1 and 1.3.0.RC3. I installed the 1.2.1 but I need to display more than 1 edge between 2 nodes so I installed the 1.3.0.RC3. I had to create my graph as NOT strict to be able to display more than one edge between 2 nodes. The issue is about the clusters. For the same PHP Code I have 2 different resulst : 1.2.1 (clusters OK multi-edges KO) : digraph sp_d_rcp_001 { graph [ rankdir="LR",ranksep="0.75" ]; subgraph "cluster_pck_courbe_rcp" { label="pck_courbe_rcp"; color="green"; "sp_d_rcp_001" [ shape="component" ]; } "courbe_rcp" [ shape="box" ]; "detail_rcp" [ shape="box" ]; "sp_d_rcp_001" -> "courbe_rcp" [ color="blue",label="S",id="Scourbe_rcp" ]; "sp_d_rcp_001" -> "detail_rcp" [ color="blue",label="S",id="Sdetail_rcp" ]; } 1.3.0RC3 (Clusters KO multi-edges OK) : digraph sp_d_rcp_001 { rankdir=LR; ranksep=0.75; subgraph pck_courbe_rcp { graph [ green,color=green,label=pck_courbe_rcp ]; sp_d_rcp_001 [ shape=component ]; } courbe_rcp [ shape=box ]; detail_rcp [ shape=box ]; sp_d_rcp_001 -> courbe_rcp [ color=red,label=D,id=Dcourbe_rcp ]; sp_d_rcp_001 -> courbe_rcp [ color=blue,label=S,id=Scourbe_rcp ]; sp_d_rcp_001 -> detail_rcp [ color=red,label=D,id=Ddetail_rcp ]; sp_d_rcp_001 -> detail_rcp [ color=blue,label=S,id=Sdetail_rcp ]; } So what's wrong? There are huge difference between the 2 codes generated, no? Test script: --------------- $gv = new Image_GraphViz(true, array('rankdir'=>'LR', 'ranksep' => .75), $inObj, false); $gv->addCluster($pkg, $pkg, array("color"=>"green")); $gv->addNode($obj, array('shape' => 'component'), $pkg); $result = mysql_query($query) or die(mysql_error().$query); while ($row = mysql_fetch_assoc($result)) { $table = $row['tab']; $action = $row['action']; if (array_key_exists($table, $lst_tab) == false){ # si on a pas trouve d'arbo PL/SQL, on cree tout de meme les objets dans le graphe $gv->addNode($table, array('shape' => 'box')); } $gv->addEdge(array($obj => $table), array("color"=>$color, "label"=>$action, "id"=>$action.$table)); } Expected result: ---------------- digraph sp_d_rcp_001 { graph [ rankdir="LR",ranksep="0.75" ]; subgraph "cluster_pck_courbe_rcp" { label="pck_courbe_rcp"; color="green"; "sp_d_rcp_001" [ shape="component" ]; } courbe_rcp [ shape=box ]; detail_rcp [ shape=box ]; sp_d_rcp_001 -> courbe_rcp [ color=red,label=D,id=Dcourbe_rcp ]; sp_d_rcp_001 -> courbe_rcp [ color=blue,label=S,id=Scourbe_rcp ]; sp_d_rcp_001 -> detail_rcp [ color=red,label=D,id=Ddetail_rcp ]; sp_d_rcp_001 -> detail_rcp [ color=blue,label=S,id=Sdetail_rcp ]; }

Comments

 [2009-12-08 18:52 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
Greg, I have no idea what exactly is wrong. Want to simplify your test cases to better demonstration the expected and actual behaviour?
 [2009-12-08 21:28 UTC] jausions (Philippe Jausions)
-: gbougeard@gmail.com +: jausions at php dot net -Status: Feedback +Status: Verified -Assigned To: +Assigned To: jausions
I know what the problem is, and I'm trying to post a fix to SVN... Just having a slight issue with user name / password at the moment.
 [2009-12-08 21:29 UTC] jausions (Philippe Jausions)
-: jausions@php.net +: gbougeard at gmail dot com
 [2009-12-14 03:22 UTC] jausions (Philippe Jausions)
-Status: Verified +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.