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



Reply to topic  [ 2 posts ] 
LabelingMethod option of NONE 
Author Message
New pChart user
New pChart user

Joined: Tue Aug 30, 2011 10:23 pm
Posts: 2
Post LabelingMethod option of NONE
Can we add a value of FALSE for LabelingMethod used in isValidLabel() so that we can hide all labels? I have a lot of combo charts where I want the labels in the 2nd chart, but not the 1st. So I added the following 1 line to the isValidLabel function.

Code:
if ( $LabelingMethod === FALSE ) { return FALSE; }


Code:
function isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip)
    {
     if ( $LabelingMethod === FALSE ) { return FALSE; }
     if ( $LabelingMethod == LABELING_DIFFERENT && $Value != $LastValue ) { return(TRUE); }
     if ( $LabelingMethod == LABELING_DIFFERENT && $Value == $LastValue ) { return(FALSE); }
     if ( $LabelingMethod == LABELING_ALL && $LabelSkip == 0 ) { return(TRUE); }
     if ( $LabelingMethod == LABELING_ALL && ($ID+$LabelSkip) % ($LabelSkip+1) != 1 ) { return(FALSE); }

     return(TRUE);
    }


Tue Sep 06, 2011 5:36 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: LabelingMethod option of NONE
Very good idea, I've modified the drawscale function and added the RemoveXAxis parameter so you can skip the X axis but keep the vertical divisions.

JD.


Attachments:
example_drawScale_labelsCA9ZPLEV.png
example_drawScale_labelsCA9ZPLEV.png [ 22.17 KiB | Viewed 5568 times ]
Wed Sep 07, 2011 9:19 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

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