Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Make dynamic graph
Forum Updated to NodeBB v4.3 + New Features

Make dynamic graph

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 4 Posters 4.9k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    Raghvendra
    wrote on last edited by
    #1

    Hey there, I need to make dynamic graph using qt or qml, so please suggest me what should I use either QT or QML and please suggest me library also.

    1 Reply Last reply
    0
    • J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      Hi,

      since Qt 5.7, I would suggest Qt Charts it was previously commercial-only, but is now included in Qt under GPLv3 license for open source users.

      Besides that, QCustomPlot is popular.

      Both are cpp suggestions as I'm not yet really familiar with QML and the options you have there :).


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      R 1 Reply Last reply
      4
      • J.HilkJ J.Hilk

        Hi,

        since Qt 5.7, I would suggest Qt Charts it was previously commercial-only, but is now included in Qt under GPLv3 license for open source users.

        Besides that, QCustomPlot is popular.

        Both are cpp suggestions as I'm not yet really familiar with QML and the options you have there :).

        R Offline
        R Offline
        Raghvendra
        wrote on last edited by
        #3

        @J.Hilk okay thanks

        mrjjM 1 Reply Last reply
        0
        • R Raghvendra

          @J.Hilk okay thanks

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Raghvendra

          I can highly recommend QCustomPlot as its easy to get going with.

          R 1 Reply Last reply
          0
          • mrjjM mrjj

            @Raghvendra

            I can highly recommend QCustomPlot as its easy to get going with.

            R Offline
            R Offline
            Raghvendra
            wrote on last edited by
            #5

            @mrjj will try with it, right now I am trying with qml's chartview.

            mrjjM 1 Reply Last reply
            0
            • R Raghvendra

              @mrjj will try with it, right now I am trying with qml's chartview.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Raghvendra said in Make dynamic graph:

              chartview.

              Ahh, yes. That should also be very easy to get going :)

              R 1 Reply Last reply
              0
              • mrjjM mrjj

                @Raghvendra said in Make dynamic graph:

                chartview.

                Ahh, yes. That should also be very easy to get going :)

                R Offline
                R Offline
                Raghvendra
                wrote on last edited by
                #7

                @mrjj I am not finding any way to insert data dynamically

                LineSeries {
                visible:tempVisibilty
                id:temperature
                name: "Temperature"
                XYPoint { x: 0; y: 0 }
                XYPoint { x: 1.1; y: 2.1 }
                XYPoint { x: 1.9; y: 3.3 }
                XYPoint { x: 2.1; y: 2.1 }
                XYPoint { x: 2.9; y: 4.9 }
                XYPoint { x: 3.4; y: 3.0 }
                XYPoint { x: 4.1; y: 3.3 }

                    }
                

                like here the number of XYPoint is fixed but i need to send it dynamically and update my graph as well

                mrjjM VRoninV 2 Replies Last reply
                0
                • R Raghvendra

                  @mrjj I am not finding any way to insert data dynamically

                  LineSeries {
                  visible:tempVisibilty
                  id:temperature
                  name: "Temperature"
                  XYPoint { x: 0; y: 0 }
                  XYPoint { x: 1.1; y: 2.1 }
                  XYPoint { x: 1.9; y: 3.3 }
                  XYPoint { x: 2.1; y: 2.1 }
                  XYPoint { x: 2.9; y: 4.9 }
                  XYPoint { x: 3.4; y: 3.0 }
                  XYPoint { x: 4.1; y: 3.3 }

                      }
                  

                  like here the number of XYPoint is fixed but i need to send it dynamically and update my graph as well

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Raghvendra said in Make dynamic graph:

                  Hi
                  Sadly im not into QML so i do not know directly
                  but
                  http://doc.qt.io/qt-5/qtcharts-qmloscilloscope-example.html
                  seems very dynamic?

                  I think you will need c++ for it but not sure.

                  Give it some time, maybe others know easy way.

                  R 1 Reply Last reply
                  0
                  • R Raghvendra

                    @mrjj I am not finding any way to insert data dynamically

                    LineSeries {
                    visible:tempVisibilty
                    id:temperature
                    name: "Temperature"
                    XYPoint { x: 0; y: 0 }
                    XYPoint { x: 1.1; y: 2.1 }
                    XYPoint { x: 1.9; y: 3.3 }
                    XYPoint { x: 2.1; y: 2.1 }
                    XYPoint { x: 2.9; y: 4.9 }
                    XYPoint { x: 3.4; y: 3.0 }
                    XYPoint { x: 4.1; y: 3.3 }

                        }
                    

                    like here the number of XYPoint is fixed but i need to send it dynamically and update my graph as well

                    VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by VRonin
                    #9

                    @Raghvendra My standard answer to this question:

                    create a QStandardItemModel in C++ and expose it to qml, use a model mapper for the chart (for example VXYModelMapper) and now you can change the contents of the model dynamically and the changes will be reflected in the chart

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    R 1 Reply Last reply
                    2
                    • VRoninV VRonin

                      @Raghvendra My standard answer to this question:

                      create a QStandardItemModel in C++ and expose it to qml, use a model mapper for the chart (for example VXYModelMapper) and now you can change the contents of the model dynamically and the changes will be reflected in the chart

                      R Offline
                      R Offline
                      Raghvendra
                      wrote on last edited by
                      #10

                      @VRonin Thanks Man, going to try it

                      1 Reply Last reply
                      0
                      • mrjjM mrjj

                        @Raghvendra said in Make dynamic graph:

                        Hi
                        Sadly im not into QML so i do not know directly
                        but
                        http://doc.qt.io/qt-5/qtcharts-qmloscilloscope-example.html
                        seems very dynamic?

                        I think you will need c++ for it but not sure.

                        Give it some time, maybe others know easy way.

                        R Offline
                        R Offline
                        Raghvendra
                        wrote on last edited by
                        #11

                        Can you give me an example for implement QStandardItemModel with qml graph or something like this

                        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