stlfan
Regular pChart user
Joined: Tue Feb 08, 2011 10:36 pm Posts: 14
|
Possible Bug with Labels for Bar Chart
Hello I posted a topic in the general discussion area in regards to the issue i am posting here...here is what i posted on the general topic area:
"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. "
However after trying to do some debugging, it seems that if I set it on the setAxisDisplay, it seems to place it in the correct location which was:
function setAxisDisplay($AxisID,$Mode=AXIS_FORMAT_DEFAULT,$Format=NULL) { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Display"] = $Mode; if ( $Format != NULL ) { $this->Data["Axis"][$AxisID]["Format"] = $Format; } } }
however when i try to see what is placed on this line in the pDraw.class.php on this line for drawBarChart:
$AxisID = $Serie["Axis"]; $Mode = $Data["Axis"][$AxisID]["Display"]; $Format = $Data["Axis"][$AxisID]["Format"]; $Unit = $Data["Axis"][$AxisID]["Unit"];
It seems that the $Mode is set Correctly and the $Unit is set Correctly, but the Format keeps showing 0. So I am not sure if this is being changed somewhere else or not, so i was also submitting this as a possible bug. I apologize if this is operator error, but thanks for taking a look.
|