<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>david mccuskey.com &#187; Flex</title>
	<atom:link href="http://davidmccuskey.com/category/programming/flex-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidmccuskey.com</link>
	<description>my slice of the Internet</description>
	<lastBuildDate>Thu, 22 Jul 2010 16:58:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>LightCharts – Lightweight charts for Flex</title>
		<link>http://davidmccuskey.com/2010/07/lightcharts-lightweight-charts-for-flex/</link>
		<comments>http://davidmccuskey.com/2010/07/lightcharts-lightweight-charts-for-flex/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 16:47:58 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://davidmccuskey.com/?p=652</guid>
		<description><![CDATA[LightCharts A lightweight line-chart library for Flex. Background I created LightCharts for a project of mine that involves tracking many stock market symbols. Originally I was using the Adobe Flex Charting library, but found that performance suffered greatly given the number of charts I was using (around 60+), the amount of data displayed, and the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin-left:auto;margin-right:auto" src="http://davidmccuskey.com/wp-content/uploads/2010/07/lightcharts-single-screenshot.png" alt="lightcharts-single-screenshot.png" border="0" width="440" height="135" /></p>


<h3>LightCharts</h3>

<p>A lightweight line-chart library for Flex.</p>

<h3>Background</h3>

<p>I created LightCharts for a project of mine that involves tracking many stock market symbols. Originally I was using the Adobe Flex Charting library, but found that performance suffered greatly given the number of charts I was using (around 60+), the amount of data displayed, and the constant real-time updates. Of course this isn&#8217;t necessarily due to poor coding on Adobe&#8217;s part, it&#8217;s just that their library contains an amazing amount of features to handle a variety of needs, consequently it&#8217;s very heavy. I didn&#8217;t need a lot of features, just a nimble way to display data.</p>

<p>I searched the Internet for other charting libraries which I could use and stumbled across a fantastic set of components created by Keith Peters called <a href="http://www.minimalcomps.com/">Minimal Comps</a>. Keith&#8217;s library is extremely lightweight and it would have been a good fit, but MinimalComps is geared towards the pure Flash environment and not Flex &#8211; a major issue being the disparity in the component lifecycle.</p>

<p>Nonetheless, I was inspired by his code so I decided to use it as a starting point, adding and changing what I needed along the way.</p>

<h3>Features</h3>

<p>The result is a charting library that has many new features and several new object classes, some for visual enhancements and others for displaying and interacting with data. For instance, the data series class gives the ability to display multiple lines on a graph. The Toolset architecture is useful for creating mini plug-ins which can annotate or interact with data, all without needing to change any of the charting base classes.</p>

<p>Also, the line-chart class can be subclassed to create new line-chart types which have different visual characteristics or behavior. Included are a couple of examples for charts which I used in my project &#8211; these include the <span class="caps">MACD </span>and Stochastic. <em>Note: These examples show how to make visual and behavioral changes to the base class, not how to calculate the values for the <span class="caps">MACD </span>or Stochastic charts. Those formulas can be easily found online.</em></p>

<h3>Screenshot</h3>

<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://davidmccuskey.com/wp-content/uploads/2010/07/lightcharts-screenshot.png" alt="lightcharts-screenshot.png" border="0" width="440" height="371" /> </p>

<p>In the screenshot above you can see many of the features:</p>


<ul>
<li>Three different charts (standard, <span class="caps">MACD, </span>and Stochastic), displaying different backgrounds including gradients and alphas, line colors, value ranges, etc.</li>
<li>On the first chart, the display of crosshairs and coordinate value on mouseover; all charts have this functionality.</li>
<li>On the first and second charts, a custom plug-in called <em>DotDisplayTool</em> which displays a dot over the last data point in the series. <em>DotDisplayTool</em> is an example of a non-interactive plug-in.</li>
<li>On the second and third charts, a custom plug-in called <em>LinearDrawTool</em> which allows you to draw on top of the data; it displays a line and the chart values which correspond to the beginning and ending points. <em>LinearDrawTool</em> is an example of an interactive plug-in.</li>
</ul>



<h3>Live Demo &amp; Source</h3>

<p>If you want to see the library in action, click on the following link: <a href="http://davidmccuskey.com/demos/lightcharts/" target="_lightcharts_demo"> LightCharts live demo</a>.</p>

<p>The source is covered under the <span class="caps">MIT </span>license and it&#8217;s currently available from the live demo &#8220;View Source&#8230;&#8221;.</p>]]></content:encoded>
			<wfw:commentRss>http://davidmccuskey.com/2010/07/lightcharts-lightweight-charts-for-flex/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>KryptoPhoto Photo Viewer is Released</title>
		<link>http://davidmccuskey.com/2009/08/kryptophoto-photo-viewer-is-released/</link>
		<comments>http://davidmccuskey.com/2009/08/kryptophoto-photo-viewer-is-released/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 18:38:44 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[KryptoPhoto release]]></category>

		<guid isPermaLink="false">http://www.mccuskey.com/?p=572</guid>
		<description><![CDATA[I have released my new photo viewer, so now I can once again show my photography on this site. It currently supports the API at SmugMug.com, but I have plans for compatibility with other photo-sharing sites. I built it using the Adobe Flex framework. You can get more information about KryptoPhoto at MentalHijack.com.]]></description>
			<content:encoded><![CDATA[<p>I have released my new photo viewer, so now I can once again show <a href="/photography/">my photography</a> on this site. It currently supports the <span class="caps">API </span>at SmugMug.com, but I have plans for compatibility with other photo-sharing sites.</p>

<p>I built it using the Adobe Flex framework. You can <a href="http://www.mentalhijack.com/software/kryptophoto/">get more information about KryptoPhoto at MentalHijack.com.</a></p>]]></content:encoded>
			<wfw:commentRss>http://davidmccuskey.com/2009/08/kryptophoto-photo-viewer-is-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to do custom chart annotations in Flex</title>
		<link>http://davidmccuskey.com/2009/03/how-to-do-custom-chart-annotations-in-flex/</link>
		<comments>http://davidmccuskey.com/2009/03/how-to-do-custom-chart-annotations-in-flex/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 18:16:14 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[annotationElements]]></category>
		<category><![CDATA[backgroundElements]]></category>

		<guid isPermaLink="false">http://www.davidmccuskey.com/?p=150</guid>
		<description><![CDATA[Hunting around the &#8216;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. If you&#8217;re interested, you can view it on his website: chart annotation demo. Unfortunately, the code you can download from his site is a [...]]]></description>
			<content:encoded><![CDATA[<p>Hunting around the &#8216;Net, I found a few good examples of creating chart annotations in Flex.</p>

<p>One example app which helped me greatly was from a <a href="http://www.quietlyscheming.com/blog/2006/04/03/custom-chart-annotations/">blog posting by Ely Greenfield</a>. If you&#8217;re interested, you can view it on his website: <a href="http://demo.quietlyscheming.com/overlayDemo/index.html">chart annotation demo</a>.</p>

<p>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: <a href="http://davidmccuskey.com/wp-content/uploads/2010/07/OverlayDemo-fixed.zip" title="OverlayDemo-fixed.zip">download OverlayDemo-fixed.zip</a>.</p>

<p>Ely has other interesting demos on his site which are worth checking out. Some of my favorites are: the <a href="http://www.quietlyscheming.com/blog/charts/variable-radius-pie-chart/">variable radius pie chart demo</a>, the <a href="http://www.quietlyscheming.com/blog/charts/variable-radius-pie-chart/">interactive bubble chart demo</a>, and the <a href="http://www.quietlyscheming.com/blog/charts/dashed-lines/">dashed lines demo</a>.</p>

<h3>Resources</h3>

<p><em>annotation example by Ely Greenfield</em></p>


<ul>
<li><a href="http://www.quietlyscheming.com/blog/2006/04/03/custom-chart-annotations/">http://www.quietlyscheming.com/blog/2006/04/03/custom-chart-annotations/</a></li>
<li>demo: <a href="http://demo.quietlyscheming.com/overlayDemo/index.html">http://demo.quietlyscheming.com/overlayDemo/index.html</a></li>
</ul>



<p><em>annotation example by Brendan Meutzner</em></p>


<ul>
<li><a href="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</a></li>
<li>demo: <a href="http://www.stretchmedia.ca/code_examples/chart_milestone/main.html">http://www.stretchmedia.ca/code_examples/chart_milestone/main.html</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://davidmccuskey.com/2009/03/how-to-do-custom-chart-annotations-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying to do MVC in pure Flex</title>
		<link>http://davidmccuskey.com/2009/02/trying-to-do-mvc-in-pure-flex/</link>
		<comments>http://davidmccuskey.com/2009/02/trying-to-do-mvc-in-pure-flex/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 06:37:32 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://blog.davidmccuskey.com/?p=108</guid>
		<description><![CDATA[I was looking for some examples of how to structure a Flex application using MVC, but using only the Flex framework. In the long run I think I&#8217;ll be using PureMVC, but right now I am anxious to get my app working and don&#8217;t want to have to learn Yet Another Technology just to get [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for some examples of how to structure a Flex application using <span class="caps">MVC, </span>but using only the Flex framework. In the long run I think I&#8217;ll be using PureMVC, but right now I am anxious to get my app working and don&#8217;t want to have to learn <em>Yet Another Technology</em> just to get there. Besides, shouldn&#8217;t Flex be able to stand on its own?</p>

<p>I found what I was looking for in the article <a href="http://www.adobe.com/devnet/flex/articles/blueprint.html"><em>&#8220;An architectural blueprint for Flex applications&#8221;</em></a> written by Joe Berkovitz. In it he talks about a way in which he architects Flex applications using pure Flex/Actionscript constructs.</p>

<p>Being a Flex newbie, I learned a lot from his article like how to pass variables to your own <span class="caps">MXML </span>tags and even customize them using Actionscript. His architecture also solves an issue I was having with Event messaging/bubbling due to the fact that it only works automatically on DisplayObject components. His design also has an interesting way of handling multiple data-services as well as the operations required for handling service communication.</p>

<p>Source code for the project is available in the article. I would recommended downloading it and browsing through the files.</p>

<p><strong>Resources:</strong></p>


<ul>
<li>&#8220;<em>An architectural blueprint for Flex applications</em>&#8221; written by Joe Berkovitz, <a href="http://www.adobe.com/devnet/flex/articles/blueprint.html">http://www.adobe.com/devnet/flex/articles/blueprint.html</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://davidmccuskey.com/2009/02/trying-to-do-mvc-in-pure-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

