View unanswered posts | View active topics It is currently Thu Mar 28, 2024 2:29 pm



Reply to topic  [ 2 posts ] 
Bar Chart Format for Labels 
Author Message
Regular pChart user
Regular pChart user

Joined: Tue Feb 08, 2011 10:36 pm
Posts: 14
Post Bar Chart Format for Labels
I created a new topic for a separate question I have on the Bar Chart Labels. I am trying to adjust the Formatting of the labeling for the bar chart. I currently have the labels set to :

$MyData->setAxisDisplay(0,AXIS_FORMAT_METRIC);

However, I am trying to allow the rounding of the data to have 2 decimal places. I have tried to set my data to $MyData->setAxisDisplay(0,AXIS_FORMAT_METRIC,2), which from looking at the code should adjust the round function to adjust to 2 decimal places, but it does not adjust this. If I go into the actual class and hard code 2 into the function, it works just fine, but from what I am looking at on the code, it looks like it should be able to adjust accordingly. Is there another place, I can adjust the formatting of this label in regards to the decimal places. Thanks for any help.


Mon Feb 28, 2011 5:01 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: Bar Chart Format for Labels
Hi,

This is a bug introduced by the enhancement of the scaling functions. To fix it, add the following lines at the begining of the processScale() function defined in the pDraw.class.php file :

Code:
     if ( isset($this->DataSet->Data["Axis"][$AxisID]["Format"]) )
      $Format = $this->DataSet->Data["Axis"][$AxisID]["Format"];
     else
      $Format = NULL;


Fix applied in the next sub release.

Kind regards,
JD.


Wed Mar 23, 2011 11:58 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 2 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