954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Creating Bar Graphs for Windows Forms

Okay so right now I am working on a program that gathers data and then displays it. For instance how many items exist and how much of them exist and what is their rank.

Well I want to display these count of how much each rank exists with a bar graph in C#, but have no clue how.

Ange1ofD4rkness
Junior Poster
123 posts since May 2010
Reputation Points: 10
Solved Threads: 3
 

For charting I use Microsoft's MSDN's "Samples Environment for Microsoft Chart Controls"
Samples Environment for .NET Framework 4 Chart Controls Released!
You can now download Visual Studio 2010 projects that contain all the samples targeting .NET Framework 4.

Download Description
The samples environment for Microsoft Chart Controls for .NET Framework contains over 200 samples for both ASP.NET and Windows Forms. The samples cover every major feature in Chart Controls for .NET Framework. They enable you to see the Chart controls in action as well as use the code as templates for your own web and windows applications. http://archive.msdn.microsoft.com/mschart
Go to Downloads:
http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418
And Download: "Windows Forms Samples"

Note: The above is for .NET Framework 4.0, there are files for other versions of .NET i think.

Alternatively you can look for third party tools and libraries, if you do a simple Google search you can find many, here's one:
http://www.softwarefx.com/sfxnetproducts/cfxlitefornet/

---
When I started in programming and before I knew these I used to make my own charts using existing windows forms controls like buttons, panels and picture boxes and changing their Size properties based on the data, but in my opinion it's better to use third party tools or the samples from Microsoft as making your own takes time.

codes4f0x0d
Newbie Poster
7 posts since Jul 2011
Reputation Points: 13
Solved Threads: 5
 

I once posted this snippet: http://www.daniweb.com/software-development/csharp/code/238532
It cannot be that hard to turn that into a forms app.

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

Can use zedgraph I found that nice and easy to work with

Singlem
Light Poster
49 posts since Feb 2010
Reputation Points: 10
Solved Threads: 8
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You