may be it's posible.
What is the format for date element?
date is SQL date element that has date and time
but the date.month gives out the number and that doesnot map collectively into x axis that is --
say i have following entries -
date name center_id room_id
8/9/09 abc1 1 1
8/9/09 abc2 1 1
8/9/09 abc3 3 2
8/9/09 abc4 3 1
8/9/09 abc5 2 2
8/10/09 abc6 2 1
8/10/09 abc7 1 1
8/9/09 abc8 1 2
8/9/09 abc9 2 1
8/9/09 abc10 2 1
8/10/09 abc11 3 2
8/9/09 abc12 3 1
8/10/09 abc13 3 1
so there are two months sep/oct so these should be there are x axis vs number of rooms on y axis w.r.t center
sep center 1 number of rooms 3
sep center 2 number of rooms 2
sep center 3 number of rooms 2
oct center 1 number of rooms 1
oct center 2 number of rooms 1
oct center 3 number of rooms 2
graph is as follows
How can i go about this?
No, you should prepare data for chart.
select data for only one center (series per center)
extract month from date
show count of nodes per month
Yes, issues i am facing is to manipulate XMLListCollection and play with it.
there are not many examples to manipulate the XMLListCollection [XLC] to do all these the steps as you said are -
store the XLC in some temp table
replace all the date fields with there month
replace all rooms belonging to a single center with center ID [information about which room is lost - we need total number]
now while showing into the chart how to say that if the month name is same put them in same column
how can i go about this?
1 person found this helpful
You should create new XLC for dataProvider to chart with data like. And it will be better to save XML from original data.
<item month="september" count="3"/>
<item month="oct" count="3"/>
</center> (for each center)
So first you extract month.
for each (var d:XML in oldXML.abc.data)
// parse month and save only month in d
// also save all existing unique months
Also you need a list if center ids. If you have it - good. If no
for each (var c:XML in oldXML.abc.center_id)
// save unique items to list
After loop in centers list and months
for each (var items:XMLList in oldXML.abc.(center_id == current_center_id))
// data for one center
for each (var inOneMonth:XMLList in items.(date == current_month))
// add item with month and lenth of XMLList to newDataProvider
Hmm yes, after reading through above solution and some others i figured that its difficult to work with syntax of XMLListCollection so I converted it to ArrayCollection using IViewCursor and then parsing those tables to create individual chart tables. But now i have to create table for each chart still good as i can export those tables to excel sheet as added feature
Thanks for your help Natasha.