Handling CSV 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. RingChart handles CSV parsing, reconstruction and data content interpretation via a set of options. In this part we will show how RingChart meets your needs for CSV content visualization. RingChart provides some extra optional properties to provide an advanced CSV data input parsing. These properties and methods are following:


It is advised to visit the Components Data Input section of all Kap Lab components to get more details about the data parsing properties and functions. Same as an ICollection data, the user has to differentiate between the data being set as series or not. When manipulating a provider where data are not set as series the user must set the wedgeLabel property so that RingChart knows how to affect names to the different wedges.


name;year05;year06;year07
Total;137607008000;153802000000;158752000000
Axa;65995000000;72099000000;86857000000
EADS;34206000000;39434000000;39123000000

This tabulated input will be consummed by the RingChart component in the following example:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#CCCCCC" layout="absolute" xmlns:ns1="fr.kapit.ringchart.*" > />
	<mx:Script
		<![CDATA[
			[Embed(source="CSV",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);
			    myRingChart.dataProvider = String(content);
   			}
		]]/>
	</mx:Script>
		<ns1:RingChart 	id="myRingChart"  
		                 wedgelabel="name"
		                 getDataAsSeries="false"
		                 radialDisplacement="30" 
		                 radius="200"
		                 width="100%" height="100%" 
		                 viewTooltips="true" 
		                 viewLabel="true" />
</mx:Application>