PDA

View Full Version : newbie help: stacked bar-chart/histogram



lelandv
1st December 2009, 12:18
Hi All,

I'm trying to adapt the example histogram contained in the qwt source to be able to make a stacked histogram/bar-chart with multiple datasets.

I have managed to adapt the example for a single dataset in my application, but I need up to four or five values per element, and to display them as a stacked bar chart.

I'm very new to Qt and C++ for that matter, and haven't the foggiest idea how I can proceed to adapt this any further :(

Any help, tutorial, or pointers would be appreciated..

Thanks

Leland

Uwe
2nd December 2009, 08:15
Qwt doesn't have a plot item for stacked bar graphs, but an implementation had been posted on the Qwt mailing list for a earlier version. See the attachments here: http://sourceforge.net/mailarchive/forum.php?thread_name=9fa730540707291056k12dfc971t 619ec1e81527d7b4%40mail.gmail.com&forum_name=qwt-interest.

Qwt 5.3 ( code in SVN trunk ) will come with some templates, that makes it much easier to implement new types of plot items ( curves, histograms .. ) and comes with a couple of new implementations. Unfortunately stacked bargraphs are special because they needs special layout code for aligning the bars on the x-axis.

Uwe