Click here to Skip to main content
15,886,362 members
Articles / Programming Languages / C#
Article

Plotter Control (a-la Task Manager Performance History Graphs)

Rate me:
Please Sign up or sign in to vote.
3.05/5 (9 votes)
2 Jan 20071 min read 35.7K   1.3K   22   4
Plotter Control with Scrolling (.NET 2.0)

Introduction

I made this control as a favor to my friend who is an electrical engineer.  He needed a Task Manager style control to display a sampled signal coming from a device that he was making.  I did a quick search on codeproject, and the closest thing I could find was Anup. V.’s Plotter control but it lacked the scrolling capability.  So I finally had to get my hands dirty and made this plotter control.  Now I’m posting it here guessing that there might be other electrical engineers out there who are in a desperate need of such a control.

 

Demo Project

 

Sample Image - plotter.jpg

 

Tip: Use the vertical track bar to change the current value.

 

Using the Plotter Control

  • Set the Min & Max properties.

  • Set the BackColor & ForeColor properties to adjust the colors to your liking.

  • Use the Add method to add new values periodically (e.g. from a timer event handler).

 

Changes History

01/03/2006

Fixed a bug when the graph was drawn incorrectly when the control was put on a form with AutoScaleMode different than None and the system font size was different from the size the application was built with.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Questionoscilloscope runtime graph Pin
Member 1286844214-Dec-16 20:18
Member 1286844214-Dec-16 20:18 
Questionreset [modified] Pin
ChaosPerformance28-Jan-09 9:39
ChaosPerformance28-Jan-09 9:39 
Generalmultiple values and Ticks Pin
ThPloeger22-Jan-07 2:54
ThPloeger22-Jan-07 2:54 
GeneralRe: multiple values and Ticks Pin
Serge Slepov22-Jan-07 6:14
Serge Slepov22-Jan-07 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.