View unanswered posts | View active topics It is currently Fri Mar 29, 2024 5:22 am



Reply to topic  [ 1 post ] 
Division by zero in /class/pDraw.class.php on line 3102 
Author Message
New pChart user
New pChart user

Joined: Fri Mar 23, 2012 12:25 am
Posts: 2
Post Division by zero in /class/pDraw.class.php on line 3102
hi all,

still working on my historical graph for the namecoin currency, I find this php warning :

Code:
PHP Warning:  Division by zero in /.../class/pDraw.class.php on line 3102

in my apache error_log

the code is :
Code:
     if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT )
      {
       $Height      = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Data["Axis"][$AxisID]["Margin"]*2;
       $ScaleHeight = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"];
       $Step        = $Height / $ScaleHeight;


so, I suppose my $ScaleHeight is 0 this point

could this be a bug of scaleComputeY function or could I have forgotten something ?

the default test2.php example is not generating this error, my modified example works :

Image

but triggers this division by zero ;(

any clues ?

PS : BEWARE ! your forum seem to be infested with spam ( I just found those :
viewtopic.php?f=1&t=2534
viewtopic.php?f=1&t=2535


Fri Mar 23, 2012 2:42 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron