ASP 101 - Active Server Pages 101 - Web05
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash




Script Output:

Sensor Summary

N
391 
10	Cleared
13	Routine
6	Serious
32	Critical
7	Cleared
0	Routine
18	Serious
112	Critical
30	Cleared
10	Routine
4	Serious
6	Critical
0	Cleared
13	Routine
14	Serious
11	Critical
40	Cleared
30	Routine
20	Serious
10	Critical
87	Cleared
66	Routine
62	Serious
171	Critical
S1 S2 S3 S4 S5 Total

ASP HTML Download            FAQ

It's rare that I post a sample written by someone else, but occasionally someone beats me to the punch or writes code that's good enough that I feel my re-writing it would just be pointless. So without me rambling on any more...here are Tom's comments:

A true stacked bar chart with colors!

Again using that great original bar chart code with a little modification, we can render a true stacked bar chart. We will use a different color for each stack and each stack will have its own tool tip too ! Just pass an array with your colors, one for each bar. The colors are specified by name, each color name has a corresponding spacer, a gif image file that is dynamically plugged into the IMG tag SRC attribute via our asp code. Make sure to place these files in your /images folder. For expanded tool tip information, pass an array with the additional text. Our example chart display five sensors (columns) with four states of alarm. (stacks). The right-hand column (bar) will represent the totals. The tool tip will first display the quantity followed by a description of what this stack on the bar represents. Note: You can embed the VbTab character to separate tool tip text into columns.

How the code works.

The stacked bars will be generated with HTML Styles. Therefore your browser must support styles for the bar chart to display correctly. For a good overview on positioning HTML elements see: Element Positioning We will use a two (2) dimensional array to hold the actual data for the stacks of each bar. Since a real application will probably be getting its data from a database, I have included example code for this enclosed in comments.

Tom Kwasniewski

I removed the database sample code from the running version. It's available in this zip file along with the multitude of colored spacers Tom included with the script. Thanks Tom!


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES