Jump to content

How to make a line graph like the one in Task Manager?

GoodBytes

Hello,

I am having a hard time finding the answer for what I am looking for.

I am trying to do a line graph that gets live data and draws at it goes, then scrolls basically like the task manager CPU (or network or memory or disk) graph.

graph.png

I don't know if such line graph has a specific name, but I am looking for the design concept of how to make it.

Any ideas ho to make it? (any language)

Link to comment
Share on other sites

Link to post
Share on other sites

Well, that one is using the per-core graphs and then taking the average and plotting that with the X axis as usage and Y as time. 
You can right click the graph and then Choose " Change graph to > Logical processors " so you can see each one.

I don't know how you would code this. But the average would be something to start at. (Your i7 is going to show the threads though)

5800X3D - RTX 4070 - 2K @ 165Hz

 

Link to comment
Share on other sites

Link to post
Share on other sites

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

Well, that one is using the per-core graphs and then taking the average and plotting that with the X axis as usage and Y as time. 

You can right click the graph and then Choose " Change graph to > Logical processors " so you can see each one.

I don't know how you would code this. But the average would be something to start at. (Your i7 is going to show the threads though)

No no, I am looking at how to get CPU work load. I have the data. The idea how to draw the graph and have it continuously update and move forward is what I am asking for. Another example of graph is in MSI Afterburner, or some torrent software has ones showing upload and download speed.
Link to comment
Share on other sites

Link to post
Share on other sites

Yes. But how do I erase old data and put new data as it plots with new data?

have a list or vector or some construct that stores the values

when a new piece of data gets added (a new y point on the graph) it will be added to the end of the list (the right side of the graph) and you just delete the first item of the list

then refresh the screen with the new list of points plotted from left to right

this should make the entire graph move left each time it updates, and delete the oldest data point from the left

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×