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
Servers for Qt installer are currently down

Make dynamic graph

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 4 Posters 4.8k 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 7 Feb 2017, 07:51 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 Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 7 Feb 2017, 08:03 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 7 Feb 2017, 08:08
      4
      • J J.Hilk
        7 Feb 2017, 08:03

        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 7 Feb 2017, 08:08 last edited by
        #3

        @J.Hilk okay thanks

        M 1 Reply Last reply 7 Feb 2017, 09:32
        0
        • R Raghvendra
          7 Feb 2017, 08:08

          @J.Hilk okay thanks

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 7 Feb 2017, 09:32 last edited by
          #4

          @Raghvendra

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

          R 1 Reply Last reply 7 Feb 2017, 09:34
          0
          • M mrjj
            7 Feb 2017, 09:32

            @Raghvendra

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

            R Offline
            R Offline
            Raghvendra
            wrote on 7 Feb 2017, 09:34 last edited by
            #5

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

            M 1 Reply Last reply 7 Feb 2017, 09:51
            0
            • R Raghvendra
              7 Feb 2017, 09:34

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

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 7 Feb 2017, 09:51 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 7 Feb 2017, 11:12
              0
              • M mrjj
                7 Feb 2017, 09:51

                @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 7 Feb 2017, 11:12 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

                M V 2 Replies Last reply 7 Feb 2017, 11:24
                0
                • R Raghvendra
                  7 Feb 2017, 11:12

                  @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

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 7 Feb 2017, 11:24 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 7 Feb 2017, 12:45
                  0
                  • R Raghvendra
                    7 Feb 2017, 11:12

                    @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

                    V Offline
                    V Offline
                    VRonin
                    wrote on 7 Feb 2017, 11:33 last edited by VRonin 2 Jul 2017, 11:34
                    #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 7 Feb 2017, 11:48
                    2
                    • V VRonin
                      7 Feb 2017, 11:33

                      @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 7 Feb 2017, 11:48 last edited by
                      #10

                      @VRonin Thanks Man, going to try it

                      1 Reply Last reply
                      0
                      • M mrjj
                        7 Feb 2017, 11:24

                        @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 7 Feb 2017, 12:45 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

                        1/11

                        7 Feb 2017, 07:51

                        • Login

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