Update Spline series Chart data Continuously using VXYmodelMapper in QML

  • I am using Qt chart module in QML.
    I set the model data directly by the following code.
    model: customtablemodel
    series: lineone
    xColumn: 0
    yColumn: 1
    console.log("loaded VXYModelMapper: xColumn " + mapper.xColumn + " yColumn " + mapper.yColumn)

    I need to update the model data every 5 sec and in C++ and update the graph.

    Please let me know any work around for this.

    Thanks in advance

  • https://forum.qt.io/topic/85621/qml-lineseries-with-c-vector-data/1

    It can handle very fast updates, we're talking whole series replacements in 14ms (maybe less - 14ms is way too small for me to care to tighten further) using OpenGL series and replace() calls ... I think 5s is easy to achieve - it won't be charts / QXYSeries holding you back anyhow.

  • Actually i am using QAbstractTableModel to send the model data from c++ to QML. Also column number is mentioned in the VXYModelMapper. First time the chart is updated. How can i update model data from c++ to QML every 5 sec to change the charts continuously. The data is get from the data base table.

    Please let me know

  • how can i update data model in c++ with different data, that will draw spline series graph in QML using VXY model mapper.

    It will be very helpful give some ideas about that.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.