-
11 Oct 2010 2:26 AM #1
Pie Chart data from bean list
Pie Chart data from bean list
Hi All,
I have a list of object constructed from raw JSON data of the following format - the sample below shows one object:
I use this list to populate a grid which allows grouping.Code:"Position" : [ { "AssetClass" : "Equity Securities", "Industry" : "Chemicals", "IndustryGroup" : "Materials", "PercentOfPortfolio" : 2.24, "Position" : 349399, "PricingDate" : "10/07/2010", "Sector" : "Materials", "SecurityName" : "MONSANTO CO", "SecurityType" : "EQUITIES", "SubIndustry" : "Fertilizers & Agricultural Chemicals", "Symbol" : "MON" }]
I want to create a pie chart which updates depending on what gouping is applied to the grid. But I am lost as to where to start.
For example, if the data is grouped by "Sector", I would want the pie chart to illustrate each slice as a sector, with the value being the sum of "PercentOfPortfolio" for all objects in that sector. I hope that makes sense.
I am not sure where to begin in adding this list to the chart.
Can anybody point me in the right direction?
Thanks.
-
11 Oct 2010 2:36 AM #2
You can use a PieDataProvider for this for example.
But you can also do it manually if you want. Listen to the Store.DataChanged event (gets fired on grouping) and redo your charting.
-
11 Oct 2010 4:41 AM #3
Thanks.
I can't seem to find any examples of the use of the PieDataProvider and the API docs are not helpful.
Do you have any examples of implementing this?
Similar Threads
-
pie chart data store
By spbroom in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 20 Aug 2010, 2:18 AM -
Pie Chart
By Bleak in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 6 Feb 2010, 10:05 PM -
Grid<Bean> when bean contains some list.
By valery.stroeder in forum Ext GWT: DiscussionReplies: 7Last Post: 28 Jan 2010, 4:23 AM -
[ext 3.0.3] Pie chart disappear wher chart store is reloaded
By e-tip in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 24 Nov 2009, 7:12 AM -
Pie chart not reloading
By ruchika in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 23 Jun 2009, 9:18 AM


Reply With Quote