View unanswered posts | View active topics It is currently Sat Apr 27, 2024 11:36 pm



Reply to topic  [ 7 posts ] 
VOID dates not allowed 
Author Message
Regular pChart user
Regular pChart user

Joined: Wed Feb 02, 2011 4:52 pm
Posts: 10
Post VOID dates not allowed
Hi JD,

I try to draw date-values which may have some breaks or ends with VOID values, which I put as VOID in the array.
This results in
Quote:
Warning: date() expects parameter 2 to be long, string given in ..\pChart2\class\pDraw.class.php on line 2747

which is in the function scaleFormat

Any idea for workaound?

Thanks in advance

Reimar


Wed Feb 09, 2011 3:24 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: VOID dates not allowed
Good afternoon,

I have difficulties to understand how a timestamp serie can contains VOID values ;o)

To get ride of the error message (and make this function a bit more robust) you can add this test just after the function declaration :

Code:
   function scaleFormat($Value,$Mode=NULL,$Format=NULL,$Unit=NULL)
    {
     if ( $Value == VOID ) { return(""); }


I've commited the change in the next sub release.

Kind regards,
JD.


Wed Feb 09, 2011 3:51 pm
Profile WWW
Regular pChart user
Regular pChart user

Joined: Wed Feb 02, 2011 4:52 pm
Posts: 10
Post Re: VOID dates not allowed
Thanks for the quick reply,

I will test it.

To help you understanding:

I want to do an Milestone Trend Analysis.
i.e. like this
http://help.sap.com/saphelp_45b/helpdata/en/e1/dde8d801c311d2b6240000e8359ebc/content.htm


Wed Feb 09, 2011 4:10 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: VOID dates not allowed
This looks interesting (found an easier interpretation here http://www.crestsoft.com/cswmilestn.htm). This is a family of charts that I may implement in the future trough a class extension.

JD.


Wed Feb 09, 2011 4:46 pm
Profile WWW
Regular pChart user
Regular pChart user

Joined: Wed Feb 02, 2011 4:52 pm
Posts: 10
Post Re: VOID dates not allowed
Hi JD,

I solved it. VOID in the php environment is an a constant declared by yourself. Since php is not my first programming language I didn't noticed that, and I wondered why it doesn't work. So if I include your libraries at the very begining all is fine. Sorry for the in inconvenience.

Reimar


Wed Feb 09, 2011 4:48 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: VOID dates not allowed
That is correct! The PHP NULL constant is equal to 0 so I wasn't able to use it safely.

No problemo! Happy to help ;o)


Wed Feb 09, 2011 4:53 pm
Profile WWW
Regular pChart user
Regular pChart user

Joined: Wed Feb 02, 2011 4:52 pm
Posts: 10
Post Re: VOID dates not allowed
Yes,

Milestone Trend Analysis may also be found at Wiki (at least in the German one).

One thing to highlight is that there is normally a diagonal from down left to up right. If a milestoneline cross it - the milestone took place and becomes uninteresting. If you are delayed the milestone will shift to the top.
This makes it very illustrative.

Reimar


Wed Feb 09, 2011 5:03 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 10 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