Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8414039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:04:07+00:00 2026-06-10T01:04:07+00:00

I have been trying to represent the following data in a Flex Bubblechart.See the

  • 0

I have been trying to represent the following data in a Flex Bubblechart.See the chart code below as well.

<fx:Script>
    <![CDATA[
        import mx.collections.ArrayCollection;
        [Bindable]
        var BBCData:ArrayCollection= new ArrayCollection([
            {Industry: "In1", Range:"0-10 Days",  lcount:10},
            {Industry: "In1", Range:"10-20 Days",  lcount:20},
            {Industry: "In1", Range:"20-30 Days",  lcount:30},
            {Industry: "In1", Range:"30-40 Days",  lcount:40},
            {Industry: "In1", Range:"40-50 Days", lcount:50},

            {Industry: "In2", Range:"0-10 Days", lcount:10},
            {Industry: "In2", Range:"10-20 Days",  lcount:20},
            {Industry: "In2", Range:"20-30 Days",  lcount:30},
            {Industry: "In2", Range:"30-40 Days",  lcount:40},
            {Industry: "In2", Range:"40-50 Days",  lcount:50}
        ]);
    ]]>
</fx:Script>
<mx:BubbleChart  id="PriorityLowBubbleChart" width="400" height="250" 
                minRadius="1" 
                maxRadius="50" dataProvider="{BBCData}" 

                showDataTips="true">
    <mx:verticalAxis>
        <mx:CategoryAxis categoryField="Range" dataProvider="{BBCData}"/>
    </mx:verticalAxis>
    <mx:horizontalAxis>
        <mx:CategoryAxis categoryField="Industry"  dataProvider="{BBCData}"/>
    </mx:horizontalAxis>
<mx:series> 
    <mx:BubbleSeries dataProvider="{BBCData}" radiusField="lcount">

    </mx:BubbleSeries>
</mx:series>

</mx:BubbleChart>

And the Bubble chart I get is not what I expect. I am looking at the Bubblechart to show bubbles with radius as “count” and the X and Y are denoted by Industry and Range respectively.
So for example, the chart should show a circle of radious 10 at the intersection of Industry In1 and Range 0-10 Days.

In reality, I get the following graph

enter image description here

So for every data point it creates a new X item (“in1” repeated 5 times, “in2” repeated 5 times), in actual, it should be just one.Same is the case with y-marks.

It appears the chart is not able to group same field values on both the axes and hence this problem

is there a different data structure needs to be employed, or are there chart settings that solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:04:09+00:00Added an answer on June 10, 2026 at 1:04 am

    I am able to show bubble in bubble chart, Please find below code, which may give you some idea. I have commented few lines you can uncomment it and view the result, for you actual result you have to work little more on it and understand GroupingCollection concept. for refrel link How do I display grouped XML data in a Flex pie chart? : –

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                   xmlns:s="library://ns.adobe.com/flex/spark" 
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.charts.series.BubbleSeries;
                import mx.collections.ArrayCollection;
    
                [Bindable]
                public var BBCData:ArrayCollection = new ArrayCollection([
                    {id:1, Industry: "In1", Range:"0-10 Days",  lcount:10},
                    {id:2, Industry: "In1", Range:"10-20 Days",  lcount:20},
                    {id:3, Industry: "In1", Range:"20-30 Days",  lcount:30},
                    {id:4, Industry: "In1", Range:"30-40 Days",  lcount:40},
                    {id:5, Industry: "In1", Range:"40-50 Days", lcount:50},
    
                    {id:6, Industry: "In2", Range:"0-10 Days", lcount:10},
                    {id:7, Industry: "In2", Range:"10-20 Days",  lcount:20},
                    {id:8, Industry: "In2", Range:"20-30 Days",  lcount:30},
                    {id:9, Industry: "In2", Range:"30-40 Days",  lcount:40},
                    {id:10, Industry: "In2", Range:"40-50 Days",  lcount:50}
                ]);
    
                protected function verticalLabelFunction(value:Object, pre:Object, axis:Object, item:Object):Object 
                {
                    return item.Range;
                } 
                protected function horizontalLabelFunction(value:Object, pre:Object, axis:Object, item:Object):Object 
                {
                    return item.Industry;
                }
    
                private function clickHandler():void
                {
                    horizontalAxisID.labelFunction = horizontalLabelFunction;
                    horizontalAxisID.displayName = "Industry";
    
                    verticalAxisID.labelFunction = verticalLabelFunction
                    verticalAxisID.displayName = "Range";
    
                    var columnSeries:Array = new Array();
                    var series:BubbleSeries = new BubbleSeries();
                    series.radiusField = "lcount";
                    //Solution 1 - OutPut as per your dataProvider
                    horizontalAxisID.categoryField = series.xField = "id";
                    verticalAxisID.categoryField = series.yField = "id";
    
                    //Solution 2 - OutPut as per your dataProvider
                    //verticalAxisID.categoryField = series.yField = "Range";
                    //horizontalAxisID.categoryField = series.xField = "Industry";
    
                    columnSeries.push(series);
                    PriorityLowBubbleChart.series = columnSeries;
                    series.percentWidth = 100;
                    series.percentHeight = 100;
                    PriorityLowBubbleChart.dataProvider = BBCData;
                }
            ]]>
        </fx:Script>
    
        <s:layout>
            <s:VerticalLayout/>
        </s:layout>
    
        <mx:BubbleChart  id="PriorityLowBubbleChart" width="400" height="250" 
                         minRadius="1" maxRadius="50" dataProvider="{BBCData}" showDataTips="true" 
                         creationComplete="clickHandler()" >
            <mx:horizontalAxis>
                <mx:CategoryAxis id="horizontalAxisID" categoryField="id" />
            </mx:horizontalAxis>
            <mx:verticalAxis>
                <mx:CategoryAxis id="verticalAxisID" categoryField="id" />
            </mx:verticalAxis>
        </mx:BubbleChart>
    
    </s:Application>
    

    Or another way to achive what you are looking is as below: –

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                   xmlns:s="library://ns.adobe.com/flex/spark" 
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.charts.series.BubbleSeries;
                import mx.collections.ArrayCollection;
                import mx.utils.ObjectUtil;
    
                [Bindable]
                private var BBCData:ArrayCollection = new ArrayCollection([
                    {id:1, Industry: "In1", Range:"0-10 Days",  lcount:10},
                    {id:2, Industry: "In1", Range:"10-20 Days",  lcount:20},
                    {id:3, Industry: "In1", Range:"20-30 Days",  lcount:30},
                    {id:4, Industry: "In1", Range:"30-40 Days",  lcount:40},
                    {id:5, Industry: "In1", Range:"40-50 Days", lcount:50},
                    {id:6, Industry: "In2", Range:"0-10 Days", lcount:10},
                    {id:7, Industry: "In2", Range:"10-20 Days",  lcount:20},
                    {id:8, Industry: "In2", Range:"20-30 Days",  lcount:30},
                    {id:9, Industry: "In2", Range:"30-40 Days",  lcount:40},
                    {id:10, Industry: "In2", Range:"40-50 Days",  lcount:50}
                ]);
    
                protected function verticalLabelFunction(value:Object, pre:Object, axis:Object, item:Object):Object 
                {
                    return item.Range;
                } 
                protected function horizontalLabelFunction(value:Object, pre:Object, axis:Object, item:Object):Object 
                {
                    return item.Industry;
                }
    
                [Bindable]
                public var range:Array = [
                    {Range:"0-10 Days"},
                    {Range:"10-20 Days"},
                    {Range:"20-30 Days"},
                    {Range:"30-40 Days"},
                    {Range:"40-10 Days"}
                ];
    
                [Bindable]
                public var industry:Array = [
                    {Industry: "In1"},
                    {Industry: "In2"}
                ];
    
            ]]>
        </fx:Script>
    
        <s:layout>
            <s:VerticalLayout/>
        </s:layout>
    
        <s:Panel title="Line Chart">
            <s:layout>
                <s:VerticalLayout/>
            </s:layout>
            <mx:BubbleChart id="myChart"
                          dataProvider="{BBCData}" 
                          showDataTips="true"
                          maxRadius="50" minRadius="1">
                <mx:horizontalAxis>
                    <mx:CategoryAxis 
                        dataProvider="{industry}" 
                        categoryField="Industry"
                        displayName="Industry"
                        labelFunction="horizontalLabelFunction"/>
                </mx:horizontalAxis>
                <mx:verticalAxis>
                    <mx:CategoryAxis 
                        dataProvider="{range}" 
                        categoryField="Range"
                        displayName="Range"
                        labelFunction="verticalLabelFunction"/>
                </mx:verticalAxis>
                <mx:series>
                    <mx:BubbleSeries xField="Industry" yField="Range"
                        displayName="Industry" radiusField="lcount"/>
                </mx:series>
            </mx:BubbleChart>
        </s:Panel>
    
    </s:Application>
    

    Hope this may help you….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to generate a heatmap in R for some microarray data
Have been trying to encrypt an xml file to a string so that I
Have have been trying to make a validator for my xml files. I have
I have been trying to setup git for our web development team unsuccessfully. Some
I have been trying for almost a week now to create an SQLite database
I have been trying to generate report as per age differences of different months
I have been trying to create a ListView which I can sort using drag
I have been trying to align an entire label along with text to the
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I have been trying to serialize a list that contains arrays and lists. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.