Adobe flex The following example draws a BubbleChart control

Adobe flex The following example draws a BubbleChart control

Postby haretu » Wed Mar 23, 2011 10:39 am

Adobe flex The following example draws a BubbleChart control and sets the maximum radius of bubble elements to 50
Code: Select all
<?xml version="1.0"?>
<!-- charts/BasicBubble.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script><![CDATA[
     import mx.collections.ArrayCollection;
     [Bindable]
     public var expenses:ArrayCollection = new ArrayCollection([
        {Month:"Jan", Profit:2000, Expenses:120, Amount:45},
        {Month:"Feb", Profit:1000, Expenses:200, Amount:60},
        {Month:"Mar", Profit:1500, Expenses:500, Amount:30}
     ]);
  ]]></mx:Script>
  <mx:Panel title="Bubble Chart">
     <mx:BubbleChart id="myChart"
        minRadius="1"
        maxRadius="50"
        dataProvider="{expenses}"
        showDataTips="true"
     >
        <mx:series>
           <mx:BubbleSeries
                xField="Profit"
                yField="Expenses"
                radiusField="Amount"
                displayName="Profit"
           />
        </mx:series>
     </mx:BubbleChart>
     <mx:Legend dataProvider="{myChart}"/>
  </mx:Panel>
</mx:Application>
Attachments
Screen shot 2011-03-23 at 10.37.55 AM.png
Screen shot 2011-03-23 at 10.37.55 AM.png (23.65 KiB) Viewed 693 times
haretu
 
Posts: 132
Joined: Sat Jan 08, 2011 9:56 pm

Return to Adobe FLEX Flash

Who is online

Users browsing this forum: No registered users and 1 guest

cron