1 Reply Latest reply on Apr 27, 2009 7:12 AM by Gregory Lafrance

    Decimal Point data for Stacked Column Chart

    Sen Imagines



      I use a basic version of a Column chart for one of my projects. I use a stacked column chart with 2 data series namely "Expenses" & "Profit".

      I use decimal point numbers (with only two or three places after the decimal point) for both series.


      When I mouse over the bars of the output for tool tip, I view more numbers after the decimal point for some data.

      How to fix the decimal point to only 2 places & what is the reason for this behaviour?


      Attached is the sample output (output.gif) showing the above condition for the mentioned data.







        • 1. Re: Decimal Point data for Stacked Column Chart
          Gregory Lafrance Level 6

          Create an toolTipShow event handler and use a NumberFormatter to set the precision of the numbers (sample code from LiveDocs):


          <?xml version="1.0"?>
          <!-- formatters\MainNumberFormatter.mxml -->
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

                      // Define variable to hold the number.       
                      private var bigNumber:Number = 6000000000.65;

              <!-- Declare and define parameters for the NumberFormatter.-->
              <mx:NumberFormatter id="PrepForDisplay"

              <!-- Trigger the formatter while populating a string with data.-->
              <mx:TextInput text="{PrepForDisplay.format(bigNumber)}"/>