Here is an example of creating simple charts using GDI+ commands in C#. I have used the random class to create 5 random percentage values. I then use GDI+ to plot these values on a chart.I have used a timer control that creates an event once every second. My code for this event is simply the Invalidate command. This forces the form to be refreshed.
My main code is in the OnPaint method. This code is responsible for creating the chart each time the timer event fires. The code is pretty self explanatory. Any problems feel free to email me.
Here is a screenshot of the application and after that, the source code to the OnPaint method.
protected
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: