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.

"Creating hierarchy using your data input is done by setting the filterPath property."

In the following example, we use an XML file to display a large hierarchical collection of quantitative data.

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
				xmlns:treemap="fr.kapit.components.treemap.*" >

	<mx:XML id="myData">
		<node>
			<node type='package' name='mx.rpc'>
				<node type='package' name='mx.rpc.events'>
					<node type='class' name='mx.rpc.events::AbstractEvent' label='AbstractEvent' childrenCount='4' size='3'/>
					<node type='class' name='mx.rpc.events::FaultEvent' label='FaultEvent' childrenCount='0' size='9'/>
					<node type='class' name='mx.rpc.events::HeaderEvent' label='HeaderEvent' childrenCount='0' size='5'/>
					<node type='class' name='mx.rpc.events::InvokeEvent' label='InvokeEvent' childrenCount='0' size='3'/>
					<node type='class' name='mx.rpc.events::ResultEvent' label='ResultEvent' childrenCount='0' size='8'/>
					<node type='class' name='mx.rpc.events::SchemaLoadEvent' label='SchemaLoadEvent' childrenCount='0' size='4'/>
					<node type='class' name='mx.rpc.events::WSDLLoadEvent' label='WSDLLoadEvent' childrenCount='1' size='4'/>
					<node type='class' name='mx.rpc.events::XMLLoadEvent' label='XMLLoadEvent' childrenCount='2' size='5'/>
				</node>
				<node type='package' name='mx.rpc.http'>
					<node type='package' name='mx.rpc.http.mxml'>
						<node type='class' name='mx.rpc.http.mxml::HTTPService' label='HTTPService' childrenCount='1' size='13'/>
					</node>
				</node>
			</node>
		</node>
	</mx:XML>
	
	<treemap:TreeMap id="myTree" 
					  labelField="@label" 
					  dataProvider="{myData}"
					  areaField="@childrenCount" 
					  colorField="@size"
					  width="100%" height="100%" />
	
</mx:Application>

In some cases, ICollectionView instances contains hidden information that need to be extracted and analyzed before being displayed. TreeMap do this for you by using an internal data parsing library. Users can choose to ignore root node to analyse the data content based on a filterPath and some reporting functions. See Common Data Input Section.