1

In my program, I am polling once a second in a dispatcher to receive my current network throughput:

private PerformanceCounter netSndCounter =
    new PerformanceCounter("Network Interface", "Bytes Sent/sec");
private PerformanceCounter netRcvCounter =
    new PerformanceCounter("Network Interface", "Bytes Received/sec");

private void updateTimer(object sender, EventArgs e)
{
    netSndCurrent = netSndCounter.NextValue();
    netRcvCurrent = netRcvCounter.NextValue();
}

This is working well... However, I want to display this somehow as a graph. Similar to the graphs you see in Windows Task Manager in the performance tab. Are there any simple and light-weight tools I can use to do this?

Is there a good way to do this WITHOUT third-party libraries?

Jason Axelrod
  • 7,155
  • 10
  • 50
  • 78

1 Answers1

0

You can use WPF class ChartPlotter to make graph.

See: msdn and Dynamic Line chart in C# WPF Application for some examples

Or if you want some thrid party libraries you can have a look to this post: WPF chart controls

Community
  • 1
  • 1
Ludovic Feltz
  • 11,416
  • 4
  • 47
  • 63