Handling ICollectionView format

An ICollectionView is a view onto a collection of data. All Classes implementing the ICollectionView interface (XML, XMLListCollection, ArrayCollection) are handled in the same way by the component.

The data provided to the component can be parsed as its structure. In fact, data can defined in these two following ways:


RingChart provides a property getDataAsSeries. The property is set to false as a default value. The developer has to set it to true if he wants to parse his data in a serial structure. When manipulating a provider where data is not set as series, the user must set the wedgeLabel property so that RingChart knows how to affect names to the different wedges.


In the following example, we show how RingChart manipulate a dataprovider containing data as series
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#CCCCCC" layout="absolute" xmlns:ns1="fr.kapit.ringchart.*" > />
	<mx:Script
		<![CDATA[
			import mx.collections.ArrayCollection;
   			
                         [Bindable]
   			 private var revenues:ArrayCollection = new ArrayCollection([
   			 {Total:137607008000, Axxa:65995000000, EADS:34206000000},
   			 {Total:153802000000, Axxa:72099000000, EADS:39434000000},
                         {Total:158752000000, Axxa:86857000000, EADS:39123000000}
                         ]);   			
		]]/>
	/mx:Script>
		</>
</mx:Application>



In the following example, we show how RingChart manipulate a dataprovider containing data not structured as series
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#CCCCCC" layout="absolute" xmlns:ns1="fr.kapit.ringchart.*" > />
	<mx:Script
		<![CDATA[
			import mx.collections.ArrayCollection;
   			
                         [Bindable]
   			 private var revenues:ArrayCollection = new ArrayCollection([
   			 {Total:137607008000, Axxa:65995000000, EADS:34206000000},
   			 {Total:153802000000, Axxa:72099000000, EADS:39434000000},
                         {Total:158752000000, Axxa:86857000000, EADS:39123000000}
                         ]);   			
		]]/>
	</mx:Script>
		<ens1:RingChart id="myRingChart" 
                                     dataProvider="{revenues}" 
                                     getDataAsSeries="false"
                                     radius="200"
                                     radialDisplacement="30" 
                                     width="100%" height="100%"  
                                     viewTooltips="true" viewLabel="true"/>
</mx:Application>