I moved the question from the Programming Questions, because you use the Serial library: one cannot run your code without an Arduino or similar.
If the question is only about graph, you should make a standalone sketch not needing this library...
"i get error all the time"
The problem is that we cannot run your code and we are not in front of your computer, so we don't know what error you get...
I haven't seen the video (no time for that), but perhaps you mean "chart" instead of "graph" (more used in the sense of a bunch of nodes connected by lines).
If the question is only about graph, you should make a standalone sketch not needing this library...
"i get error all the time"
The problem is that we cannot run your code and we are not in front of your computer, so we don't know what error you get...
I haven't seen the video (no time for that), but perhaps you mean "chart" instead of "graph" (more used in the sense of a bunch of nodes connected by lines).