View unanswered posts | View active topics It is currently Mon May 20, 2024 1:28 pm



Reply to topic  [ 3 posts ] 
datetime at regular intervals 
Author Message
Experienced pChart user
Experienced pChart user

Joined: Wed Dec 22, 2010 9:00 pm
Posts: 30
Post datetime at regular intervals
I have a datetime series on the X axis with about 500 points that range over 4 months

Is there a good way to have the X labels be marked at the first day of every month... e.g) 09/01/2010, 10/01/2010, 11/01/2010

I thought of using the LabelSkip parameter but one month of longer or shorter than the next.

Any ideas?


Sun Jan 09, 2011 11:30 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: datetime at regular intervals
Hi,

You can use the LabelingMethod parameter of the drawScale() function. If you set it to LABELING_DIFFERENT it will only prints labels that are different from the last printed one.

You'll then have to format your X label serie like :

Code:
$MyData->addPoints(array("09/01/2010","09/01/2010","09/01/2010","10/01/2010","10/01/2010","10/01/2010"),"Labels");

..or event better, use the TimeStamp and use the setXAxisDisplay() function to format the output.

JD.


Mon Jan 10, 2011 2:26 pm
Profile WWW
New pChart user
New pChart user

Joined: Wed Dec 07, 2011 11:10 am
Posts: 1
Post Re: datetime at regular intervals
Hi jean-damien,

I am using
Code:
drawScatterScale()
and setting LabelingMethod to LABELING_DIFFERENT but this does not do anything. Is there a way to get this to work?

Thanks in advance!
Cheers, Michael


Wed Dec 07, 2011 11:15 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

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