Scroll the axis when program first run
-
I have written this code for scroll my chart.
But there is something wrong, when i run my app, it starts with scroll the axis x.
How can i solve this issue?seri[i]->append(q_x, number); q_x ++; if(q_x > 60) { for(int i=0; i<160; i++) axisX->setRange(q_x-60, q_x+1); } if ((q_x % 1000) == 0) { for (int i=0;i<160; i++) seri[i]->removePoints(0,seri[i]->count()); for (int i=0;i<4; i++) axisX->setRange(0, 60); say=0; } -
I have written this code for scroll my chart.
But there is something wrong, when i run my app, it starts with scroll the axis x.
How can i solve this issue?seri[i]->append(q_x, number); q_x ++; if(q_x > 60) { for(int i=0; i<160; i++) axisX->setRange(q_x-60, q_x+1); } if ((q_x % 1000) == 0) { for (int i=0;i<160; i++) seri[i]->removePoints(0,seri[i]->count()); for (int i=0;i<4; i++) axisX->setRange(0, 60); say=0; }@firsnur96
I have no idea, but why would you repeatedly setaxisX's range to a constant value in any loops?? I don't know what you're trying to do, but how can that be the right thing to do? Purely at a guess, I don't think you are really wanting to do this on a constantaxisXvariable, or there is no point in having any loop?