I want to install graphviz.
I've found the page where the graph will be show: "bug_relationship_graph.php ". But i don't find where this page is called. Where is the link to go on this page ?
I have to create the link where i want ?
Graphviz installation
Moderators: Developer, Contributor
The link to the bug relationship graph should automatically be enabled on the 'view issue' page, so long as you've enabled relationships.
Make sure that you have:
$g_relationship_graph_enable = ON;
added to your config_inc.php page.
Also, graphs are used in certain summary pages (Summary > Advanced summary for example).
Hope this helps,
Lincoln.
Make sure that you have:
$g_relationship_graph_enable = ON;
added to your config_inc.php page.
Also, graphs are used in certain summary pages (Summary > Advanced summary for example).
Hope this helps,
Lincoln.
Thank you for your help.
The link is not created automatically on my version but i've created it on the issue view page.
I want now to create new graphs.
I've done that but it doesn't work :
<?php
$t_graph = new Digraph( );
$t_graph->set_default_node_attr( array (
'fontname' => $t_graph_fontname,
'fontsize' => $t_graph_fontsize,
'shape' => 'record',
'style' => 'filled',
'height' => '0.2',
'width' => '0.4'
) );
$t_graph->set_default_edge_attr( array (
'style' => 'solid',
'color' => '#C00000',
'dir' => 'back'
) );
$t_graph->add_node( 'Cinq' );
$t_graph->add_node( 'Six' );
$t_graph->add_edge( 'Cinq', 'Six' );
$t_graph->generate();
?>
<div class="center relationship-graph">
<img src="<?php echo $t_graph ?>"/>
</div>
What is the problem, and what i've to do ?
The link is not created automatically on my version but i've created it on the issue view page.
I want now to create new graphs.
I've done that but it doesn't work :
<?php
$t_graph = new Digraph( );
$t_graph->set_default_node_attr( array (
'fontname' => $t_graph_fontname,
'fontsize' => $t_graph_fontsize,
'shape' => 'record',
'style' => 'filled',
'height' => '0.2',
'width' => '0.4'
) );
$t_graph->set_default_edge_attr( array (
'style' => 'solid',
'color' => '#C00000',
'dir' => 'back'
) );
$t_graph->add_node( 'Cinq' );
$t_graph->add_node( 'Six' );
$t_graph->add_edge( 'Cinq', 'Six' );
$t_graph->generate();
?>
<div class="center relationship-graph">
<img src="<?php echo $t_graph ?>"/>
</div>
What is the problem, and what i've to do ?
The problem is basically this:
Your $t_graph is a graph object, but you're trying to assign that value to the 'img src' value in the HTML: 'img src' is meant to point to a path, not the image data itself.
Imagine a normal image. In the HTML, you set 'img src' to point to that image, you don't dump the actual image data straight in to 'img src'!
I'm hoping you're following me :)
If you look at the other graphs in Mantis, you will see that they're 'broken up' into two parts: you have one PHP file that creates just the HTML. Here, the 'img src' for the various graphs point to another PHP file, which creates just the image.
You need to do that, basically...
Your $t_graph is a graph object, but you're trying to assign that value to the 'img src' value in the HTML: 'img src' is meant to point to a path, not the image data itself.
Imagine a normal image. In the HTML, you set 'img src' to point to that image, you don't dump the actual image data straight in to 'img src'!
I'm hoping you're following me :)
If you look at the other graphs in Mantis, you will see that they're 'broken up' into two parts: you have one PHP file that creates just the HTML. Here, the 'img src' for the various graphs point to another PHP file, which creates just the image.
You need to do that, basically...
Graphviz installation
Thank you very much for your help. I've found my errors and i'm arrived to make the graphs that i want...
I can continue my work on my Mantis version !
I can continue my work on my Mantis version !
Re: Graphviz installation
Hello, following to your suggestion, I created two files:
img1.php
and img0.php:
If I run on the server "php img1.php > 1.png"
I got the normal 1.PNG image, that can be displayed, but when I try to access to img0.php through the www server Apache, I've got the broken image.
Any ideas, why?
img1.php
Code: Select all
<?php
require_once( 'graphviz_api.php' );
$t_graph = new Digraph( );
$t_graph->set_default_node_attr( array (
'fontname' => 'Arial',
'fontsize' => 8,
'shape' => 'record',
'style' => 'filled',
'height' => '0.2',
'width' => '0.4'
) );
$t_graph->set_default_edge_attr( array (
'style' => 'solid',
'color' => '#C00000',
'dir' => 'back'
) );
$t_graph->add_node( 'Cinq' );
$t_graph->add_node( 'Six' );
$t_graph->add_edge( 'Cinq', 'Six' );
$t_graph->output('png',true);
# or $t_graph->output('png',false); - does not matter
?>Code: Select all
<body>
<img src="img1.php"/>
</body>I got the normal 1.PNG image, that can be displayed, but when I try to access to img0.php through the www server Apache, I've got the broken image.
Any ideas, why?