How to properly use setSymbolExtent?
Hi all,
I am wondering hoow to properly use setSymbolExtent on a QwtPlotTradingCurve. I started from the stockchart example, where the value is defined as 12 * 500 * 1000.0 with this comment:
Code:
// as we have one sample per day a symbol width of 12h avoids overlapping symbols
So, what does 500 and 1000.0 stand for? How could I use setSymbolExtent to have a "good" view of my candlestick chart? By good I mean no overlapping candles whatever the number of candles is.
Note that I am aware of this thread, but it is still not answered, and that I do not have a QwtScaleWidget.
Hope you could help.
Best regards
Re: How to properly use setSymbolExtent?
Quote:
So, what does 500 and 1000.0 stand for?
In SVN the code looks like this:
Code:
// as we have one sample per day a symbol width of
// 12h avoids overlapping symbols. We also bound
// the width, so that is is not scaled below 3 and
// above 15 pixels.
curve->setSymbolExtent( 12 * 3600 * 1000.0 );
curve->setMinSymbolWidth( 3 );
curve->setMaxSymbolWidth( 15 );
Quote:
I do not have a QwtScaleWidget.
See QwtPlot::axisWidget(...).
Uwe
Re: How to properly use setSymbolExtent?
Thanks Uwe for your reply,
I think I understand "3600" (60s * 60m). But what does "1000" stands for ?
Re: How to properly use setSymbolExtent?
The scale is in milliseconds.
Quote:
QwtDate: A double is interpreted as the number of milliseconds since
1970-01-01T00:00:00 Universal Coordinated Time - also known
as "The Epoch".
Uwe