0 Replies Latest reply on Jun 10, 2007 4:20 PM by oscar7878

    Charts and Rounded numbers

    oscar7878 Level 1

      I'm working with a pie chart that shows 2 series. It always is going o show the same 2 but of course with diferent values.

      I am using this label function to format it:

      private function fLabel(item, field, index, percentValue):String{
      var perTemp:String = numFormatter.format(percentValue) + "%";
      if(perTemp == "0.00%"){
      return '';
      return perTemp;

      This function uses this formatter:

      <mx:NumberFormatter id="numFormatter" precision="2" decimalSeparatorFrom="."

      My problem is that the lable totals (%) do not match. For example i got 90.50% and 9.49%.
      I tried changing "precision=0" in the formatter but is the same: 50% and 49%.

      It mut be the way that hte PieChart rounds numbers.

      Any ideas will be very apreciated.