Hunting around the ‘Net, I found a few good examples of creating chart annotations in Flex.
One example app which helped me greatly was from a “blog posting by Ely Greenfield”:http://www.quietlyscheming.com/blog/2006/04/03/custom-chart-annotations/. If you’re interested, you can view it on his website: “chart annotation demo”:http://demo.quietlyscheming.com/overlayDemo/index.html.
Unfortunately, the code you can download from his site is a little old so it has problems compiling in Flex Builder 2+. I have updated the code, fixed some bugs in it and have it available here: download OverlayDemo-fixed.zip.
Ely has other interesting demos on his site which are worth checking out. Some of my favorites are: the “variable radius pie chart demo”:http://www.quietlyscheming.com/blog/charts/variable-radius-pie-chart/, the “interactive bubble chart demo”:http://www.quietlyscheming.com/blog/charts/variable-radius-pie-chart/, and the “dashed lines demo”:http://www.quietlyscheming.com/blog/charts/dashed-lines/.
h3. Resources
annotation example by Ely Greenfield
- “http://www.quietlyscheming.com/blog/2006/04/03/custom-chart-annotations/”:http://www.quietlyscheming.com/blog/2006/04/03/custom-chart-annotations/
- demo: “http://demo.quietlyscheming.com/overlayDemo/index.html”:http://demo.quietlyscheming.com/overlayDemo/index.html
annotation example by Brendan Meutzner
- “http://www.stretchmedia.ca/blog/index.cfm/2007/3/28/Chart-Milestones-using-annotationElements”:http://www.stretchmedia.ca/blog/index.cfm/2007/3/28/Chart-Milestones-using-annotationElements
- demo: “http://www.stretchmedia.ca/code_examples/chart_milestone/main.html”:http://www.stretchmedia.ca/code_examples/chart_milestone/main.html