Click here to Skip to main content
6,291,124 members and growing! (17,534 online)
Email Password   helpLost your password?
Web Development » ASP.NET » General     Intermediate License: The Microsoft Public License (Ms-PL)

A simple thermometer chart for ASP.NET

By Joe Lynds

A simple thermometer chart for ASP.NET
VB 8.0, Windows, .NET 2.0, ASP.NET, GDI+, WebForms, VS2005, Dev
Posted:15 May 2007
Views:21,571
Bookmarked:28 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
8 votes for this article.
Popularity: 3.30 Rating: 3.65 out of 5

1
2 votes, 25.0%
2
1 vote, 12.5%
3
2 votes, 25.0%
4
3 votes, 37.5%
5
Thermometer Chart

Introduction

jThermometer is a class for creating thermometer charts of the type used generally to show progress toward a fund raising goal. It arose out of my involvement in a charity walkathon. The organizer wanted to have a thermometer-type chart on a the walkathon's home page to indicate progress toward fund raising goals. I was unable to find anything free that seemed appropriate for the site so I decided to create my own and share it here on Code Project.

The chart uses GDI+ to compose an image and stream it out to the browser.

Using the code

For the purposes of portability, I've separated the chart into two parts.

jThermometer is a class that creates a bitmap using GDI+ and streams it out to the current request as a GIF image.

Thermometer.aspx is a web page that accepts various parameters controlling the appearance of the Thermometer chart and that can be referenced by an <IMG> tag on another web page.

Thermometer.aspx uses these querystring values:

MIN:Value displayed at bottom of thermometer.
MAX:Value displayed at top of thermometer
IV:Value indicated on the thermometer.
T:Title displayed at top of the thermometer
VT:Type of value (1=currency, 2=decimal, 3=integer)

Further work

At present, the thermometer does not scale. I'd like to have it automatically scale based on user-provided dimensions. There are also a lot of appearence-related aspects that should be controlable via properties such as text color, indicator color and the color of the mercury.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

About the Author

Joe Lynds


Member
Joe is a software engineer. He lives in Pennsylvania where he develops software for manufacturing and human services when he is not at the park with his three boys.
Occupation: Web Developer
Location: United States United States

Other popular ASP.NET articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 9 of 9 (Total in Forum: 9) (Refresh)FirstPrevNext
GeneralTYTY PinmemberPeter Scholten11:33 22 Apr '09  
GeneralTHANKS! PinmemberSuriel7011:38 2 Apr '09  
GeneralLooks good, but... PinmemberMikeWardOK5:23 21 Mar '09  
GeneralThanks, Joe! Pinmemberkwame dupre11:45 27 Jan '09  
GeneralMy vote of 2 PinmvpDave Kreskowiak7:37 12 Jan '09  
GeneralThis is great work Pinmemberivanhoe17:24 22 Oct '07  
GeneralNice Job! PinmemberMike Fed9:51 21 Sep '07  
GeneralThanks for the great work PinmemberMohammed BMS2:40 23 Jul '07  
GeneralGood Work Pinmember{demon]21:32 15 May '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 15 May 2007
Editor:
Copyright 2007 by Joe Lynds
Everything else Copyright © CodeProject, 1999-2009
Web20 | Advertise on the Code Project