Results 1 to 2 of 2

Thread: Request Qwt histogram design advice

  1. #1
    Join Date
    Jul 2007
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Question Request Qwt histogram design advice

    Program desire: display a histogram with values either on an axis, or inside the bar segment (or rectangle), or when the mouse hovers over the bar segment the value appears.

    data: a date, time combination represents each histogram bar and an integer represents the height of the histogram bar. The data is not linear or repeatable (i.e. dates and times are not the same each day and there may be a different number of segments per day).

    I looked into putting the data in the axis, but before I invest a lot of time here, I thought I would use the forum.

    The only other thing I can come up with is the QwtPlotPicker(but this returns graph coordinates and I cannot see how I can map this to the data in the graph). This way would probably serve the program better because there could be more histogram bars than room for axis text.

    I would think that the option is there somewhere, but I have come up empty-handed

    Thanks in advance,
    Goes2BoB

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

    Default Re: Request Qwt histogram design advice

    Quote Originally Posted by goes2bob View Post
    Program desire: display a histogram with values either on an axis, or inside the bar segment (or rectangle), or when the mouse hovers over the bar segment the value appears.
    In SVN trunk ( = 5.2 development branch ) you find a draft of a QwtPlotHistogram implementation. It's still incomplete, but might be enough for your needs. Here you can overload QwtPlotHistogram::drawColumn or implement tooltips easily using QwtPlotHistogram::columnRect.

    At the moment my focus is on the 5.1 release and the 5.2 branch is a bit orphaned. So it might need some time until a 5.2 release, but you can copy the implementation to your code and backport it to 5.0.

    Uwe

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.