View Full Version : How to set label under the each bar in Histogram chart?
picokuo
18th January 2011, 14:26
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.
d_stranz
19th January 2011, 02:02
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/37878-How-to-show-all-labels
Uwe
19th January 2011, 07:01
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
picokuo
19th January 2011, 07:09
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
d_stranz
21st January 2011, 05:07
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.