bug in drawScale() w/ AxisAlpha + suggestion
hi guys, thanks for a great lib. I've noticed a bug or two so thought i'd post.
in 2.0.12, in pDraw.class
I believe this says:
Code:
$AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["GridAlpha"] : 100;
and throws a notice (or warning?) when using axisalpha but not gridalpha
working:
Code:
$AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 100;
- - 8< - - snip - -
I wasn't sure where to suggest this so:
sometimes it is required to produce a bar chart that shows deviation from a custom value, i.e. bars wrapping not around zero but arbitrary value. I struggled to produce this using ordinary methods (yes you can but on close inspection the bars are wrong), so here's a proposed code change:
Code:
// ... set $nonZeroValue first, invoke with
$image->drawBarChart(array('AroundZero'=>true, 'YZero'=>$nonZeroValue)); // wrap bars around arbitrary value
in pDraw::drawBarChart()
Code:
$OverrideYZero = (isset($Format['YZero'])) ? $Format['YZero'] : 0;
...
if ($OverrideYZero != 0) $YZero = $this->scaleComputeY($OverrideYZero,array("AxisID"=>$Serie["Axis"])); // override by user
else $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); // default
- - 8< - - snip - -
(finally, as a suggestion, environments like Zend assign .class files to Java instead of PHP. This breaks code completion and other project functionality.
Consider .class.php)
hope this works :]