pChart 2.x forum http://wiki.pchart.net/forum/ |
|
VOID dates not allowed http://wiki.pchart.net/forum/viewtopic.php?f=5&t=213 |
Page 1 of 1 |
Author: | runger [ Wed Feb 09, 2011 3:24 pm ] |
Post subject: | 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 |
Author: | jean-damien [ Wed Feb 09, 2011 3:51 pm ] |
Post subject: | 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. |
Author: | runger [ Wed Feb 09, 2011 4:10 pm ] |
Post subject: | 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 |
Author: | jean-damien [ Wed Feb 09, 2011 4:46 pm ] |
Post subject: | 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. |
Author: | runger [ Wed Feb 09, 2011 4:48 pm ] |
Post subject: | 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 |
Author: | jean-damien [ Wed Feb 09, 2011 4:53 pm ] |
Post subject: | 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) |
Author: | runger [ Wed Feb 09, 2011 5:03 pm ] |
Post subject: | 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 |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |