Created
January 3, 2011 22:30
-
-
Save bollwyvl/764095 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" | |
xmlns:components="components.*" | |
creationComplete="init()"> | |
<mx:Script> | |
<![CDATA[ | |
import components.PortfolioFundingChart; | |
import org.axiis.data.DataSet; | |
import mx.collections.ArrayCollection; | |
public function init():void | |
{ | |
var dp:ArrayCollection = new ArrayCollection(); | |
var yrs:Object = new Object(); | |
var ds:DataSet = new DataSet(); | |
ds.processCsvAsTable(payload, false); | |
ds.pivotTable(0); | |
dp = ds.data.pivot.rows; | |
yrs = (ds.data.pivot.header as Array).slice(1); | |
var chart:PortfolioFundingChart = new PortfolioFundingChart(); | |
chart.percentWidth=chart.percentHeight=100; | |
chart.fundingData = dp; | |
chart.years = yrs; | |
this.addChild(chart) | |
chart.start() | |
} | |
]]> | |
</mx:Script> | |
<mx:String id="payload">Date,A,B,C,D,E,F | |
2010,0.392393592,0.889117787,0.606733262,0.618087136,0.539343016,0.42946709 | |
2011,0.18342627,0.185348672,0.310564025,0.361961342,0.804483124,0.918072596 | |
2012,0.514233329,0.94942851,0.804293604,0.223153373,0.348266719,0.767993513 | |
2013,0.057543207,0.322282597,0.74111328,0.182082091,0.675700716,0.350408528 | |
2014,0.753329534,0.603943961,0.438325433,0.130277326,0.805760385,0.440935743 | |
2015,0.063980432,0.12280081,0.147941761,0.390775635,0.388426282,0.365742853 | |
2016,0.826327607,0.442314305,0.696238507,0.720215763,0.660359593,0.965505144 | |
2017,0.483778086,0.881239781,0.435503738,0.977996758,0.395274523,0.214214789 | |
</mx:String> | |
</mx:Application> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment