Posted a complete solution with no response from the author.
Requesting closure.
Main Topics
Browse All TopicsI m using stacked bar in flex to display my report. How do I bind data from database with stacked bar chart in flex. I would get whole data from database in my mxml page. I store data in Arraycollection.
I would get data in ArrayCollection like following
month Branch balance
--------------------------
Jan Andheri 10000000.00
Jan Colaba 15600000.00
Jan Bandra 56000000.00
Jan Vashi 581000000.00
Jan Panvel 800000000.00
Jan Malad 68500000.00
Feb Andheri 56200000.00
Feb Colaba 35800000.00
Feb Bandra 46000000.00
Feb Vashi 781000000.00
Feb Panvel 95000000.00
Feb Malad 451500000.00
Mar Andheri 62000000.00
Mar Colaba 82800000.00
Mar Bandra 46000000.00
Mar Vashi 241000000.00
Mar Panvel 795000000.00
Mar Malad 651500000.00
but now how can i bind data with design in mxml page stacked bar chart.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: mplordPosted on 2009-11-18 at 12:42:48ID: 25854546
One way is to manipulate your data such that you have one record per month (category) and a field per branch / balance:
0" balanceColaba="15600000.00 " balanceBandra="56000000.00 " balanceVashi="581000000.00 " balancePanvel="800000000.0 0" balanceMalad="68500000.00" />
e.g.
<record month="Jan" balanceAndheri="10000000.0
Then you can use each balance[Branch] property as a series for each segment value of the stacked bars.
In this example I created the source data in XML then add it to the ArrayCollection as an object with properties, to simulate what you might return from the server / db.
Clicking the button shows that the data changes when the ArrayCollection (ac) is updated (as the dataProvider for the chart is bound to it).
Select allOpen in new window