FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=20036&edit=1

  ID: 20036
  Updated by: daniel.oconnor@gmail.com
  Reported By: mcclimont at internode dot on dot net
  Summary: Patch to enable default values to be set by node,
                     edge, or graph.
-Status: Open
+Status: Feedback
  Type: Feature/Change Request
  Package: Image_GraphViz
  Operating System: Windows 7
  Package Version: 1.3.0
  PHP Version: 5.5.1
  Roadmap Versions:
  New Comment:

-Status: Open
+Status: Feedback
Can I get you to redo this as a universal diff or even better, a pull
request on github?


Previous Comments:
------------------------------------------------------------------------

[2013-08-14 03:50:10] mcclimont

Code to generate the expected result:

<?php
require_once 'GraphViz.php';

$graph = new Image_GraphViz(true, array(), 'GraphVis');

$graph->addAttributes(array(
    'graph' => array('fontname' => 'Helvetica-Oblique', 'fontsize' => 24,
'label' => 'GraphVis')
    , 'node' => array('color' => 'white', 'fontname' => 'Helvetica')
    , 'edge' => array('color' => 'red')));

echo $graph->parse();
?>

------------------------------------------------------------------------

[2013-08-14 03:09:30] mcclimont

Added #patch
bug:20036;patch:GraphVis_defaultAttributes.diff;revision:1376446170;.

------------------------------------------------------------------------

[2013-08-14 03:08:08] mcclimont

Description:
------------
The DOT Language (http://www.graphviz.org/content/dot-language) defines
that default values can be defined by using a node, edge, or graph
statement.

The patch attached provides support for adding an attribute (node, edge,
graph) which is array of attributes that will be used as the defaults
for any object of the appropriate type.

Expected result:
----------------
strict digraph GraphViz {
     graph [
         fontname="Helvetica-Oblique";
         fontsize=24;
         label=GraphVis;
     ];
     node [
         color=white;
         fontname=Helvetica;
     ];
     edge [
         color=red;
     ];
}

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 20, '14 at 2:55a
activeApr 20, '14 at 2:55a
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase