Open Flash Chart 2 as a SWC component - source code
Here is the source code for Open Flash Chart 2 as a SWC component.
Download [OFC2library-src] source code by WebASP.
Things i modified from original Open Flash Chart 2 (Jörmungandr-2)
Modified Files:
Loading.as
Tooltip.as
BackGround.as
Keys.as
Title.as
YAxisBase
YAxisLeft
YAxisRight
XLegend.as
YLegendBase
YLegendLeft.as
YLegendRight.as
Menu.as
so what i modified, add new two extra parameter to all classes that using “stageWidth” and “stageHeight”(pWidth:Number,pHeight:Number).
Open Flash Chart 2 used lot of “stageWidth” and “stageHeight” to draw chart. As it only get size of main drawing area (EG: most times we need chart less than the size of the container and we have other elements around). Above modicifation accept width/height values from the parent container and size itself accordingly.
pWidth —- Parent Width
pHeight — Parent Height
New Added File :
Chart.as(as it only work as to generate flex component) : From main.as with some changes. I didn’t add any comments in it, most things are understandable.
Links (for more understanding):
http://forums.openflashchart.com/viewtopic.php?f=5&t=864
http://forums.openflashchart.com/viewtopic.php?f=5&t=473
http://forums.openflashchart.com/viewtopic.php?f=5&t=384
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Hi.
This is really awesome.
I see that the stacked bar doe snot workin this version.
On the OFC site an update was released today
“Fixed bug: stacked bar charts were broken,[...]”
http://teethgrinder.co.uk/open-flash-chart-2/downloads.php
Woould be awesome if you could integrate the changes so that the stacked bar also wworks with the swc.
Thanks alot for the effort so far!
I started integrating the changes. It will be soon out.
Regards
-vtstarin
Thanks alot for the work you do!