22
22
* @link http://www.mantisbt.org
23
23
*/
24
24
25
-
25
+
26
26
if ( OFF == plugin_config_get ( 'eczlibrary ' ) ) {
27
27
$ t_font_path = get_font_path ();
28
28
if ( $ t_font_path !== '' && !defined ('TTF_DIR ' ) ) {
@@ -117,7 +117,7 @@ function graph_bar( $p_metrics, $p_title = '', $p_graph_width = 350, $p_graph_he
117
117
$ graph ->options ->font = $ t_graph_font ;
118
118
$ graph ->options ->font ->maxFontSize = 12 ;
119
119
$ graph ->legend = false ;
120
-
120
+
121
121
$ graph ->data [0 ] = new ezcGraphArrayDataSet ( $ p_metrics );
122
122
$ graph ->data [0 ]->color = '#FFFF00 ' ;
123
123
@@ -128,9 +128,9 @@ function graph_bar( $p_metrics, $p_title = '', $p_graph_width = 350, $p_graph_he
128
128
//$graph->driver->options->supersampling = 1;
129
129
$ graph ->driver ->options ->jpegQuality = 100 ;
130
130
$ graph ->driver ->options ->imageFormat = IMG_JPEG ;
131
-
131
+
132
132
$ graph ->renderer ->options ->syncAxisFonts = false ;
133
-
133
+
134
134
$ graph ->renderToOutput ( $ p_graph_width , $ p_graph_height );
135
135
} else {
136
136
$ graph = new Graph ( $ p_graph_width , $ p_graph_height );
@@ -200,7 +200,7 @@ function graph_group( $p_metrics, $p_title = '', $p_graph_width = 350, $p_graph_
200
200
$ graph ->options ->font = $ t_graph_font ;
201
201
$ graph ->options ->font ->maxFontSize = 12 ;
202
202
$ graph ->legend = false ;
203
-
203
+
204
204
foreach ( array ( 'open ' , 'resolved ' , 'closed ' ) as $ t_label ) {
205
205
$ graph ->data [$ t_label ] = new ezcGraphArrayDataSet ( $ p_metrics [$ t_label ] );
206
206
}
@@ -215,9 +215,9 @@ function graph_group( $p_metrics, $p_title = '', $p_graph_width = 350, $p_graph_
215
215
//$graph->driver->options->supersampling = 1;
216
216
$ graph ->driver ->options ->jpegQuality = 100 ;
217
217
$ graph ->driver ->options ->imageFormat = IMG_JPEG ;
218
-
218
+
219
219
$ graph ->renderer ->options ->syncAxisFonts = false ;
220
-
220
+
221
221
$ graph ->renderToOutput ( $ p_graph_width , $ p_graph_height );
222
222
} else {
223
223
# defines margin according to height
@@ -293,7 +293,7 @@ function graph_pie( $p_metrics, $p_title = '', $p_graph_width = 500, $p_graph_he
293
293
$ graph ->options ->font = $ t_graph_font ;
294
294
$ graph ->options ->font ->maxFontSize = 12 ;
295
295
$ graph ->legend = false ;
296
-
296
+
297
297
$ graph ->data [0 ] = new ezcGraphArrayDataSet ( $ p_metrics );
298
298
$ graph ->data [0 ]->color = '#FFFF00 ' ;
299
299
@@ -308,9 +308,9 @@ function graph_pie( $p_metrics, $p_title = '', $p_graph_width = 500, $p_graph_he
308
308
//$graph->driver->options->supersampling = 1;
309
309
$ graph ->driver ->options ->jpegQuality = 100 ;
310
310
$ graph ->driver ->options ->imageFormat = IMG_JPEG ;
311
-
311
+
312
312
$ graph ->renderer ->options ->syncAxisFonts = false ;
313
-
313
+
314
314
$ graph ->renderToOutput ( $ p_graph_width , $ p_graph_height );
315
315
} else {
316
316
$ graph = new PieGraph ( $ p_graph_width , $ p_graph_height );
@@ -358,7 +358,7 @@ function graph_cumulative_bydate( $p_metrics, $p_graph_width = 300, $p_graph_hei
358
358
$ graph = new ezcGraphLineChart ();
359
359
360
360
$ graph ->background ->color = '#FFFFFF ' ;
361
-
361
+
362
362
$ graph ->xAxis = new ezcGraphChartElementNumericAxis ();
363
363
364
364
$ graph ->data [0 ] = new ezcGraphArrayDataSet ( $ p_metrics [0 ] );
@@ -396,7 +396,7 @@ function graph_cumulative_bydate( $p_metrics, $p_graph_width = 300, $p_graph_hei
396
396
$ graph ->options ->font = $ t_graph_font ;
397
397
398
398
$ graph ->renderToOutput ( $ p_graph_width , $ p_graph_height );
399
- } else {
399
+ } else {
400
400
foreach ( $ p_metrics [0 ] as $ i => $ vals ) {
401
401
if ( $ i > 0 ) {
402
402
$ plot_date [] = $ i ;
@@ -475,15 +475,15 @@ function graph_bydate( $p_metrics, $p_labels, $p_title, $p_graph_width = 300, $p
475
475
$ t_cnt = count ($ p_metrics );
476
476
477
477
foreach ( $ t_dates as $ i => $ val ) {
478
- //$t_metrics[$val]
478
+ //$t_metrics[$val]
479
479
for ($ j = 0 ; $ j < $ t_cnt ; $ j ++ ) {
480
480
$ t_metrics [$ j ][$ val ] = $ p_metrics [$ j ][$ i ];
481
481
}
482
482
}
483
-
483
+
484
484
$ graph = new ezcGraphLineChart ();
485
485
$ graph ->background ->color = '#FFFFFF ' ;
486
-
486
+
487
487
$ graph ->xAxis = new ezcGraphChartElementNumericAxis ();
488
488
for ($ k = 0 ; $ k < $ t_cnt ; $ k ++ ) {
489
489
$ graph ->data [$ k ] = new ezcGraphArrayDataSet ( $ t_metrics [$ k ] );
@@ -508,7 +508,7 @@ function graph_bydate( $p_metrics, $p_labels, $p_title, $p_graph_width = 300, $p
508
508
$ graph ->options ->font = $ t_graph_font ;
509
509
510
510
$ graph ->renderToOutput ( $ p_graph_width , $ p_graph_height );
511
- } else {
511
+ } else {
512
512
$ graph = new Graph ( $ p_graph_width , $ p_graph_height );
513
513
$ graph ->img ->SetMargin ( 40 , 140 , 40 , 100 );
514
514
if ( ON == plugin_config_get ( 'jpgraph_antialias ' ) ) {
@@ -620,7 +620,7 @@ function enum_bug_group( $p_enum_string, $p_enum ) {
620
620
$ query = "SELECT COUNT(*)
621
621
FROM $ t_bug_table
622
622
WHERE $ p_enum=' $ t_value' AND
623
- status=' $ t_clo_val' $ specific_where " ;
623
+ status> =' $ t_clo_val' $ specific_where " ;
624
624
$ result2 = db_query ( $ query );
625
625
$ t_metrics ['closed ' ][$ t_label ] = db_result ( $ result2 , 0 , 0 );
626
626
@@ -890,11 +890,11 @@ function error_check( $bug_count, $title ) {
890
890
}
891
891
}
892
892
893
- function error_text ( $ title , $ text ) {
893
+ function error_text ( $ title , $ text ) {
894
894
if ( OFF == plugin_config_get ( 'eczlibrary ' ) ) {
895
-
895
+
896
896
$ t_graph_font = graph_get_font ();
897
-
897
+
898
898
$ graph = new CanvasGraph ( 300 , 380 );
899
899
900
900
$ txt = new Text ( $ text , 150 , 100 );
0 commit comments