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. High performance live chart

High performance live chart

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
11 Posts 6 Posters 4.2k 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.
  • B Offline
    B Offline
    BartBlackMagic
    wrote on last edited by BartBlackMagic
    #1

    Scenario: sensor data is streamed at a fast pace and needs to be rendered live onto a QML ChartView using a couple of line series.

    Question: what is the most performant way to render the results? Do I:

    • buffer the results in C++ and send a signal with a QVariantList<QPointF> when a time threshold is exceeded which is then read and added to the LineSeries in qml -> exposing C++ via a context property
    • expose the QAbstractSeries from QML to C++ and fill it in C++ at a predefined refresh rate using a QTimer as in this example? -> Interacting with QML Objects from C++ which has a disclaimer in the docs here NOT to use it
    • don't use QML (which would be disappointing)
    • other ways?
    1 Reply Last reply
    1
    • oria66O Offline
      oria66O Offline
      oria66
      wrote on last edited by
      #2

      Hello @BartBlackMagic. The Qt Charts are not famous for their performance with real-time real data. Other people may say that use Qwt or QCustomPlot, but I would rather prefer Qt Charts with all its defects. Concretely, I love Qml, so why go out and find a 3rd party plotter?

      In your case, I face a similar problem last months. I choose the first option that you show. And it works pretty well for me.

      The truth is out there

      1 Reply Last reply
      1
      • M Offline
        M Offline
        MAthias_Va
        wrote on last edited by MAthias_Va
        #3

        @oria66 this is exactly what I need to do too, can you provide an example code!

        ODБOïO oria66O 2 Replies Last reply
        0
        • M MAthias_Va

          @oria66 this is exactly what I need to do too, can you provide an example code!

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #4

          http://qwt.sourceforge.net/
          https://www.qcustomplot.com/

          M 1 Reply Last reply
          0
          • ODБOïO ODБOï

            http://qwt.sourceforge.net/
            https://www.qcustomplot.com/

            M Offline
            M Offline
            MAthias_Va
            wrote on last edited by
            #5

            @LeLev Thanks for your suggest, I think I can't use third party as I already crossed compiled my device with only Qt libraries!

            JKSHJ 1 Reply Last reply
            0
            • GrecKoG Offline
              GrecKoG Offline
              GrecKo
              Qt Champions 2018
              wrote on last edited by
              #6

              What about QtCharts with VXYModelMapper ?

              M 1 Reply Last reply
              0
              • M MAthias_Va

                @oria66 this is exactly what I need to do too, can you provide an example code!

                oria66O Offline
                oria66O Offline
                oria66
                wrote on last edited by
                #7

                @MAthias_Va. Give some time to isolate an example from my code. Is proprietary code, so I must change a lot of things. I will send you in your post, ok? The developers must help us each other.

                The truth is out there

                M 1 Reply Last reply
                0
                • M MAthias_Va

                  @LeLev Thanks for your suggest, I think I can't use third party as I already crossed compiled my device with only Qt libraries!

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  @MAthias_Va said in High performance live chart:

                  I think I can't use third party as I already crossed compiled my device with only Qt libraries!

                  You can cross-compile the 3rd party libraries later, right?

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  M 1 Reply Last reply
                  0
                  • oria66O oria66

                    @MAthias_Va. Give some time to isolate an example from my code. Is proprietary code, so I must change a lot of things. I will send you in your post, ok? The developers must help us each other.

                    M Offline
                    M Offline
                    MAthias_Va
                    wrote on last edited by
                    #9

                    @oria66 that would be great, thanks!

                    1 Reply Last reply
                    0
                    • GrecKoG GrecKo

                      What about QtCharts with VXYModelMapper ?

                      M Offline
                      M Offline
                      MAthias_Va
                      wrote on last edited by
                      #10

                      @GrecKo I will check it, thanks

                      1 Reply Last reply
                      0
                      • JKSHJ JKSH

                        @MAthias_Va said in High performance live chart:

                        I think I can't use third party as I already crossed compiled my device with only Qt libraries!

                        You can cross-compile the 3rd party libraries later, right?

                        M Offline
                        M Offline
                        MAthias_Va
                        wrote on last edited by
                        #11

                        @JKSH I followed this method, https://wiki.qt.io/RaspberryPi2EGLFS to cross compile

                        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