5 Replies Latest reply on May 8, 2009 9:35 AM by hkpadobe

    Bubble Chart

    hkpadobe

      I have a Bubble Chart that is using two series. In each series I am only using one data element as I only need one Bubble to show for each series.

      The problem I am facing is that when each of the radiusField property for each series has exactly the same value, the Bubbles drawn on the chart are always very miniscule. When the radiusField property values are different then the Bubbles drawn are larger.

       

      Is they a way to get the Bubbles drawn larger when the radiusFields property values are the same for each series?

       

      Below is the code for the Chart showing Bubbles fine because radiusField values are different. If you change the radiusField value for Variable s2 to 0.50, you will get the Bubbles drawn very small.

       

      <?xml version="1.0"?>

      <!-- charts/BubbleRelativeSize.mxml -->

      <mx:Application

       

      xmlns:mx="http://www.adobe.com/2006/mxml">

       

      <mx:Script>

      <![CDATA[

       

      import mx.collections.ArrayCollection;

      [

      Bindable]

       

      private var s1:ArrayCollection = new ArrayCollection( [

      {

      "x": 0.30, "y": 0.40, "r":0.50 }]);

       

      [

      Bindable]

       

      private var s2:ArrayCollection = new ArrayCollection( [

      {

      "x": 0.40, "y": 0.50, "r"7.0 }]);

       

      ]]>

       

      </mx:Script>

       

       

      <mx:Panel title="Bubble Chart (Bubbles relative to other series)">

       

      <mx:BubbleChart id="myChart"

      showDataTips="

      true"

       

      >

       

      <mx:series>

       

      <mx:BubbleSeries

      dataProvider="

      {s1}"

      displayName="

      series1"

      xField="

      x"

      yField="

      y"

      radiusField="

      r"

       

      />

       

      <mx:BubbleSeries

      dataProvider="

      {s2}"

      displayName="

      series2"

      xField="

      x"

      yField="

      y"

      radiusField="

      r"

       

      />

       

      </mx:series>

       

      </mx:BubbleChart>

       

      <mx:Legend dataProvider="{myChart}"/>

       

      </mx:Panel>

      </mx:Application>