Handling ICollectionView format

CSV Files are organized in rows and columns using a CSV delimiter. A data field has a row index and column index, generally described in a String format while it can represent a Date, a Number or other content. RadarChart handles CSV parsing, reconstruction and data content interpretation via a set of options. In this part we will show how RadarChart handles CSV content visualization.

"filterPath property must be set so that Radar Chart could reconstruct the CSV file in order to display it. filterPath takes as value the name of the column containing the names of the different series."

Radar Chart provides some extra optional properties to provide advanced CSV data input parsing. These properties and methods are the following:

The following sample shows how can integrate TreeMap using the CSV data source.

CSV.txt:

name;continent;region;population;area;growth
Albania;22;234;28750;3249136;56
Greece;49;342;131940;2104035;32
Macedonia;90;654;25333;2104035;3
Serbia and Montenegro;87;212;102350;10614558;20
Andorra;90;1234;450;72766;12

Application:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF" layout="absolute" xmlns:radarchart="fr.kapit.radarchart.*" creationComplete="onCreationComplete()">
	<mx:Script>
		<![CDATA[
			[Embed(source="CSV.txt",mimeType="application/octet-stream")]
   			private var CSV:Class;
   			
   			private function onCreationComplete():void
   			{
   				var byteArray:ByteArray = new CSV() as ByteArray;
				var content:Object=byteArray.readUTFBytes(byteArray.length);
				myRadarChart.dataProvider = String(content);
   			}
   			
		]]>
	</mx:Script>
	<radarchart:RadarChart id="myRadarChart" 
                               filterPath="{['name']}"
                               csvDelimiter=";" 
                               withHeaders="true"  
                               width="100%" 
                               height="100%"  />
</mx:Application>