Click here to Skip to main content
15,878,048 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..I am new to C# programming..i had a set data read from .txt file and the data were already store inside an i would like to draw a simple line graph using microsoft visual c# 2005, but there is no control of chart inside the toolbox for this version when i plan to draw it on u have any idea how to plot a simple line graph using the data from the other class..?thanks in advance..=)
Updated 10-Jul-12 22:20pm

Have a look at ASP.NET and Windows Forms Chart Controls for .NET Framework 3.5 SP1[^].

It's a free download.

MSChart will not work with older versions of .Net, the download does after all specify .net 3.5 so you need to upgrade Visual studio to version 2008. The component is included with Visual Studio 2010.

Best regards
Espen Harlinn
Share this answer
Esmond90 11-Jul-12 4:52am    
yea,i did download and try before but i think the version is not compatible..maybe too old..haha..anyway,thanks a lot!
Sandeep Mewara 13-Jul-12 2:24am    
Good answer. 5!
Espen Harlinn 13-Jul-12 4:11am    
Thank you, Sandeep :-D
Sergey Alexandrovich Kryukov 22-Jul-12 14:45pm    
Agree, my 5.
Espen Harlinn 22-Jul-12 14:48pm    
Thank you, Sergey :-D
Your big problem is using a very old version of the software: VS2005 is 7 years and three versions old. The MS Chart control was (I think) introduced at .NET V3.5, which came in at VS2008.

Have a look here: A flexible charting library for .NET[^]
It includes a version for .NET 1.1 which VS2005 supports, but I would strongly suggest that you need to update your development environment! MS does do free versions of Visual Studio - they are called the Express versions and are available from thier web site directly.
Share this answer
Espen Harlinn 11-Jul-12 4:56am    
You're right, MSChart will not work with older versions of .Net, the download does after all specify .net 3.5
Esmond90 11-Jul-12 4:57am    
ya..i think that is the biggest problem..i try installed the MS chart control but it didn't work..maybe the version is too old..haha..The Zedgraph thing make me even more blur..haha..Thanks for your reply!
I hope below code can help you

SparklineGroup sparklineGroup
= sheet.SparklineGroups.AddGroup(SparklineType.Line);
SparklineCollection sparklines = sparklineGroup.Add();
sparklines.Add(sheet["B2:E2"], sheet["F2"]);
sparklines.Add(sheet["B3:E3"], sheet["F3"]);
sparklines.Add(sheet["B4:E4"], sheet["F4"]);
sparklines.Add(sheet["B5:E5"], sheet["F5"]);

if you still not clear about it,please visit the whole article[^]
Share this answer
Esmond90 11-Jul-12 5:59am    
Hmm..I'm not really clear about it but thanks!=)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900