PDA

View Full Version : HistogramItem and Qgradient



OverTheOCean
24th August 2010, 23:35
Guys,

any way to add a color gradient to a HistogramItem ? instead of plain color ?

thanks

Michael

Uwe
25th August 2010, 19:05
If you mean HistogramItem from the Qwt examples you have to modify its implementation. The brush that is used to fill the bars need to be initialized by your gradient instead of a color. In Qwt 6.x ( SVN trunk ) you can modify the palette ( QwtColumnSymbol::setPalette() ) that is used to draw a column of a QwtPlotHistogram.

Uwe

OverTheOCean
26th August 2010, 03:49
thanks Uwe,

l downloaded qwt6 and compiled it ( only the source, there is errors for the examples)

When l try to compile my code with qwt6 ...looks like QwtDoubleInterval has been removed from the library ...

regards,

Michael

Uwe
26th August 2010, 09:54
l downloaded qwt6 and compiled it ( only the source, there is errors for the examples)
What errors ?


When l try to compile my code with qwt6 ...looks like QwtDoubleInterval has been removed from the library ...
And 5 seconds later you will have found a class QwtInterval.

Qwt 6.x is by far not source code compatible ( f.e Qt 3 support has been dropped ) but in opposite to Qwt 5.x it has an implementation of a plot item for histograms - not only an example showing how you could implement one.

Uwe

OverTheOCean
27th August 2010, 02:59
yes l've got all kind of error messages ...l came over by using the qwtconfig file from qwt5.2.0

now everything is working, and l'm able to set a Gradiant on the histogram...that 's nice.

any idea when you will release this rev6 ?

regards,

Michael