pChart 2.x forum
http://wiki.pchart.net/forum/

Bar Chart Format for Labels
http://wiki.pchart.net/forum/viewtopic.php?f=3&t=298
Page 1 of 1

Author:  stlfan [ Mon Feb 28, 2011 5:01 pm ]
Post subject:  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.

Author:  jean-damien [ Wed Mar 23, 2011 11:58 am ]
Post subject:  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.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/