Using filterPath

Filter Path is the most important field when analyzing informations encapsulated and hidden inside any data. It indicates what we want to see and defines how links must be constructed. A Filter Path is an array containing a selection of Headers (for CSV) or Node attributes (for XML files) or Object properties (for objects with children or customTreeDataDescritor) in a given order that defines the linking policy. When defining a Filter Path, the input data will be transformed into an internal data structure that can be manipulated and processed.

"When the property filterPath is used, the labelField property must have id as value: labelField="id""

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:treemap="fr.kapit.components.treemap.*">
	
	<mx:XML id="myData">
		<world>
			<country name="Albania" code="AL" continent="Europe" region="Southern Europe" area="28750" population="3249136" population_growth="1.34" infant_mortality="49.2" gdp_total="4100" inflation="16"/>
			<country name="Greece" code="GR" continent="Europe" region="Southern Europe" area="131940" population="10538594" population_growth="0.42" infant_mortality="7.4" gdp_total="101700" inflation="8.1"/>
			<country name="Macedonia" code="MK" continent="Europe" region="Southern Europe" area="25333" population="2104035" population_growth="0.46" infant_mortality="29.7" gdp_total="1900" inflation="14.8"/>
			<country name="Serbia and Montenegro" code="YU" continent="Europe" region="Southern Europe" area="102350" population="10614558" population_growth="0.08" infant_mortality="6.03" gdp_total="20600" inflation="20"/>
			<country name="Andorra" code="AND" continent="Europe" region="Southern Europe" area="450" population="72766" population_growth="2.96" infant_mortality="2.2" gdp_total="1000" inflation="3.2"/>
			<country name="France" code="F" continent="Europe" region="Western Europe" area="547030" population="58317450" population_growth="0.34" infant_mortality="5.3" gdp_total="1173000" inflation="1.7"/>
			<country name="Pakistan" code="PK" continent="Asia" region="South-central Asia" area="803940" population="129275660" population_growth="2.24" infant_mortality="96.8" gdp_total="274200" inflation="13"/>
			<country name="Tajikistan" code="TAD" continent="Asia" region="South-central Asia" area="143100" population="5916373" population_growth="1.54" infant_mortality="113.1" gdp_total="6400" inflation="28"/>
			<country name="Turkmenistan" code="TM" continent="Asia" region="South-central Asia" area="488100" population="4149283" population_growth="1.82" infant_mortality="81.6" gdp_total="11500" inflation="25"/>
			<country name="Uzbekistan" code="UZB" continent="Asia" region="South-central Asia" area="447400" population="23418381" population_growth="1.87" infant_mortality="79.6" gdp_total="54700" inflation="7.7"/>
		</world>
	</mx:XML>
	
	<treemap:TreeMap  id="myTree" width="100%"  height="100%"
					  labelField="id" areaField="@area" colorField="@population" 
					  filterPath="{['@continent', '@region', '@name']}"
					  dataProvider="{myData}"/>
	
</mx:Application>