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. Yet another "Charting in Qt" question
QtWS25 Last Chance

Yet another "Charting in Qt" question

Scheduled Pinned Locked Moved General and Desktop
12 Posts 5 Posters 7.7k 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.
  • S Offline
    S Offline
    soroush
    wrote on last edited by
    #1

    I know this is asked millions of times...

    I need to draw charts like this one for my AI project:

    !http://s3.picofile.com/file/7620577311/46089_378569132238921_67326311_n.jpg(sample)!

    After doing a research, I found Qwt, KDAB's charting lib, Digia's commercial charting tools and Qtiplot. I'm in the early stage of decide which one to use.

    Criteria:

    • Such a library/tool should be free (as in beer).
    • Sound and complete (I'm supposing you know what I'm talking about)
    • Support plotting data from XML schema or a SQL database (Qt SQL support integration is a plus point)
    • It should be fancy enough! Colors, CSS styles, and other fancy things..
    • I would like to export my plots to SVG or PDF or EPS to put them in final report, which is supposed to be written in llncs style
    • Easy to use

    I would like to hear your personal experience with these libraries. Screenshots of tools seems to be a little tricky! They're all pretty nice.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      soroush
      wrote on last edited by
      #2

      Some other features:

      • I might add notes, draw circles, zoom on some parts to emphasis something
      1 Reply Last reply
      0
      • V Offline
        V Offline
        vezprog
        wrote on last edited by
        #3

        I have used Qwt multiple times. It is a great library and is free (as in beer). Zoom is already in it with zoom box implementation.

        Although, creating your own plotter might be the way to go if your looking for specific graphics and sql implementation...depending on how fluent your Qt skills are.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          soroush
          wrote on last edited by
          #4

          [quote author="dvez43" date="1358191149"]I have used Qwt multiple times. It is a great library and is free (as in beer). Zoom is already in it with zoom box implementation.
          [/quote]
          I'm going to test Qwt and KDAB. Others seem to be non-free.
          [quote author="dvez43" date="1358191149"]
          Although, creating your own plotter might be the way to go if your looking for specific graphics and sql implementation...depending on how fluent your Qt skills are.
          [/quote]
          Ah... That is very time-consuming, and needs a solid experience. I don't think that I will need something very special like so.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            uwer
            wrote on last edited by
            #5

            When trying Qwt start with Qwt 6.1 ( release candidates are available, supporting Qt4 + Qt5 ):

            • Candlestick charts - like in the screenshot above - are one of its new features.
            • Another new feature you want to have is the scale engine for date/time values
            • the blue circles ( whatever they mean ) can be displayed with a shape item - when they are related to plot coordinates

            But in the end Qwt is a framework like QGraphicsView - you can customize it to display almost everything by overloading with your own code.

            Qwt is by far the most powerful and flexible plot/chart package for Qt - complex enough for a documentation explaining how all classes play together. Unfortunately all what exists is a doxygen documentation of the API.

            So the best way to start with Qwt is to have a look at the examples. The first example to look at is simpleplot, showing how to display a line chart with a few lines only.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              soroush
              wrote on last edited by
              #6

              After more research, and some tests, i found that Qwt is great. though that was not attracting at a very first glance, (in comparison with similar tools) It's somehow hidden! May be it needs more examples, tutorials and a better introduction page.

              It's pretty enough for my needs. I'm gonna try it. After doing my project, I will post some screenshots here.

              Thanks

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JulienMaille
                wrote on last edited by
                #7

                Any idea if Qwt is suited for linecharts that need to be redreshed @30 fps?

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vezprog
                  wrote on last edited by
                  #8

                  Yes, I have done a realtime line graph (multiple lines with multiple markers) with Qwt using the Qwt timer objects for the replot(), refreshing at 100 mS plotting times.

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JulienMaille
                    wrote on last edited by
                    #9

                    I have tried with KDChart (2 lines with 512 points, no marker) but it's far from realtime.
                    Mind sharing online examples/tutorials?

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      vezprog
                      wrote on last edited by
                      #10

                      I didn't really use any online examples to write the code.

                      Basically I subclassed a QwtPlot and used the built in timer Qwt has (using its event callback) to set the data on the plot, and use the replot() function to update the data on the graph.

                      I had 3 vectors, with 20 mS data plotting analog data from a usb device. I actually showed 30 seconds worth of data on the graph as well. If I remember correctly, Qwt has an oscilloscope example that comes with the Qwt install package, I believe that's where I got the timer code from.

                      All the other stuff is just populating the data arrays and setting the data to the Qwt plot lines when the timer fires. The styling abilities of the plot is quite nice too.

                      Goodluck!

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SherifOmran
                        wrote on last edited by
                        #11

                        QWTplot obligates to opensource your code , if you compile it with your application ... please correct me if i am wrong ..

                        1 Reply Last reply
                        0
                        • U Offline
                          U Offline
                          uwer
                          wrote on last edited by
                          #12

                          For the record: this statement is very wrong.

                          The license of Qwt is the LGPL with some extra rules allowing statically linkage without having to show application code.

                          Uwe

                          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