Important: Please read the Qt Code of Conduct -

Adding points to Charts dynamically will eat up all memory?

  • Hi all,

    I am adding points to the spline chart using the append method like this:

    series1.append(xindex, message);

    I also update the x-axis accordingly so the spline chart "scrolls" from right to left:

    if(xindex > axisX.max){

    My question: by keep appending points to the spline graph I would assume you run out of memory at some time?
    I can remove the first point when I hit the max on the X-axis but still my xindex counter would go up indefinitely:

    if (xindex > axisX.max) {

    Any thoughts about his? Is there a better way?


  • @Egn1n3
    Have a look at this post:
    It shows how you can implement a "moving" graph.

Log in to reply