Results 1 to 3 of 3

Thread: Qwt axis scale limitation

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Smile Qwt axis scale limitation

    Hello Uwe and others!

    As I mentioned in previous posts, I'm developing a graphical solution to display stock trading data as home broker's softwares such as Metastock does and I'm using Qwt for that end.

    --
    Following the stockcharts example I was able to draw some stock charts quite well but I found a problem with the zoom feature.
    For now I'm using only QwtPlotZoomer as in the example and what happens is that if I zoom out to the last level the graph show data regarding the first second in 1970! (I guess that has something to do with using UTC date). What I find funny is that I essentially copied the example's code and there when I zoom out to the last level such thing don't happen, rather the graph is completely shown in the year of 2010 - for which there is data.

    So my question is: which code should I put to configure a given xAxis range for the last zoom out? Lets suppose (using a probable parameter, i.e. something I would like to implement) that, when avaliable, in the greatest zoom out possible the graph should plot exactly 1000 candles with the last candle of the vector been shown in the right corner (i.e. the counting-and-showing begins from the right to the left).

    Don't forget that i'm using date-time scale for the xAxis!


    Thanks,

    Momergil



    P.s.: Uwe, I send an e-mail to qwt-interest@lists.sourceforge.net with my first user feedback; I hope you received it.

  2. #2
    Join Date
    Dec 2012
    Posts
    8
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qwt axis scale limitation

    Do you set the zoomBase correctly before any zooming happens?
    If yes, check if you set it *after* you manage the axes (like setting axis scales etc).

  3. #3
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qwt axis scale limitation

    No, and also I don't know how to use this function
    And I noticed that such function is not used in the example, that nevertheless works. Could it be because in the example the graph is first populated with data and just then the Zoomer is instantiaded and added while in my case I first attach the zoomer to the QwtPlot and later add the data?

    Edit:

    Actually I think I learned how to use this function:

    QwtPlotZoomer::setZoomBase(QwtPlotTradingCurve->boundingRect());
    Last edited by Momergil; 14th January 2013 at 18:26.

Similar Threads

  1. qwt axis scale
    By Markus_AC in forum Qwt
    Replies: 0
    Last Post: 15th December 2011, 10:45
  2. Axis Auto Scale
    By gkarthick5 in forum Qwt
    Replies: 3
    Last Post: 13th July 2011, 14:57
  3. Replies: 4
    Last Post: 16th January 2011, 11:32
  4. Axis with a probability scale
    By Lister in forum Qwt
    Replies: 1
    Last Post: 5th May 2009, 07:45
  5. 4 axis auto scale..
    By Vincenzo in forum Qwt
    Replies: 0
    Last Post: 22nd March 2009, 02:12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.