How to number of Formate on the y-axis?


Hello

I wrote the code for formatting number on y AXIS in #, #. # format (i.e. If none is 123456.78 then it should be in format 123,456.78).

But I get no results after compiling it can someone help me in this?

<?xml version="1.0"?>
<!-- charts/MultipleSeries.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="500"
height="600" >
  <mx:Script>
    <![CDATA[
     import mx.charts.LinearAxis;
     import mx.controls.Alert;
     import mx.formatters.NumberFormatter;
     import mx.charts.CategoryAxis;
     
     [Bindable]
        public var numFor:NumberFormatter = new NumberFormatter();
        
        [Bindable]
        public var DECKER:Array = [
           {date:"22-Aug-05", close:455946.12},
           {date:"23-Aug-05", close:453054.24},
           {date:"24-Aug-05", close:467135.54},
           {date:"25-Aug-05", close:468845.25},
        ];
        
        public function formatNumber(categoryValue:Number, previousValue:Object, axis:LinearAxis):String
        {
         numFor.useThousandsSeparator = true;
         numFor.precision = 2;
         numFor.decimalSeparatorTo = ".";
         numFor.thousandsSeparatorTo = ",";
         Alert.show("bye");
         Alert.show("hi"+String(categoryValue));
            return numFor.format(categoryValue);
        }
    ]]>
  </mx:Script>

  <mx:Panel title="Multiple Data Series" width="400" height="400">
            
     <mx:ColumnChart id="myChart"
        dataProvider="{DECKER}"
        showDataTips="true"
        height="250"
        width="350"
     >
        <mx:horizontalAxis>
           <mx:CategoryAxis categoryField="date" />
        </mx:horizontalAxis>
       
        <mx:series>
           <mx:BarSeries
             id="ls" 
                dataProvider="{DECKER}"
                xField="date"
                yField="close"
                displayName="DECKER"
           >
            <mx:verticalAxis >
             <mx:LinearAxis labelFunction="formatNumber"/>
         </mx:verticalAxis>
           </mx:BarSeries>
        </mx:series>
     </mx:ColumnChart>
     <mx:Legend dataProvider="{myChart}"/>
  </mx:Panel>
</mx:Application>


Nilesh Traoré

I'm a bit confused as there are has many simple mistakes thrown by the compiler on this point that you should not really missed. There are a lot of missing quoted strings.

Here's the code to work:



http://www.Adobe.com/2006/mxml' width = '500 '.
Height = "600" >
 
    Import mx.charts.LinearAxis;
Import mx.controls.Alert;
Import mx.formatters.NumberFormatter;
    
[Bindable]
public var numFor:NumberFormatter = new NumberFormatter();
       
[Bindable]
public var DECKER: Array =]
{date: "22 August 05 ', close: 455946.12},
{date: "23 August 05 ', close: 453054.24},
{date: "24 August 05 ', close: 467135.54},
{date: "25 August 05 ', close: 468845.25}
];
       
public void formatNumber(categoryValue:Number,_previousValue:Object,_axis:LinearAxis):String
{
numFor.useThousandsSeparator = true;
numFor.precision = 2;
numFor.decimalSeparatorTo = '. ';
numFor.thousandsSeparatorTo = ', ';
Alert.Show ("bye");
Alert.Show ("HI" + String (categoryValue));
Return numFor.format (categoryValue);
}
]]>
 

 
 
           
    
dataProvider = "{DECKER}.
showDataTips = "true".
Height = "250".
width = "350".
>
       
          
       

       
       
            
        

      
       
           <>ColumnSeries
ID = "ls".
xField = "date".
yField = "close".
displayName = "DECKER".
/>


    
    
 

Tags: Flex

Similar Questions

  • How to add Arabic format in the Direction of Adobe Indesign CC binding options?

    We recently purchased Adobe CC complete set. After installation, we found out the there is no option for Arabic format of mandatory management in our CC Indesign. Are there other ways to add Arabic format or the Middlest East for binding guidelines in our CC Indesign?

    Looks like you have downloaded a version that does not support the feature from right to left. You should be able to change the language in your CC desktop app, then download the English/Arabic version.

  • Problem formatting Scatter the chart axis

    All,

    I'm trying to format axes on an XY scatter chart to display 0.0% vertically and horizontally to OBIEE 11.1.1.7.140527 0,0. I tried to set the format in the properties for chart point as well as the properties of column cloud (using these two formats appear in the list and the custom) and none of these approaches to return the correct format. The numbers keep appearing without formatting - that is, 90.0% appears to be 90 on the vertical axis. Also as a record, when I fly over the points of real data on the graph, the values are made 1 decimal place (so I know that they are not truncated), but the % does not appear after the vertical data point.

    Does anyone else have this problem? If so, how to solve it?

    Thanks in advance for your help.

    Thanks for the photos (make it easier to visualize exactly what you are looking for).

    The strange thing is that I'm trying now to build a chart like yours, and all defining the format of my vertical measurement in % place you in the y-axis % and keep the axis X for normal numeric values.

    And I also found (mistakenly) where you can force the graph to display the % on axis Y.

    There is a problem during the definition of % in the property "Abbreviations": your measurement is 0 = 0 and 1 = 100%.

    If on the other side, that get in shape column or a percentage in the criteria tab measurement is 0 = 0%-100 = 100%.

    I use exactly the same as you, OBIEE and defining the format of data in the criteria for my Chronicle of the axis tab of Y of the clouds of points automatically graph showed me the values of %.

    There is an additional "detail": you lose % if you don't have a column in the 'Points' of the graph area, but you moved your column to "vary By color.

    If bring you a column 'Points', the % will be on the Y axis, if you have a column only in the "color vary by" you lose %. You can get them back by using the properties of the axis, but don't forget to add a 100 to your measurement (and on the mouse on the screen data will be skewed as it will show % 0-1 instead of 0 to 100).

    So I suggest to add a second instance of the same column that you use in "color vary by" and put in the area of 'Points '. % will return and you keep multiple colors. On screen, a mouse you have twice the same value on the screen, but it's probably smaller questions that you can live with if you get your good axis.

    (PS: I hope that makes sense...)

  • How I can cursor mover in the y-axis to MouseUp

    I' like the position of the mouse (cursor) up the y-axis (for example - 30 pixels) whenever the mouse is clicked.
    Any advice would be appreciated.

    Thanks for the reply.

  • How to use FM format in the model number format

    Hi all
    Anyone could explain what is the element format FM for model number format? I've read the documentation, it does not show a clear description that it the section model Format Datetime.

    Kind regards
    Valerie

    What is the element format FM for model number format?

    It removes the space left is allocated for additional info, for example a sign:

    SQL> select length(to_char(0, '0')) len1, length(to_char(0, 'fm0')) len2 from dual
    /
               LEN1            LEN2
    --------------- ---------------
                  2               1
    1 row selected.
    
  • How to make a format for the input mask?

    Hello!

    I have apex 4.2.1 I need to format some text for example fields:

    When the user enters the number of card I need my text field to "" space after every fourth issue so that he types as - 1234 1234 1234 1234.

    How do you suggest making it? I do some validation or dynamic action or JavaScript? I don't know where to start.

    Since you want to change something, while the user types it must be a dynamic javascript. The type of event would probably be something like KEYRELEASE (or maybe KEYPRESS). The javascript would probably something as a replacement.

    for example you might need something like (not tested)

    $v('P1_ITEM_NAME').replace (/(.{4}) / g, '$1')

    However, I would avoid using them to crush what the user types currently. Instead, I would add another element of the screen where I show the result of the substitution, while he types.

  • How to convert Date format in the Apex?

    Hi all

    I created an element of Apex Date Picker as "yyyy-mm-dd", now when they select this date picker, that must be converted in "day, month, DD, YYYY".
    I trired like that but it does not work, can anyone help me to find things to do.

    Under article, we have free will.

    Default value: to_char (to_date (: P1_ENG_DATE, 'dd-mm-yyyy'), ' day, month DD, YYYY ")
    Deafult value as type - PL/Sql.

    Thanks,
    David...

    Hello

    You can set the date format level of application, then you don't need to specify the format each time.

    for this go to "Modify the Application Properties"-> globalization

    Here you can specify the format of date of application.

    Thank you
    Tauceef

  • How low-level format using the code debugging?

    original title: how to low-level format using the debug code? can someone give a code

    How low-level format using the code debugging? can someone give a code

    Hi microcontrol.

    ·          What is the number and the model of the hard disk that you use?

    Your question does contain all the required information necessary for us to help you. Please provide more relevant information to continue troubleshooting as a result.

    The Microsoft article below may help if you use a disk Western Digital or Seagate.

    Using DEBUG to start formatting

    http://support.Microsoft.com/kb/60089

    I hope this helps!

    Halima S - Microsoft technical support.

  • Number of format in reports vs sort option

    Hello

    Oracle 11g r2, APEX 4.1.1.00.23.

    In our (classic) reports, we need display numbers using the following format: FM999G999G990D
    The number of decimal places will depend on the preference of the user (from 1 to 8).

    So currently I use a function to format a number:
    function format_number_to_x_decimals(p_number in number, p_nb_decimals in integer) return varchar2 is
    begin
         return to_char(p_number,'FM999G999G990D'||lpad('0',p_nb_decimals,'0'));
    end;
    The problem is that it returns a varchar2, so when we use the option of sort for a column, the numbers are not classified correctly... (ie: 1000 appearing 999).

    -Can I use the format FM999G999G990D000 in the number / Date Format in the report column attributes, but I have no control over the number of decimal places more...

    -Can I use a hidden column to calculate this number format and then use the Expression HTML #MY_HIDDEN_COLUMN # in the attribute of column formatting of the report. It works but we have a lot of number of columns in our reports, it's a pain to set up all the... In France, we call this "craft"!

    Do you not think that there is a solution "cleaner"?

    Yes, I :)

    Simply create an apex hidden element (say PX_FORMAT) with the FM999G999G990D0 source and use the point as a mask of column format report & PX_FORMAT.

    When the page is rendered apex translates the format mask to its source value i.e. FM999G999G990D0

    So now that the mask of format in the report is dynamic, you just need to put the value elements (PX_FORMAT) and run the report.

    Thank you

  • How to get a date to the timestamp of a file XML format

    Hello

    I'm trying to get a date from an external XML file. My XML file looks like this:


    <>http://www.NI.com/LVData">
        8.6.1
        
            Date of birth
            31/03/1983
        
     

    I can get the system to retrieve the correct XML element that shows the nested and elements , but I have no way to retrieve correctly the date. It seems as if she interprets my date seconds since 1904. I try to keep the "readable" for the end user XML, so it is important to keep this date in standard U.S. date format. I eventually uses this date to calculate the age of something. I labour code to subtract a timestamp in the format of the date to the current date and time, but I can't access it when I get back from XML.

    Starting from XML schema, it looks like the timestamp element requires a cluster... but there is no documentation on what to spend. Any ideas how to get back an XML date in this format in a simple and clean?

    Here's my current VI:

    Thank you

    Ryan

    Cambridge, MY

    Quick Tip on "bundle by name.  You don't need to consolidate all these constants where the values correspond to what is the constant of cluster at the top.  The cluster constant defines the data structure and the starting values.  Simply group the values for specific change items.

    Example of tone would be a bit cleaner.  Although the format string should use a capital T.

    As always with dealing with the time, complications could arise due to dealing with time zones and leap years.  Zones shouldn't matter for the calculation of the years since you are rounded up to years.  Although you probably want to round down rather than round at most closely. (I forgot this part in my example).  The problem with leap years when you would be only in a certain number of days of the anniversary, he would round up the age.  The number of rounded days would depend on how much on leap days that nobody has seen in their lifetime.

  • I have 3 domains. A field is a constant date mm/dd/yy. The second field is a digital number (1-120) and can be changed. The third field calculates two fields 1 and 2 in the summation and shown in mm/dd/yy. How do I calculate that in the script?

    How do I calculate that in the script? I have 3 domains. A field is a constant date mm/dd/yy. The second field is a digital number (1-120) and can be changed. The third field calculates two fields 1 and 2 in the summation and shown in mm/dd/yy.

    You searched for ' add days?

    You must write a custom for this JavaScript calculation because you cannot add a number any date. Also the date strings are not just a number, even if we can convert a given date in a number for that date that represents the time form a date date (Epoch). Witn this value, we can achieve them all kinds of date calculations and collect a little information about the date. JavaScirpt uses midnight on January 1, 1970 UTC for starting point or the date of the time. Its value is zero, and every millisecond increases the value of 1. When a date string is converted to the date object JavaScirpt we have access to many properties of the date and can use several methods to extract information or adjust the date object.

    Field 1 is in the format "Date" with a format of "mm/dd/yy".

    Field 2 is in «Number» format with 0 decimal.

    Zone 3 is in the format 'None '. The custom calculation script applies to the formatting.

    The custom for JavaScript calculation area 3:

    var cField1 = this.getField("Field_1").valueAsString;

    var cField2 = this.getField("Field_2").valueAsString;

    Event.Value = "";

    If (cField1! = "" & cField2!) = "") {}

    Console.println (cField1 + "" + cField2);

    calculate that if we as no null data;

    var cDateFormat = "mm/dd/yy";

    convert start date date object.

    Kai var = util.scand (cDateFormat, cField1);

    get the date of the month;

    David var = oDate.getDate ();

    Add field 2 number of days;

    David = Number (nDate) + Number (cField2);

    of being updated for the new date.

    oDate.setDate (nDate);

    Set the field to update formatting;

    Event.Value = util.printd (cDateFormat, letter);

    } / / end of data not null;

  • How can I insert html into the Actions Panel to format text?

    I am trying to create text using html, so I could format it in html.  I created a text box, it has given an instance name, "Dynamic text" selected and clicked 'display the text in html format.  When I click F9 (go on the Panel shares) to insert my html code, I get the message "current selection cannot have actions applied to it.  Am I missing something?  How can I insert html into the Actions Panel to format text?

    In order to assign html text to a textfield, you must assign your htmlText of a textfield property.  If you must give a name of uinstance to the textfield and then assign the text.  If you named the "tField" textfield, in the scenario that contains the textfield you EF text html as follows...

    tField.htmlText ="

    your text

    ";

    You should watch the TextFields htmlText property in the help documents to determine the limited number of html tags that are supported by Flash.

  • How to create certain number of spaces at the end of all records

    Hello

    I'm queue the select query, where each column value must take a position.

    I need to also have a certain number of spaces at the end of each record.

    How to make spaces at the end of the recording.

    Is anything order them to be included in the select query to get spaces at the end of the recording.

    details of the file is like this:-

    NAME OF FIELD FIELD DECRIPTION POSITIONS SIZE FORMAT
    RECORD TYPE 1 1 'R' ALPHA
    EMP N ° 2-4 5 DIGITAL EMP_NO
    SPACES of 6-11 6 SPACES-> HOW to GET THE NUMBER SPACES ESPECIALLY... HOW TO WRITE THE SELECT QUERY TO GET THESE IN THE HOLD FILE.

    THANKS in advance...

    Maybe just do a simple function that returns a string of spaces given the desired number of places?

    Published by: TimS on August 6, 2009 16:06

  • How to change the number of minutes for the exercise of the activity of the application

    How to change the number of minutes for the exercise of the activity of the application

    Hello

    It is not currently possible to change the goal of daily exercise.

    If you want to suggest that Apple consider adding this option, you can submit a request here:

    https://www.Apple.com/feedback/watch.html

  • How to make a folder shows the number of files in there?

    How to make a folder shows the number of files in there?

    You have not indicated what OS you are using.

    Yosemite

    Action > View Options: Select to display the item of information

Maybe you are looking for

  • I have a mac with an SSD, it freezes after almost exactly 60 minutes

    I have a Mac with an SSD. It freezes after almost exactly 60 minutes and made for quite awhile - new version of iOS makes no difference

  • Hooray, you can now edit your messages!

    Thank you Todd S.

  • IIS URL rewrite rule

    I'm doing a URL THEY rule that adds a URL parameter to the URL rewrite. If I have a URL that is as such: http://blah.com/otzyvy.aspx?revpage=1&sort-by=photo-desc should become http://www.blah.com/otzyvy.aspx?sort-by=photo-desc http://blah.com/otzyvy.

  • CPU stops during the installation of windows xp

    Hello guys,. I have a problem. Recently, I tried to re install windows xp but has failed to do so because the installation process stops in midstages due to the cpu locking. But I am able to install windows 7, although anyway windows 7 I have install

  • Office Jet 8630: OfficeJet Pro 8630 doesn't go to sleep

    I just plugged the 8630 to Win 7 (64-bit) machine via the USB cable (I disabled the wireless).  Everything works fine except that the printer does not seem to sleep regardless of the sleep setting, I chose.  The screen is always enabled.  The firmwar