How to update a chart when the array is updated

Hi I am using an array to populate a chart in FB3 and having trouble updating the chart when the array is updated.
Chart
         <mx:Label id="archiveTitle" x="10" y="10" text="Current Archive " fontSize="14" fontWeight="bold"/>
         <mx:PieChart id="chart" height="130" width="300" color="0x323232"
            showDataTips="false" dataProvider="{ratingAC}"  y="22">
             <mx:series>
                <mx:PieSeries field="Rating"/>
            </mx:series>
        </mx:PieChart>
Array + Vars
         [Bindable]
         public var newsDB:ArrayCollection = mx.core.Application.application.newsDB as ArrayCollection;
         [Bindable]
         private var positive:int = 1;
         [Bindable]
         private var neutral:int = 0;
         [Bindable]
         private var negative:int = 0;
         [Bindable]
         private var ratingAC:ArrayCollection = new ArrayCollection([
         { Rating: 1 },  // no data
         { Rating: positive }, // [0] positive
         { Rating: neutral }, // [1] neutral
         { Rating: negative }  // [2] negative
        private function init():void{
               buildChart();
               newsDB.addEventListener(CollectionEvent.COLLECTION_CHANGE, test);
               newsDB.addEventListener(CollectionEvent.COLLECTION_CHANGE, buildChart);
        private function test(e:CollectionEvent):void{
             trace("array changed");
             positive = 20
        private function buildChart(e:CollectionEvent=null):void{
             for(var i:int; i<newsDB.length; i++){
                  if(newsDB[i].rateItem == 0){
                       trace(positive);
                       positive += 1;
                       //ratingAC.setItemAt(positive,0);
                       trace(positive);
                  if(newsDB[i].rateItem == 1){
                       neutral += 1;
                  if(newsDB[i].rateItem == 2){
                       negative += 1;

Sorry, in my app I have an ArrayCollection of items from a news feed that the user has deemed important, and given each item a rating. The For loop will loop through the "newsDB" array and set the var accordingly (positive, negative, neutral). The variables are what is populating the arrayCollection (ratingAC). How would I either a) bind the variables to the ArrayCollection so that it updates when one has changed, or b) update the specific index in the array collection. When debugging, i notice that the variables are updating, but the arrayCollection is not.
Thanks in advance!

Similar Messages

  • How to bind bar chart(columns) to array list object in c# win form

    how to bind bar chart(columns) to array list  object in c#win form

    Hi Ramesh,
    Did you want to bind list object to bar chart? I made a simple code to achieve binding list to bar chart.
    public partial class Form0210 : Form
    public Form0210()
    InitializeComponent();
    private void Form0210_Load(object sender, EventArgs e)
    BindData();
    public void BindData()
    List<int> yValues = new List<int>(new int[] { 20, 30, 10, 90, 50 });
    List<string> xValues = new List<string>(new string[] { "1:00", "2:00", "3:00", "4:00", "5:00" });
    chart1.Series[0].Points.DataBindXY(xValues, yValues);
    The links below might be useful to you:
    # Data Binding Microsoft Chart Control
    http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx
    # Series and Data Points (Chart Controls)
    https://msdn.microsoft.com/en-us/library/vstudio/dd456769(v=vs.100).aspx
    In addition, if I misunderstood you, please share us more information about your issue.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • I've lost my iPhone 4... How can I find it when the device is offline when using "find my iPhone app"????? Any way of getting a location from it????

    I've lost my iPhone 4... How can I find it when the device is off linesmen using "find my iPhone app"????? Any way of getting a location from it?????

    No. It must be online in order to locate it.
    What To Do If Your iDevice Is Lost Or Stolen
    iPhone, iPod Touch, and iPad
    If you activated Find My Phone before it was lost or stolen, you can track it only if it is connected to the Internet by Wi-Fi or cellular. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. iCloud- Use Lost Mode
      6. What to do if your iOS device is lost or stolen
      7. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      8. Find My iPhone
      9. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • My messages won't say the contact name only shows the phone number, how do you change this when the contact is in my phone under that number already?

    My messages won't say the contact name only shows the phone number, how do you change this when the contact is in my phone under that number already?

    I thought that at first, but I have text this person before and had received responses in a timely manner. Its just weird that it all of a sudden removed their name.
    Would this affect the delivery of the text message?

  • I have a new computer and my old drive has my UNSAVED bookmarks on it and I want to import them, how do I do it when the bookmarks are not SAVED?

    I have a new computer and my old drive has my UNSAVED bookmarks on it and I want to import them, how do I do it when the bookmarks are not SAVED?

    You can backup the bookmarks on the old computer and create a JSON or HTML backup and restore or import this file in the Bookmarks Manager (Bookmarks > Show All Bookmarks).
    You can use an USB stick to transfer the saved bookmarks file to the new computer.<br />
    You can also copy the places.sqlite file from that computer to have the bookmarks and the history.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    *http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox

  • How can I generate data when the link is click on?

    i have written a stackoverflow question ,
    would like some input if you have any , thanks, i would like to stay away from using jquery
    http://stackoverflow.com/questions/23143436/how-can-i-generate-data-when-the-link-is-click -on/23143813?noredirect=1#23143813

    I think you need to rephrase your question and be more specific. Also for me the images you are referring to do not exist. From your question I am interpreting it as "how do I program?"

  • How can i find out when the Creative Cloud be available in my country?

    how can i find out when the Creative Cloud be available in my country?

    This information is not available. We are working to add more countries, the newest being South Africa which will be added by the end of November. We are working to make this process more transparent. I understand how frustrating it is to not know if and/or when the Creative Cloud will be available in your country.

  • How do you quit mail when the  'quit mail' is not illuminated

    how do you quit mail when the 'quit mail' is not illuminated

    Command ⌘ + Q, or if that doesn't work, force quit by pressing Command ⌘ + option + esc, selecting Mail, and then Force Quit.

  • How to debugg a script when the Required out put is like Fax  or email

    Hi this is Durga Prasad i have small doubt in scripts can any one clarify that one plz  normally we will do that one with activating debugger but when a special requirement is like fax or e mail    how we will do that one
    "how to debugg a script when the Required out put is like Fax  or email"
    Thanks in advance
    Durga Prasad.

    Hi
    DEBUG Smartform:
    1) One way to debug smartform is to debug the Function Module of that smartforms.
    If you want to debug particular smartform node that the solution would be,
    insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint.
    So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
    2) SFTRACE can be used for debugging SMARTFORMS.
    Read More here.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    script
    1). Use Tools - Word Processing - Layout Set (SE71). Enter name of layout set and then Utilities - Activate Debugger.
    It is of no consequence which layoutset you enter when selecting the SAPscript debugger. (Menu path: Tools-Wordprocessing - Forms, Utilities - Activate Debugger) The next layoutset called will invoke the debugger.
    2). Another way to set the SAPScript debugger is to run program RSTXDBUG.
    When you debug Print program it is same as you debug any other ABAP program. While when you debug SAPScript, you actually debug the code ( scripting) you have written SAPScript Form.
    As per ur question there is nothing new with script debugging,
    it is same as normal report debugging...
    SMARTFORMS DEBUGGING
    For smartforms debugging you can do this.
    1. Execute the smartform (execute button in SMARTFORMS transaction)
    2. Take the generated function module and display it in SE80.
    3.Find the smartforms Elements (text elements, windows, code lines, loops) in this and set Soft break points.
    Correct name is SMARTFORM_TRACE. You have lots of options for adequate analysis
    Tcode - SFTRACE
    Re: How to Debug a Smartform
    Debug of smartform and sapscript.
    Debugging SmartForms
    Debugging of a subroutine pool.
    SCRIPT
    There are 2 separate kinds of debugging available when you try to debug scripts.
    1. Debugging the print program : This is the normal debugging we do for our report programs.
    2. Debugging the script itself : You Can debug a SAP Script by activating debugger in two ways:
    a .In SE71->Menu->Utilities->Activate Debugger, then debugger will be get activated and when your print program is executing Script Debugger will be in active and you can proceed with your debugging.
    b. Goto se38-> RSTXDBUG ->Execute this same as going thru in se71-> Menu, now debugger will be activated.
    refer to the link below
    http://www.howforge.com/how-to-debugging-sapscript-form
    Look at the BLOG here, it is well explained
    /people/sudheer.junnuthula2/blog/2007/01/09/script-debugging
    Regards
    Anji

  • How to logout an user when the browser is closed?

    Hi,
    does someone knows how to logout an user when the browser is closed?
    Thanks.

    Hi,
    There is an api wwctx_sso.cleanup_sessions which removes old sessions. This takes a parameter "p_hours_old" which indicates the age of the sessions which need to be removed. There is a job which runs which in turn calls this api to clean up sessions which are 7 days old or 168 hours old. You can see this from the dba_jobs table. You can try running this api.
    Thanks,
    Sharmila

  • If i purchase a device through this official website,then how can i send warranty when the device have problem?

    if i purchase a device through this official website,then how can i send warranty when the device have problem?

    To purchase a device from the online US Apple Store you will need a US credit card with a valid US address and a valid US address to ship to. You cannot use a shipping forwarder.
    If you are in a different country you would have to return to the US to access your warranty.
    If you are in the US but not near an Apple Store you would start here for service: https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • How do I deactivate DreamWeaver when the hard drive died?

    How do I deactivate DreamWeaver when the hard drive died?  It will not reinstall on the new PC because it wants the old one deactivated, which is impossible.  There is no way I can deactivate it and I have a legitimate copy.  I had it on one PC that died, so I bought a new PC and put it on that.  A few days later I had to return the new one because of problems with the PC.  They give me a replacement which seems to be working OK, only now Adobe thinks I have DreamWeaver all over the place.  I don't have it anywhere.  All I want to do is put my legitimate copy on my new PC.  HELP!!!

    You need to contact Adobe Support either by chat or via phone when you have serial number and activation issues.  They can take care of the deactivation for the lost drive.  Chat operates 24/7.
    Here are some links to help make contact:
    http://www.adobe.com/support/chat/ivrchat.html
    http://www.adobe.com/support/download-install/supportinfo/

  • How to stop PO output when the indicators are updated with a prog. **URGENT

    Hi,
    I have developed a update prg which will update the Final invoice indicator and Goods reciept indicator in SRM as well as in R/3 only for 'ORDERED' PO's. This was done using BBP_PO_PD_UPDATE FM. Everything is working fine, all the indicators are getting updated as expected both in SRM and R/3.
    Only problem is that when the indicators are updated in SRM, PO Output is getting generated which should not happen.
    Do you have any idea how to stop the OUTPUT.
    This is very urgent.
    BR,
    Parvez.

    PO output
    PO Output problems
    disable PO output on po change in SRM

  • How can I do to share the array elements between "C" and "Java"

    Hi,all
    I want to implement the function about this: c and java between JNI can share the same data area. For example, when change the value of the array in java, i can get the same value in c.
    I use the function:Xxx* GetXxxArrayElements(JNIEnv env, jarray array, jboolean isCopy)
    But i find that the "isCopy" is JNI_TRUE which means that i get the pointer which point to a copy,so i can't get the change
    in Java later.
    How can I do?Can i set "isCopy" with JNI_FALSE??
    Thank u.

    No, you can't. isCopy is of type jboolean*, and the value is just set by the call to inform you whether the data was copied or not, but you cannot infulence that.
    In fact, the VM might store an array of primitives in a different way as C, and this routine has to convert between the two representations. In this case copying is always required.

Maybe you are looking for