PDA

View Full Version : Showing date-time value in QwtPlotPicker



Momergil
20th March 2013, 17:58
Hello!

I want to use QwtPlotPicker so the user will be able to see the correspondent Y and X axis values each time he puts the mouse over the graph - such as in the bode example. The problem is that I'm using a date-time x coordinate, and then when I use the QwtPlotPicker it shows the correspondent double value of the date-time, not the date-time itself.

8829

How can I make the QwtPlotPicker show the date-time value correspondent to the X axis?

A secondary question also related to QwtPlotPicker is: how can I limit the decimals that is shown by it? In this app particularly, I want no decimals for the Y axis value.


Thanks,

Momergil

Uwe
21st March 2013, 06:22
The same answer for both questions: see the stockchart example.

Uwe

Momergil
21st March 2013, 17:01
The same answer for both questions: see the stockchart example.

Uwe

Sorry Uwe, but are your sure about this? I went to the stockchart example and not only I found that it event doesn't implement QwtPlotPicker, but also the closest thing it has to it, which is a particular implementation of QwtPlotZoomer, also has the same problem I want to correct:

8831

If you're sure that the answer is there, could you please be a little bit more specific where? Cause I can't see it. :T


Momergil

Uwe
21st March 2013, 21:07
QwtPlotZoomer is derived from QwtPlotPicker so you have to the same for both.
And I forgot - the code has been changed late. If it is not in rc3 you have to check SVN trunk.

Uwe

Momergil
22nd March 2013, 13:09
QwtPlotZoomer is derived from QwtPlotPicker so you have to the same for both.
And I forgot - the code has been changed late. If it is not in rc3 you have to check SVN trunk.

Uwe

Well, I thought it would be better to simply install rc3 ;) What I found interesting, thought, is that after recompiling my working code, the software crashed each time it passed by QwtPlot->replot(). Since my code don't actually need it, no problem; I just found myself in a bad position regarding updating Qwt to rc3 for a project at home, where replot() is used all the time.


Thanks!

Momergil