Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

Video Corsi Actionscript 3.0


+ Reply to Thread
Results 1 to 3 of 3

Thread: Flex Builder 3 Bubble Chart and Using Salesforce Data

  1. #1
    Junior Member Settled In Mike_Green is on a distinguished road
    Join Date
    Jan 2009
    Posts
    3
    Rep Power
    0

    Flex Builder 3 Bubble Chart and Using Salesforce Data

    amazing Flash templates
    Hi,

    I am struggling to add multiple series to a Flex Builder 3 Bubble Chart. I have no trouble adding multiple series with a simple bubble chart within flex itself but in the
    example below when I connect to SFDC data the Chart appears once with one series of data then a second later with the second series of data.

    Any suggestions greatly appreciated.








    import mx.collections.ArrayCollection;
    import com.salesforce.results.QueryResult;
    import mx.utils.ObjectUtil;
    import mx.controls.Alert;
    import com.salesforce.AsyncResponder;
    import com.salesforce.objects.LoginRequest;

    private function login(event:Event):void {
    var lr:LoginRequest = new LoginRequest();
    //lr.server_url = parameters.server_url;
    //lr.session_id = parameters.session_id;
    lr.username = 'youraccount@sfdc.com.au';
    lr.password = 'yourpassword';
    lr.callback = new AsyncResponder(loadData, handleFault);
    apex.login(lr);
    }

    [Bindable]
    private var accountList:ArrayCollection = new ArrayCollection();
    [Bindable]
    private var accountList2:ArrayCollection = new ArrayCollection();

    private function handleFault(faultbject):void {
    Alert.show(ObjectUtil.toString(fault));
    }

    private function loadData(lrbject):void {
    apex.query("Select CloseDate, Probability, Amount From Opportunity Where StageName='Prospecting'", new AsyncResponder(
    function(qr:QueryResult):void {
    if (qr.size > 0) {
    accountList = qr.records;
    }
    bubblechart1.dataProvider = accountList;
    },
    handleFault)
    );

    apex.query("Select CloseDate, Probability, Amount From Opportunity Where StageName='Qualification'", new AsyncResponder(
    function(qr:QueryResult):void {
    if (qr.size > 0) {
    accountList2 = qr.records;
    }
    bubblechart1.dataProvider = accountList2;
    },
    handleFault)
    );
    }




    ]]>




    showDataTips="true"

    >

    dataProvider="{accountList}"
    displayName="series1"
    xField="CloseDate"
    yField="Probability"
    radiusField="Amount"
    id="series1"
    />


    dataProvider="{accountList2}"
    displayName="series2"
    xField="CloseDate"
    yField="Probability"
    radiusField="Amount"
    id="series2"
    />













  2. #2
    Junior Member Settled In Mike_Green is on a distinguished road
    Join Date
    Jan 2009
    Posts
    3
    Rep Power
    0

    Re: Flex Builder 3 Bubble Chart and Using Salesforce Data

    Sorry Full code below first paste didn't copy all across








    import mx.collections.ArrayCollection;
    import com.salesforce.results.QueryResult;
    import mx.utils.ObjectUtil;
    import mx.controls.Alert;
    import com.salesforce.AsyncResponder;
    import com.salesforce.objects.LoginRequest;

    private function login(event:Event):void {
    var lr:LoginRequest = new LoginRequest();
    //lr.server_url = parameters.server_url;
    //lr.session_id = parameters.session_id;
    lr.username = 'youraccount@sfdc.com.au';
    lr.password = 'yourpassword';
    lr.callback = new AsyncResponder(loadData, handleFault);
    apex.login(lr);
    }

    [Bindable]
    private var accountList:ArrayCollection = new ArrayCollection();
    [Bindable]
    private var accountList2:ArrayCollection = new ArrayCollection();

    private function handleFault(faultbject):void {
    Alert.show(ObjectUtil.toString(fault));
    }

    private function loadData(lrbject):void {
    apex.query("Select CloseDate, Probability, Amount From Opportunity Where StageName='Prospecting'", new AsyncResponder(
    function(qr:QueryResult):void {
    if (qr.size > 0) {
    accountList = qr.records;
    }
    bubblechart1.dataProvider = accountList;
    },
    handleFault)
    );

    apex.query("Select CloseDate, Probability, Amount From Opportunity Where StageName='Qualification'", new AsyncResponder(
    function(qr:QueryResult):void {
    if (qr.size > 0) {
    accountList2 = qr.records;
    }
    bubblechart1.dataProvider = accountList2;
    },
    handleFault)
    );
    }




    ]]>




    showDataTips="true"

    >

    dataProvider="{accountList}"
    displayName="series1"
    xField="CloseDate"
    yField="Probability"
    radiusField="Amount"
    id="series1"
    />


    dataProvider="{accountList2}"
    displayName="series2"
    xField="CloseDate"
    yField="Probability"
    radiusField="Amount"
    id="series2"
    />













  3. #3
    Junior Member Settled In Mike_Green is on a distinguished road
    Join Date
    Jan 2009
    Posts
    3
    Rep Power
    0

    Re: Flex Builder 3 Bubble Chart and Using Salesforce Data

    Sorry, Still does not paste all Code into Window,
    I have added it as an attachment.

















    Attached Files

+ Reply to Thread

Similar Threads

  1. Flex Gallery Pro - CMS gratuito in Flex
    By Flep in forum FLEX builder 3
    Replies: 6
    Last Post: 13-12-08, 17:47
  2. Flex Gallery Pro - free Flex CMS
    By Flep in forum Flex builder 3 ENG
    Replies: 4
    Last Post: 05-11-08, 12:29
  3. portfolio in flex builder
    By ottawa in forum FLEX builder 3
    Replies: 1
    Last Post: 13-10-08, 19:35
  4. Flex manages the back-end and Flash displays the data
    By Flep in forum Flex builder 3 ENG
    Replies: 3
    Last Post: 02-08-08, 09:50
  5. reading xml data
    By bhurat in forum FLEX builder 3
    Replies: 0
    Last Post: 29-05-08, 12:22

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO