Simple Column Chart using mx:ColumnChart

This application helps to create a simple Column Chart using mx:ColumnChart.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx">
	
		<fx:Script>
			<![CDATA[
				import mx.collections.ArrayCollection;
				
				[Bindable]
				public var dpac:ArrayCollection = new ArrayCollection ([
					{ date:"01/01/2006", cash:50000, 
						stocks:198192, retirement:130101, 
						home:750000, other:19148 },
					{ date:"02/01/2006", cash:50000, 
						stocks:210309, retirement:143707, 
						home:760000, other:19493 },
					{ date:"03/01/2006", cash:50000, 
						stocks:238992, retirement:169529, 
						home:770000, other:19933 },
					{ date:"04/01/2006", cash:50000, 
						stocks:292269, retirement:242596, 
						home:770000, other:21445 }]);
			]]>
		</fx:Script>
		<mx:Legend dataProvider="{otherDashGraphCE}" direction="vertical" height="20" right="0"/>
		<mx:ColumnChart dataProvider="{dpac}"
						width="100%" height="90%" horizontalCenter="0"
						paddingLeft="5" 
						paddingRight="5" 
						showDataTips="true"
						id="otherDashGraphCE"
						bottom="15">
			<mx:horizontalAxis>
				<mx:CategoryAxis  categoryField="date"/>
			</mx:horizontalAxis>
			<mx:series>
				<mx:ColumnSeries displayName="cash"  yField="cash"/>	
				<mx:ColumnSeries displayName="stocks"  yField="stocks"/>	
				<mx:ColumnSeries displayName="retirement"  yField="retirement"/>	
				<mx:ColumnSeries displayName="home"  yField="home"/>
				<mx:ColumnSeries displayName="other"  yField="other"/>
			</mx:series>
		</mx:ColumnChart>
		

</s:Application>

Advertisements

About Ajeeth Boaz

I am a freelance photographer you can find my clicks @ www.ajeethboaz.com. I am a Developer by profession, I like sharing my experience through blogs you can find it @ http://blog.ajeethboaz.com/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: