Categories
Code Sample Flex Programming Technology

LightCharts – Lightweight charts for Flex

lightcharts-single-screenshot.png

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 constant real-time updates. Of course this isn’t necessarily due to poor coding on Adobe’s part, it’s just that their library contains an amazing amount of features to handle a variety of needs, consequently it’s very heavy. I didn’t need a lot of features, just a nimble way to display data.

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 Minimal Comps. Keith’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 – a major issue being the disparity in the component lifecycle.

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.

Categories
Flex Photography

KryptoPhoto Photo Viewer is Released

I have released my new photo viewer, so now I can once again show “my photography”:/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.”:http://www.mentalhijack.com/software/kryptophoto/

Categories
Code Sample Flex How-To Programming

How to do custom chart annotations in Flex

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
Categories
Flex Programming

Trying to do MVC in pure Flex

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’ll be using PureMVC, but right now I am anxious to get my app working and don’t want to have to learn Yet Another Technology just to get there. Besides, shouldn’t Flex be able to stand on its own?

I found what I was looking for in the article _”An architectural blueprint for Flex applications”_ written by Joe Berkovitz. In it he talks about a way in which he architects Flex applications using pure Flex/Actionscript constructs.

Being a Flex newbie, I learned a lot from his article like how to pass variables to your own MXML 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.

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

Resources: