I spent a hell of a lot of time turning that AS3 Pie Chart into a proper component. Adding a lot of behind the scenes functionality. Making it Flex compatible. Making sure it was 100% code based. As well as writing up a bunch of documentation.
What I was left with was a Flash Pie Chart which looks almost exactly like the one I did in September except this one has a lot of useful functionality for developers and is much more CPU efficient.
I’ve been selling the Pie Chart component on Activeden (formerly Flashden) and folks seem happy: a 5 star rating and lots of positive feedback!
Anyway if you’re in the market for an AS3 based Pie Chart you can get an awesome one written by me. It’s only $10.
Also, I’m sorry I haven’t posted in such a long time. I recently bought my first condo and haven’t had time to work on side projects! Things are starting to settle down now, and I’m already thinking of a new swarm based project.
I’ve trudged my way through the first 3 parts and… GREAT SUCCESS! I’ve got my Pie Chart publishing from a component inspector window (shown on the left).
The bit of code that caused me the most grief is the section that pertains to the dataProvider. It seems that if I want custom parameters in my Component Inspector I need to create my own DataProvider classes.
[Collection(collectionClass="ca.organa.Data.Collect", collectionItem="ca.organa.Data.ComponentInfo", identifier="sliceLabel", name="Pie Chart Data")]
public function set dataProvider(value:Collection):void {
if (_dataProvider != null) {
_dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange);
}
_dataProvider = value;
_dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);
invalidate();
}
I’ll post about components again once I’ve gone further into this stuff. My next challenges are going to be getting live preview working, and getting a proper colour picker in the component inspector (is that even possible?). Read the rest of this entry »
First an FYI, this is a showing off post. I’m not sharing the source for this as I’d like to explore the idea of selling the Pie Chart as a Flash Component.
Recently at work I’ve been doing on a bunch of charts (mostly analytics style lines graphs). When I was finished, I thought to myself: “Well I haven’t done a Pie Chart yet”.
Ultimately, it took me 5 times longer than I would have ever expected, but I did create a fully functional 3D Pie Chart!
This is a true 3D Pie Chart with rotation.
This is done completely with Flash’s draw API, I don’t make use of Flash10 3D features or Papervision
The Pie chart is resizable and all the data/colours are externally configuarable. You can even change the view angle.
First of all, I made it to ten posts! W00, I really wasn’t sure if I’d make it this far.
Recently at work, I had to write an AS3 image viewer with zoom and pan capabilities. It was a lot harder than I had anticipated. I decided to write another (much better) version for the blog. I’m hoping that by releasing this code I’m saving a couple people a lot of grief.
You can zoom in/out with the buttons in the bottom right corner, or by using your mouse wheel (Mouse wheel might not work on a Mac! Let me know if it’s an issue or if you have a solution).
After the break you can see the application in action.
I’ll also try to explain some of the ActionScript parts I found interesting.