-
Get a monthly update on best practices for delivering successful software.
This example covers how to build a simple 360 degrees gauge Flex component. It has public properties that allow you to easily adjust the appearance of the component for colors, size, font size, guideline thickness and such. It also fires a custom "angleChanged" event that helps you integrate it with the rest of your app.
There's a little trigonometry involved, but it's straight forward. This component can be used as a base for further extending into your "complex" gauge component.
It's contained in a single "MXML Component" file so it's easy to deal with.
One thing to keep in mind when using it is to make sure that width an height of the component are the same, otherwise the layout blows up.
You can see the example here.
You can see/download the source here or by right-clicking on the example and selecting "View Source".
Related posts:
Topics: Flex, Gauge Component
The libs folder doesn’t have anything so not able to test it
Comment by Philip, Wednesday, September 24, 2008 @ 6:24 am
Exactly what I was looking for.
Thanks for making it available.
Comment by Kamran, Friday, May 1, 2009 @ 9:55 pm