Menu

#87 scaling factors on horizontal bars - unexpected behavi

open
nobody
None
5
2011-11-28
2011-11-28
Anonymous
No

The 'Factors' parameter of the drawScale() method seems to be broken when using 'Pos' => SCALE_POS_TOPBOTTOM.

I have successfully managed to display only 2 ordinate values on a vertical bar graph by setting half of the maximum ordinate value in the 'Factors' parameter like so :

$pImage->drawScale(
array(
"Mode" => SCALE_MODE_MANUAL,
"Factors" => array($maxOrdinateValue / 2),
"ManualScale" => array(
0 => array(
"Min" => 0,
"Max" => $maxOrdinateValue
)
),
"Pos" => SCALE_POS_LEFTRIGHT,
)
);

Doing so with 'Pos' => SCALE_POS_TOPBOTTOM exhibit unexpected behaviors, see attached file.

Discussion

  • Anonymous

    Anonymous - 2011-11-28

    The attached file "scaling factors on vertical bars.jpeg" shows the "Factors" parameter works well on vertical bars.

    "scaling factors on horizontal bars - unexpected behaviors.jpeg" shows what I'm having with the same parameters on a horizontal bar graph.

    There should be only two values on the ordinate axis like in "scaling factors on vertical bars.jpeg"

     

Log in to post a comment.

MongoDB Logo MongoDB