[demo]: http://www.quietlyscheming.com/blog/charts/chart-sampler/
I’ve got a backlog of Flex 2 samples I’ve been tinkering with over the past few months that I haven’t really had the time to polish up enough to post here. But I’m going to be taking a long overdue vacation soon, and I don’t know when I’ll get a chance to really finish them. So rather than let them quietly rot in the corner, I’m going to just put them up in their current state and slap a big old Caveat Emptor sign on them. So please don’t judge me too harshly based on the quality of the code…

First up is a little chart Sampler pack that I put together a while back. [Take a look here.][demo]

As a followup to my previous post showing how to write a custom renderer that used the underlying chart data, I thought I’d post a slightly more complicated example of how to extend the built in Charting Series types to add more advanced functionality. So go take a look at the Variable Radius Pie Series, then come back here and let me know what you think.

[page]: http://www.quietlyscheming.com/blog/charts/data-based-renderers/

There’s been a discussion going on FlexCoders today about extending charts, how easy/hard it might be, and how to make a PieChart that renders the wedges in a different color based on the value of the wedge.

Rather than spend a lot more time arguing about it and justifying the tradeoffs of more features vs. more extensibility in the Flex Charts, I thought maybe I’d just shut up and write it myself ;)

[Check out the example here][page], then come back and leave feedback and comments.

[page]:http://www.quietlyscheming.com/blog/charts/dashed-lines/

I get requests for dashed and dotted lines in the flex charts probably about once a week. Writing a dashed line routine is a little tricker than it sounds at first, if you want to make sure the dashes render correctly at arbitrary angles and across multiple segments of a poly-line. So here, for your use and education, is a Utility routine for rendering dashed lines in flash, and a simple LineSeries renderer that makes use of it.

[Dashed Line example and source][page]

Custom Chart Annotations

April 3rd, 2006

I’ve been fielding a lot of questions about extending charts in Flex 2 as more and more people are downloading and getting excited about the new Flex beta. Developers who want to build custom charting rendering and behavior have a couple of options in Flex 2. In order of complexity, they can:

1. use the charting APIs to listen to mouse events to trigger custom behavior.
2. built a custom renderer to change the way a pre-built series types displays its data
3. built a custom element to add new data overlays or interactive behavior to the chart.
4. extend the pre-built series types to add to or modify its interaction, data, and display.

You might be surprised that I listed building a custom element as easier than extending the pre-built series that ship with the charting package. But writing a one-off component intended for a specific use is a a lot simpler than building a reusable component that many different developers will use and abuse in many different applications. Writing your own custom element, however, can actually be a pretty straightforward thing to do.

So in the spirit of making my point, I thought it was maybe time to post a sample of a custom annotation element that I had lying around. This annotation element allows the user to Read the rest of this entry »