|
|
Comments and Discussions
|
|
 |

|
manhos DOS pe hi kam kerna tha :@
|
|
|
|
|

|
How to build a graph control using Visual C#.net.If anybody knows plz send the code.
Alex
|
|
|
|

|
i am new C#.net.i want to draw a line graph using Visual C# in .net platform. So plz send me the code. Aju
|
|
|
|

|
i am new C#.net.i want to draw a line graph using Visual C# in .net platform.
So plz send me the code.
|
|
|
|

|
i have a problem here with the maximum number of points. i am currently working on a project that has 4000 x and y points and the problem is when i tried to place all the points in the array list and try to plot it the whole graph collapses, and i only see striped lines on the x and y axis.
My question is does this program can accept points that are greater than 1000? thanks
|
|
|
|

|
HiHarshawardhan,
Thanks for the simple and interactive post on graphs.
I was able to build the project from the sources you have provided but while dragging the graph.dll on another windows form generated following error.
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
Could you please look into the problem?
Thanks
Pradeep
|
|
|
|

|
Hi,
I was trying to use the same method for plotting somewhere about 1000 data points and the graph took over 250MB RAM and 80 CPU cycles.
Could you suggest how I could optimize its performance? The fact that paint gets called on every slight action on / over the form, troubles and causes the issue.
-Ameya
|
|
|
|

|
Hi,
I am trying to implement the same logic using VB.Net code (educational purposes), however I could not understand the implementation of the following part. Is points[0] an array? Is it redimensioned automatically in the for loop?
void DrawLineGraph(Graphics g)
{
Pen p = new Pen(graphColor);
Point start = (Point)Points[0];
FloatPoint prev,current;
prev = FindLocationOnGraph(start);
for(int i=1 ; i < Points.Count ;i++)
{
Point pt = (Point)Points[i];
current = FindLocationOnGraph(pt);
g.DrawLine(p,prev.X,prev.Y,current.X,current.Y);
if(bShowPoints)
{
Brush b = new SolidBrush(textColor);
Font f = new Font(Font.FontFamily,Font.Size);
string title = "(" + pt.X + "," + pt.Y + ")";
if(prev.Y > current.Y)
g.DrawString(title,f,b,current.X - 25,
current.Y - 15);
else
g.DrawString(title,f,b,
current.X - 25, current.Y + 5);
if(i ==1)
{
title = "(" + start.X + "," + start.Y + ")";
g.DrawString(title,f,b,prev.X - 10, prev.Y - 15);
}
f.Dispose();
b.Dispose();
}
prev = current;
}
p.Dispose();
}
By the way, I do not know any C#, I'm trying to make sense out of what I know from learning Visual Basic.
Slyth
|
|
|
|

|
I downloaded the code and I'm trying to get it running to see how it operates. Unfortunately I'm pretty new to the .Net IDE and I can't for the life of me get it into a project.
When I try running the batch files included in the zip I get this error message:
'csc' is not recognized as an internal or external command, operable program or batch file.
I guess I'm a .Net moron, but please show me mercy.
-Allan
|
|
|
|

|
Hello Harsh:
Very nice work.
When I reduce the dialog size, a portion of the graph control gets cut. Is there a way I can enable scrolling for the control (only for the control not the dialog box) or can you recommend any other control in codeproject which does scrolling.
Thanks
Senthu
|
|
|
|

|
Nice article. I just skimmed it quickly and downloaded the project and played with the control. Very nicely done. I look forward to examining it in more detail this weekend.
Mike
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
This article shows you how to build a simple user control by creating a graph control in 7 easy steps.
| Type | Article |
| Licence | |
| First Posted | 12 Mar 2003 |
| Views | 109,979 |
| Bookmarked | 75 times |
|
|