Results 1 to 5 of 5

Thread: How to set label under the each bar in Histogram chart?

  1. #1
    Join Date
    Dec 2010
    Posts
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    1

    Default How to set label under the each bar in Histogram chart?

    Hi, Sir:
    I want to set label under the bar of histogram chart. But, I can't find a way to do.
    Could you please give me some solution?

    What I want is shown on the attached file.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,339
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: How to set label under the each bar in Histogram chart?

    Did you bother to read the answer to yesterday's post by Patrik, who asked EXACTLY the same question?

    That's the purpose of this forum, to provide a place where you can search for answers to common questions before you ask the same thing again.

    And anyway, you are not talking about a histogram, you are talking about a bar chart. These are two completely different concepts. See my answer to Patrik.

    http://www.qtcentre.org/threads/3787...how-all-labels

  3. The following user says thank you to d_stranz for this useful post:

    picokuo (19th January 2011)

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

    Default Re: How to set label under the each bar in Histogram chart?

    Quote Originally Posted by d_stranz View Post
    And anyway, you are not talking about a histogram, you are talking about a bar chart. These are two completely different concepts. See my answer to Patrik.
    Even worse - the screenshot shows a special bar chart, where each bar is accumulated from values of several corresponding samples. I remember such a contribution for an earlier version of Qwt, where the author implemented a MultiBarItem, that was able to display the bars side by side or stacked.

    For such a thing it makes no sense to try something with the existing plot items. Instead use Qwt 6 and implement your own.

    Uwe

    PS: Writing plot items for bar charts is on my TODO list - but not for Qwt 6.0 anymore

  5. #4
    Join Date
    Dec 2010
    Posts
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    1

    Default Re: How to set label under the each bar in Histogram chart?

    Hi, d_stranz:
    Thanks a lot.
    I indeed don't find the reply from you to Patrick.
    That's because I find similar questions based on my guess. (forget "label"...)

    Sorry for that.

    BR,
    Pico

  6. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,339
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: How to set label under the each bar in Histogram chart?

    Quote Originally Posted by Uwe View Post
    Even worse - the screenshot shows a special bar chart, where each bar is accumulated from values of several corresponding samples. For such a thing it makes no sense to try something with the existing plot items. Instead use Qwt 6 and implement your own.

    PS: Writing plot items for bar charts is on my TODO list - but not for Qwt 6.0 anymore
    I also wrote such a thing for Qwt 5.x; my bar chart items could be stacked, put side-by-side, or clustered into groups. This was before I understood the axis engine / scale / draw concepts, so the labels didn't work correctly. Now that I think I understand what to do, unless 6.0 is radically different I will port it over and do it right when I get around to porting to 6.0. I don't see any reason not to contribute the code if you're interested.

    David

Similar Threads

  1. Histogram
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 9th March 2010, 09:54
  2. Replies: 1
    Last Post: 2nd December 2009, 09:15
  3. Gradient in histogram
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 1st August 2009, 12:48
  4. Qwt(histogram) in eclipse?
    By kid17 in forum Qwt
    Replies: 1
    Last Post: 29th November 2008, 13:38
  5. How display an histogram?
    By kid17 in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2008, 16:22

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
  •  
Qt is a trademark of The Qt Company.