Dashed Lines

May 30th, 2006

[comments]: http://www.quietlyscheming.com/blog/2006/05/30/32/
[demo]: http://demo.quietlyscheming.com/dashes/index.html
[src]: http://demo.quietlyscheming.com/dashes/srcview/index.html
[zip]: http://demo.quietlyscheming.com/dashes/srcview/Dashes.zip

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.

The source, as always, is available under the MIT open source license, so you can do whatever zany thing you crazy kids want with it.

### * [Dashed line sample][demo]
### * [view source][src]
### * [download source][zip]

Feedback or thoughts on the controls are much appreciated. [Leave comments, suggestions, criticisms here.][comments]

3 Responses to “Dashed Lines”

  1. Quietly Scheming » Blog Archive » Says:

    [...] Dashed Line example and source [...]

  2. Flex Chart - High-Low and Dashed lines » Tiago Luchini Says:

    [...] The default LineRenderer implementation delegates its drawing intelligence to an utilities class called mx.charts.chartClasses.GraphicUtilities. Before trying to decode its internal mathematics, I googled a little and found Ely Greenfield’s implementation of a very similar GraphicUtilities with dashing lines support which I adapted into class DashedGraphicUtilities. [...]

  3. Bar Chart Overlay in Flex 3 - Adobe Dreamweaver Forums Says:

    [...] accidentally exceed these bounds (this is easy to do when converting back and forth from Dates). Here is a link to a tutorial on dashed [...]

Leave a Reply