Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flash In Action > Widgets

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-11-2006, 03:44 AM   #1
Assertnfailure
as[org].addListener(this)
 
Assertnfailure's Avatar
 
Join Date: Dec 2005
Location: LA, California
Posts: 838
Default My graph widget

Hey, i made a fun general-purpose graph for a friend of mine, check it out:

http://www.schelterstudios.com/storage/graph2.html
http://www.schelterstudios.com/storage/graph.html

I designed it in such a way where you can style it by passing 3 parameters into its setStyle() method.
1) color of the line
2) bitmapdata object for the top section
3) bitmapdata object for the bottom section

Since it uses bitmapdata objects, you can use anything you want for the graph's appearance, as seen in the two examples I've listed above. It establishes a reference to the bitmapdata you pass in, so you can also alter them and see the effects appear in the graph itself as soon as it redraws itself.

As far as populating the graph goes, all you do is push in single number samples and it plots it at the end of the graph. It scales the data so the average lies across the middle of its y axis, but it scales down even further if outliers exceed the boundaries. You can also set a units string that is appended to the textfield showing the current sample values.

The graph itself is quite ideal for front-end display of server data, as it only updates itself as frequently is data is pushed into it, so the type of load it requires is all dependent on how you build the model to populate it.
Assertnfailure is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Click on Widget, Play sound keith30 HTML and JavaScript 0 02-10-2006 04:55 AM
dynamic graph not showing _y correctly. tg ActionScript 2.0 3 12-29-2005 04:22 PM
plotting a graph flaskvacuum ActionScript 1.0 (and below) 1 07-24-2005 07:29 PM
*DIFFICULT* Multiple movieclips over dynamic graph Col. Ostomy ActionScript 1.0 (and below) 0 04-29-2005 05:15 PM
graph. lwm85 ActionScript 1.0 (and below) 7 02-03-2005 01:08 AM


All times are GMT. The time now is 09:38 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.