diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1094cd408f..4abbafdff1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-03-22 Sergio Martin + + * include/graphs/functions_pchart.php + include/graphs/pChart/pDraw.class.php: Added to pchart library the + parameter to set an independent font size to graph ticks and set it + on the graph charts one point less + 2012-03-22 Miguel de Dios & Sergio Martin using Gobby collaborative real-time editor http://obby.0x539.de diff --git a/pandora_console/include/graphs/functions_pchart.php b/pandora_console/include/graphs/functions_pchart.php index 401f7a2e2b..612623f93a 100755 --- a/pandora_console/include/graphs/functions_pchart.php +++ b/pandora_console/include/graphs/functions_pchart.php @@ -737,7 +737,12 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height, "GridG"=>200, "GridB"=>200, "DrawSubTicks"=>TRUE, - "CycleBackground"=>TRUE, "Mode" => $mode, "LabelRotation" => 60, "XMargin" => 0, "MinDivHeight" => 20); + "CycleBackground"=>TRUE, + "Mode" => $mode, + "LabelRotation" => 40, + "XMargin" => 0, + "MinDivHeight" => 20, + "TicksFontSize" => $font_size - 1); $myPicture->drawScale($scaleSettings); /* Turn on shadow computing */ diff --git a/pandora_console/include/graphs/pChart/pDraw.class.php b/pandora_console/include/graphs/pChart/pDraw.class.php index a6f6bcdc37..f0ba37965b 100755 --- a/pandora_console/include/graphs/pChart/pDraw.class.php +++ b/pandora_console/include/graphs/pChart/pDraw.class.php @@ -1744,7 +1744,8 @@ $BackgroundAlpha2 = isset($Format["BackgroundAlpha2"]) ? $Format["BackgroundAlpha2"] : 20; $LabelingMethod = isset($Format["LabelingMethod"]) ? $Format["LabelingMethod"] : LABELING_ALL; $LabelSkip = isset($Format["LabelSkip"]) ? $Format["LabelSkip"] : 1; - $LabelRotation = isset($Format["LabelRotation"]) ? $Format["LabelRotation"] : 0; + $TicksFontSize = isset($Format["TicksFontSize"]) ? $Format["TicksFontSize"] : $this->FontSize; + $LabelRotation = isset($Format["LabelRotation"]) ? $Format["LabelRotation"] : 0; $LabelValuesRotation = isset($Format["LabelValuesRotation"]) ? $Format["LabelValuesRotation"] : 0; $SkippedAxisTicks = isset($Format["SkippedAxisTicks"]) ? $Format["SkippedAxisTicks"] : $GridTicks+2; $SkippedAxisR = isset($Format["SkippedAxisR"]) ? $Format["SkippedAxisR"] : $GridR; @@ -1967,7 +1968,7 @@ $ID++; $Skipped = TRUE; if ( $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip) ) { - $Bounds = $this->drawText($XPos,$YPos+$OuterTickWidth+$YLabelOffset,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); + $Bounds = $this->drawText($XPos,$YPos+$OuterTickWidth+$YLabelOffset,$Value,array("FontSize"=>$TicksFontSize,"Angle"=>$LabelRotation,"Align"=>$LabelAlign)); $TxtBottom = $YPos+$OuterTickWidth+2+($Bounds[0]["Y"]-$Bounds[2]["Y"]); $MaxBottom = max($MaxBottom,$TxtBottom); $LastValue = $Value;