Degrafa Pie Chart
A friend of mine asked if it was possible to create a pie chart component using Degrafa instead of using the Flex pie chart component. Before this I had only looked at a few Degrafa samples but had never actually tried to create anything using their classes. I hummed and hawed and wondered how I would come up with something useful that looked good and functioned properly.
After a few hours of tinkering around and getting the basics of Degrafa down I came up with a rough first pass at a pie chart. A few more hours of how to build in the right functionality for handling different sized data sets and interpolating the data when the data sets changed and I came up with my first version (follow this link to see the source code) of a functional pie chart. For a first pass I'm pretty happy with how it turned out. There is still obviously a lot to add in, like labels and event handling, but the basics are there. Overall the learning process was not to painful.
The Degrafa docs are little lacking in places, especially when it comes to creating objects that can fire events (ie click, mouse over). Thankfully they have a ton of good samples and by picking apart some of the source code I was able to figure out some things the documentation did not really cover.
Click here to get to the source code.
Now that I have the basic of a decent chart component in place I will hopefully find some time to build in some additional features and also create some additional charting components like a bar and line graph. Stay tuned for more details.
Apr 15, 2008 at 12:50 PM
Derrick,
Slick !! Is all I can say. This is a great example. The doc's will improve with time we are still only at beta 2. I look forward to seeing the other work your doing in this area.
Great work keep it up!
-jason
Apr 15, 2008 at 2:43 PM
Derrick,
I second Jason's comment. Fantastic job. Very simple and clean (visually AND the code itself.) Quite a refreshing change from the Flex Charts themselves.
- Tom
Apr 15, 2008 at 4:06 PM
Nice work!
Apr 16, 2008 at 7:32 AM
Derek,
It seems like the view source link is broken on the swf. Would you please have a look?
DW
May 20, 2008 at 6:19 AM
Wow, I had the same problem lately and I must admit that your solution works great, thak you so much for the good jog you've made! :)
Jun 14, 2008 at 8:29 AM
Very nice and neat work. I've always advocated solutions that are both simple and effiective and your code meets both these requirements :)
Jun 20, 2008 at 8:43 AM
Looks very clean. Professional work :)