2010-02-11 8 views
6

Quelqu'un a-t-il utilisé graphviz-php et, dans l'affirmative, sait-il où je peux trouver de la documentation sur sa structure d'utilisation/classe, etc.?PHP GraphViz Documentation

Veuillez noter que ceci est le graphviz-php pas le pear (image_graphviz).

Merci

Répondre

4

J'ai trouvé une explication de la graphviz.php comme ci-dessous.

La classe GraphViz permet de créer et de travailler avec des graphes dirigés et non orientés et leur visualisation avec les outils GraphViz de AT &.

 

    require_once 'Image/GraphViz.php'; 

    $graph = new Image_GraphViz(); 

    $graph->addNode(
    'Node1', 
    array(
     'URL' => 'http://link1', 
     'label' => 'This is a label', 
     'shape' => 'box' 
    ) 
); 

    $graph->addNode(
    'Node2', 
    array(
     'URL'  => 'http://link2', 
     'fontsize' => '14' 
    ) 
); 

    $graph->addNode(
    'Node3', 
    array(
     'URL'  => 'http://link3', 
     'fontsize' => '20' 
    ) 
); 

    $graph->addEdge(
    array(
     'Node1' => 'Node2' 
    ), 
    array(
     'label' => 'Edge Label' 
    ) 
); 

    $graph->addEdge(
    array(
     'Node1' => 'Node2' 
    ), 
    array(
     'color' => 'red' 
    ) 
); 
    $graph->image(); 

+0

ce lien fonctionne: http://pear.php.net/manual/en/package. images.image-graphviz.example.php –