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 7701575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:01:11+00:00 2026-05-31T23:01:11+00:00

Here is my problem I have arraycollection with the attribute Month with similar data

  • 0

Here is my problem I have arraycollection with the attribute “Month” with similar data you can find
Month:”Feb” for 5 times. If I run my application data won’t appear on the screen for “Feb” i.e columnchart won’t get displayed.
Can anyone tell me the reason or possible work around to solve this issue?
Please find code below: –

<mx:Script>
    <![CDATA[
        import mx.charts.series.ColumnSeries;
        import mx.collections.ArrayCollection;

        [Bindable] private var expenses:ArrayCollection = new
            ArrayCollection([
                {Month:"Jan", Profit:1000, Expenses:1500, Amount:450},
                {Month:"Feb", Profit:500, Expenses:200, Amount:600},
                {Month:"Feb", Profit:1500, Expenses:500, Amount:300},
                {Month:"Feb", Profit:2000, Expenses:1500, Amount:450},
                {Month:"Feb", Profit:1000, Expenses:200, Amount:600},
                {Month:"Feb", Profit:1500, Expenses:500, Amount:300},
                {Month:"Feb", Profit:2000, Expenses:1500, Amount:450},
                {Month:"Aug", Profit:1000, Expenses:200, Amount:600},
                {Month:"Sept", Profit:1500, Expenses:500, Amount:300},
                {Month:"Oct", Profit:2000, Expenses:1500, Amount:450},
                {Month:"Nov", Profit:1000, Expenses:200, Amount:600},
                {Month:"Dec", Profit:1500, Expenses:500, Amount:300}
            ]);

        private function clickHandler():void
        {
            var columnSeries:Array = new Array();
            var series:ColumnSeries = new ColumnSeries();
            categoryAxis.categoryField = series.xField = "Month";
            series.yField = "Profit";
            series.displayName = "Profit";
            columnSeries.push(series);
            myChart.series = columnSeries;
            series.percentWidth = 100;
            series.percentHeight = 100;

            myChart.dataProvider = expenses;
        }

    ]]>
</mx:Script>

<mx:VBox horizontalAlign="center" width="100%" height="100%" creationComplete="clickHandler()">
    <mx:ColumnChart id="myChart" width="90%" showDataTips="true" height="90%"  >
        <mx:horizontalAxis>
            <mx:CategoryAxis id="categoryAxis" categoryField="Month" />
        </mx:horizontalAxis>
    </mx:ColumnChart>
</mx:VBox>

  • 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-05-31T23:01:13+00:00Added an answer on May 31, 2026 at 11:01 pm
    <fx:Script>
            <![CDATA[
                import mx.charts.series.ColumnSeries;
                import mx.collections.ArrayCollection;
                import mx.events.FlexEvent;
    
                [Bindable] private var expenses:ArrayCollection = new
                    ArrayCollection([
                        {id:1, Month:"Jan", Profit:1000, Expenses:1500, Amount:450},
                        {id:2, Month:"Feb", Profit:500, Expenses:200, Amount:600},
                        {id:3, Month:"Feb", Profit:1500, Expenses:500, Amount:300},
                        {id:4, Month:"Feb", Profit:2000, Expenses:1500, Amount:450},
                        {id:5, Month:"Feb", Profit:1000, Expenses:200, Amount:600},
                        {id:6, Month:"Feb", Profit:1500, Expenses:500, Amount:300},
                        {id:7, Month:"Feb", Profit:2000, Expenses:1500, Amount:450},
                        {id:8, Month:"Aug", Profit:1000, Expenses:200, Amount:600},
                        {id:9, Month:"Sept", Profit:1500, Expenses:500, Amount:300},
                        {id:10, Month:"Oct", Profit:2000, Expenses:1500, Amount:450},
                        {id:11, Month:"Nov", Profit:1000, Expenses:200, Amount:600},
                        {id:12, Month:"Dec", Profit:1500, Expenses:500, Amount:300}
                    ]);
    
                private function clickHandler():void
                {
                    categoryAxis.labelFunction = labelFunction;
                    var columnSeries:Array = new Array();
                    var series:ColumnSeries = new ColumnSeries();
                    categoryAxis.categoryField = series.xField = "id";
                    series.yField = "Profit";
                    series.displayName = "Profit";
                    columnSeries.push(series);
                    myChart.series = columnSeries;
                    series.percentWidth = 100;
                    series.percentHeight = 100;
    
                    myChart.dataProvider = expenses;
                }
    
    
    
                protected function labelFunction(value:Object, pre:Object, axis:Object, item:Object):Object 
                {
                    return item.Month;
                }
    
            ]]>
        </fx:Script>
    
    
        <mx:VBox horizontalAlign="center" width="100%" height="100%" creationComplete="clickHandler()">
            <mx:ColumnChart id="myChart" width="90%" showDataTips="true" height="90%"  >
                <mx:horizontalAxis>
                    <mx:CategoryAxis id="categoryAxis" categoryField="id"/>
                </mx:horizontalAxis>
            </mx:ColumnChart>
        </mx:VBox>
    

    Do some thing like this, hope this will help.

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

Sidebar

Related Questions

I have here problem with my tail recursion Fibonacci in Ruby. When I run
Here is my problem: I have an n-tiers application for which I have to
Here is my problem: I have an application that every iteration it returns to
Here's my problem: I have an application which uses sql server express 2005, and
Here's my problem: I have a Flash object on my page. The user can
Here is the problem I have: I have a lot (tens of thousands) of
Here's my problem - I have some code like this: <mx:Canvas width=300 height=300> <mx:Button
Here's my problem: I have a virtual method defined in a .h file that
Here is the problem: we have lots of Javascripts and lots of CSS files,
Here's my problem: I have to call a web service with a secure header

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.