QCustomPlot Discussion and Comments

addData not workingReturn to overview

Hello, i'm a C beginner and struggling on my code.I took a lot of code out of examples,I want to show data out of a struct in a graph.I have access to the values for example by "data->engine_rpm"
I can make this visible in a textfield or lcd so i have access to it. How do i assign the data to my graph?
I tryed : graph(0)->addData(key,data->engine_rpm) as well as
double x=data->engine_rpm;
graph(0)->addData(key,x);
The programm itself will be compiled with no errors but my graphs stay empty.If I assign a value directly to x (x=10),i get the graph.
Help is appreciated.

Hello
its solved,found solution myself.I had declared double x in .h file as well as in the cpp.Declared double only in h file now it works!