Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How could I optimize a scrolling (not scrollable) QtQuick Chart?

How could I optimize a scrolling (not scrollable) QtQuick Chart?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
chartsqtquickoptimization
2 Posts 2 Posters 444 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tague
    wrote on last edited by tague
    #1

    I need to optimize a line graph to which data is constantly being appended, with the expectation that old data is discarded and the graph as a whole 'shifts' onward in a constant feed. Dozens of new points are added per second.

    I currently accomplish this by updating the min and max properties of the x Axis within the onPointAdded function. However, this slows down my application as it redraws the entire graph.

    Is there some way to optimize this, for example such that the chart properly shifts the previously drawn image to the side in-GPU and draws only new points? Or, if that is not possible, is there some way to take advantage of Qt Chart drawing code while using custom rendering logic to achieve this optimization manually with OpenGL?

    B 1 Reply Last reply
    0
    • T tague

      I need to optimize a line graph to which data is constantly being appended, with the expectation that old data is discarded and the graph as a whole 'shifts' onward in a constant feed. Dozens of new points are added per second.

      I currently accomplish this by updating the min and max properties of the x Axis within the onPointAdded function. However, this slows down my application as it redraws the entire graph.

      Is there some way to optimize this, for example such that the chart properly shifts the previously drawn image to the side in-GPU and draws only new points? Or, if that is not possible, is there some way to take advantage of Qt Chart drawing code while using custom rendering logic to achieve this optimization manually with OpenGL?

      B Offline
      B Offline
      Bob64
      wrote on last edited by
      #2

      @tague Are you currently updating every time a point is added? If so, I wondered if you could buffer the incoming data so that you do not update so frequently? Perhaps use a QTimer to control update frequency.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved