![Post Post](./styles/avalon/imageset/icon_topic_latest.gif)
Bug (+fix) in pImage::drawBarChart displayFont
pChart 2.1.3 line 4431 and 4432:
$DisplayFont = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontName;
$DisplaySize = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontSize;
The mistake is clear (DisplaySize should be DisplayFont), and leads to Error: "imagettfbbox() [function.imagettfbbox]: Could not find/open font"
Regards,
Gerben
Patch:
Code:
Index: util/phplib/pChart/pDraw.class.php
===================================================================
--- util/phplib/pChart/pDraw.class.php (revision 7395)
+++ util/phplib/pChart/pDraw.class.php (working copy)
@@ -4428,7 +4428,7 @@
$DisplayOrientation = isset($Format["DisplayOrientation"]) ? $Format["DisplayOrientation"] : ORIENTATION_HORIZONTAL;
$DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2;
$DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL;
- $DisplayFont = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontName;
+ $DisplayFont = isset($Format["DisplayFont"]) ? $Format["DisplayFont"] : $this->FontName;
$DisplaySize = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontSize;
$DisplayPos = isset($Format["DisplayPos"]) ? $Format["DisplayPos"] : LABEL_POS_OUTSIDE;
$DisplayShadow = isset($Format["DisplayShadow"]) ? $Format["DisplayShadow"] : TRUE;