Hi,
When I look the summaries of bugs I can see that bar graphs are correct but the pie graph are wrong :
on this example :
you can see that I should have :
- about half "new" --> orange
- about half "closed"
- only one "assigned" --> blue-green
It appears that the x values of the bargraph don't match with the order of the pie-graph, it's just the opposite, like two arrays read once from the top and once from the bottom.
Any solution ?
I use jpgraph-1.20.2 and mantis-0.19.4
Antoine
JPGraph : inversion of values between bar graph and pie gaph
Moderators: Developer, Contributor
Here's the solution
I solve it this way:
open the file:
core/graph_api.php:
Find the following line (line 239 in Mantis 1.0.0rc1):
$p1 = new PiePlot3d( array_values( $p_metrics ) );
And replace it with:
$p1 = new PiePlot3d( array_reverse( array_values( $p_metrics ) ) );
Now the pie chart and it's references should look right
open the file:
core/graph_api.php:
Find the following line (line 239 in Mantis 1.0.0rc1):
$p1 = new PiePlot3d( array_values( $p_metrics ) );
And replace it with:
$p1 = new PiePlot3d( array_reverse( array_values( $p_metrics ) ) );
Now the pie chart and it's references should look right
Here's the solution
I solve it this way:
open the file:
core/graph_api.php:
Find the following line (line 239 in Mantis 1.0.0rc1):
$p1 = new PiePlot3d( array_values( $p_metrics ) );
And replace it with:
$p1 = new PiePlot3d( array_reverse( array_values( $p_metrics ) ) );
Now the pie chart and it's references should look right
open the file:
core/graph_api.php:
Find the following line (line 239 in Mantis 1.0.0rc1):
$p1 = new PiePlot3d( array_values( $p_metrics ) );
And replace it with:
$p1 = new PiePlot3d( array_reverse( array_values( $p_metrics ) ) );
Now the pie chart and it's references should look right