Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd7326c

Browse files
VeMagrombert
authored andcommittedApr 29, 2012
Fix_0014193:graph_unreadable_date_axis
This correction is about use of "eczlibrary" (not JpGraph) In "View Issues" > "Graph", the date axis is "2012-0.." and the title is really big. I fixe axisSpace, modify axis angle, and define maxHeight for the title.
1 parent 4f93c95 commit bd7326c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎plugins/MantisGraph/core/graph_api.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,8 @@ function graph_bydate( $p_metrics, $p_labels, $p_title, $p_graph_width = 300, $p
492492

493493
$graph->xAxis->labelCallback = 'graph_date_format';
494494
$graph->xAxis->axisLabelRenderer = new ezcGraphAxisRotatedLabelRenderer();
495-
$graph->xAxis->axisLabelRenderer->angle = -45;
495+
$graph->xAxis->axisLabelRenderer->angle = -60;
496+
$graph->xAxis->axisSpace = .15;
496497

497498
$graph->legend->position = ezcGraph::BOTTOM;
498499
$graph->legend->background = '#FFFFFF80';
@@ -503,6 +504,7 @@ function graph_bydate( $p_metrics, $p_labels, $p_title, $p_graph_width = 300, $p
503504
$graph->driver->options->imageFormat = IMG_JPEG;
504505

505506
$graph->title = $p_title . ' ' . lang_get( 'by_date' );
507+
$graph->title->maxHeight = .03;
506508
$graph->options->font = $t_graph_font ;
507509

508510
$graph->renderToOutput( $p_graph_width, $p_graph_height);

0 commit comments

Comments
 (0)
Please sign in to comment.