TreeMap Legend

To make it easier to read the value of colors on TreeMap the user can instantiate a TreeMapLegend. The shape of the legend depends on values displayed by TreeMap (Discrete value or Continuous values). The legend gives the user the possibility to filter values. In case of continuous values two sliders will be added to the legend and in case of discrete value the filter is done by clicking on color of the legend.

<mx:Application xmlns:mx="" layout="vertical" xmlns:treemap="fr.kapit.components.treemap.*">
			import mx.collections.ArrayCollection;
			private var myDataProvider:ArrayCollection = new ArrayCollection([ 
				{itemLabel:"Item 1", itemArea:500, itemColor:203, itemTooltip:"Tooltip 1"},  
				{itemLabel:"Item 2", itemArea:400, itemColor:382, itemTooltip:"Tooltip 2"},  
				{itemLabel:"Item 3", itemArea:100, itemColor:560, itemTooltip:"Tooltip 3"}, 
	<treemap:TreeMap id="myTreeMap"
					 width="100%" height="80%"/>
	<treemap:TreeMapLegend treeMap="{myTreeMap}" width="100%" height="20%"/>