Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hello,
I was wondering if there is a nice and easy way to create a graph that will display the data of a given graph the way is shown below:

http://img641.imageshack.us/i/40275046.png/

Thanks.
Posted
Updated 6-Mar-11 6:15am
v2
Comments
Sergey Alexandrovich Kryukov 6-Mar-11 12:36pm    
Yes of course, but first you need a nice an easy way to create a such graph as a data structure.
What have you done so far?
Please understand that nobody is probably interested in doing your work for you.
--SA
(you href to picture is wrong)
DaveSpikes 6-Mar-11 12:40pm    
Hello,

I have all the points for my graph as shown below:

graph[0, 0] = 0;
graph[0, 1] = 15;
graph[0, 2] = 25;
graph[0, 3] = 12;
graph[1, 1] = 0;
graph[1, 2] = 21;
graph[1, 3] = 11;
graph[2, 2] = 0;
graph[2, 3] = 3;
graph[3, 3] = 0;
Link is:
http://img641.imageshack.us/i/40275046.png/

You could read this articles

http://www.codeproject.com/KB/miscctrl/GraphPlotting.aspxA simple C# library for graph plotting[^]

A flexible charting library for .NET[^]



[Updated]

http://www.c-sharpcorner.com/UploadFile/steve_hall/drawinglinechart02072007053420AM/drawinglinechart.aspx[^]
 
Share this answer
 
v2
Comments
DaveSpikes 6-Mar-11 13:50pm    
No, this is not what i am looking for.
I want to create a graph that will be made up with my points. For example, Point 0, Point 1, Point 2 and their connections.
Thanks for your reply.
luisnike19 6-Mar-11 14:08pm    
Check the new link
Olivier Levrey 7-Mar-11 8:12am    
My 5. ZedGraph is definitely a good plotter.
Dalek Dave 7-Mar-11 10:55am    
Good Answer.
Luisnike already gave you a nice link to ZedGraph. You can plot any 2D curves with it.

But if you want to do it by yourself, then you should do your drawings in the Paint event handler of your form.
Have a look to Graphics class: as far as I undersand from your image, you just want to connect lines. Then you will probably just need DrawLine method.
 
Share this answer
 

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