Results 1 to 8 of 8

Thread: Qwt Side-bySide bar charts/graphs

  1. #1
    Join Date
    Jan 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Qwt Side-bySide bar charts/graphs

    Is there any way in Qwt v5.2.1 to do side by side bar graphs with multiple sets of data colored differently to distinguish between the two? I'm trying to be specific in my question as possible. I'm right now using a HistogramItem but there is no way (that I know of) to attach more than one HistogramItem to a QwtPlot without upgrading to v.6.0.1 and using QwtBarItem and using that.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt Side-bySide bar charts/graphs

    In fact you would need to upgrade to SVN trunk ( 6.1 ), where you find a QwtPlotMultiBarChart item. Its "Grouped" ( in opposite to "Stacked" ) mode should be what you are looking for. Check the barchart example.

    The redesign made in Qwt 6.0 was to primarily to make it possible to introduce new types of plot items - without having to duplicate too much code - and Qwt 6.1 will be the release that introduces them.

    Uwe

    PS1: I remember there was once ( years ago ) a patch for Qwt 5.x ( or even maybe Qwt 4.x ) - maybe you find it in the mailing list archive.
    PS2: Stay away from QwtPlotBarChart - its implementation is not finished.
    Last edited by Uwe; 17th April 2012 at 17:29.

  3. #3
    Join Date
    Jan 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qwt Side-bySide bar charts/graphs

    I'll certainly look into it. I'm still using a HistogramItem for plotting a single data set right now, and that uses a QwtIntervalData class to pass in the data using the setData function, would that still be possible, or would that have to be "wrapped" into another class somehow?


    Added after 23 minutes:


    ...and is there documentation for it somewhere?
    Last edited by bwnicewo; 17th April 2012 at 18:11.

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt Side-bySide bar charts/graphs

    The plot items are organized according to the type of the samples:


    • QwtPlotHistogram
      x -> [y1, y2]
    • QwtPlotMultiBarChart
      [ x] -> [ y1, ... yn ] ( or the index in the list is used as x value )
    • QwtPlotBarChart
      x - > y ( or the index in the list is used as x value )


    QwtPlotHistogram ( more or less the HistogramItem from the Qwt 5 example ) is available since Qwt 6.0. The bar charts item needed some extra work in the framework, because the width of the bars doesn't depend on any coordinates but affects the layout.

    Uwe

  5. #5
    Join Date
    Jan 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qwt Side-bySide bar charts/graphs

    so there is no docs for it yet?

  6. #6
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt Side-bySide bar charts/graphs

    Quote Originally Posted by bwnicewo View Post
    so there is no docs for it yet?
    http://qwt.sourceforge.net/class_qwt...histogram.html

    For the new classes in trunk you have to run doxygen yourself, but I don't have everything written yet. But simply check the barchart example - I don't believe, that you need much docs for using these classes. Probably the most difficult part is to identify the APIs inherited from the base classes.

    Uwe

  7. #7
    Join Date
    Jul 2011
    Posts
    8
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qwt Side-bySide bar charts/graphs

    At Mosaic we offer a Qt developer suite that includes 2d/3d graphing tools in our widget library that encapsulates commonly needed functionality, as well as intuitive data models that can be shared among widgets.Enjoy developing rich user interfaces on a wide variety of platforms and programming environments with Mosaic Qt Developer Suite. Each Mosaic widget is also a Qt Creator/Qt Designer plugin. The application programmer can drag and drop Mosaic widgets on to the application canvas and set the widgets properties via the property manager. The Mosaic Qt Developer Suite aims at providing commonly needed widgets in a library API that can be easily used by a Qt application programmer. The Mosaic Qt Developer Suite integrates with Qt Creator and Qt Designer to allow the application programmer the full use of Qt development tools across all the platforms.

  8. #8
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt Side-bySide bar charts/graphs

    Quote Originally Posted by scoop View Post
    At Mosaic we ...
    ... promise to post no spam in this forum anymore !

Similar Threads

  1. Replies: 21
    Last Post: 8th December 2011, 02:18
  2. Manifest / Side by Side configuration.
    By hickscorp in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2010, 05:22
  3. side-by-side configuration is incorrect
    By trueqt in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2009, 00:35
  4. Stack two QMenuBars instead of side by side?
    By killerwookie99 in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2008, 06:27
  5. Replies: 5
    Last Post: 15th February 2008, 02:54

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.