I would like to draw a graph (on a PictureBox) using Graphics in VB.net
The input values are added over some time which need to be presented as graph.
But the problem I am facing is, I need to draw the entire graph from scratch every time a new point is defined. I know, this requires persisting the existing image. But that only allows redrawing the graphics, but not to make incremental changes (on the image) over time.
Jump to Post
I'm not very sure if a PictureBox is best, depending perhaps a Panel control would do. I also think that the graph's background (axis, axis divisions, text and so on) may persist in a bitmap and employ a Graphics instance
gr = Graphics.FromImage(bmp)to draw the rest.
All 6 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.