Click here to Skip to main content
14,836,361 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am working on a project in which i want to plot the data coming from serial port continuously [data more than 4 hrs]. I can draw the line graph. But I want to see the plot from start to end by scrolling. Please give me a solution.

I had a similar requirement, my solution was to use graphicspath ... I add the points to a graphics path scaled 1:1 then when drawing to the screen I use the matrix functions to scale the traces for display and the clip region to only show the part I want on screen. Works a treat and really fast.

Objects to use ( assumes g is the current graphics object)


g.Clip = on screen display area as a clip region:

GraphicsPath gx = new GraphicsPath();

Add line, paths, rectangles etc ......

gx.Transform( to scale and scroll graph)

g.DrawPath( actually draw traces )

I have something similar at work, but with data coming from ethernet.
I believe ZedGraph can help you, take a look:[^]

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