Results 1 to 7 of 7

Thread: How to display Tornado bar chart variable and it's min and max value using QWT

  1. #1
    Join Date
    Mar 2020
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default How to display Tornado bar chart variable and it's min and max value using QWT

    Hi All,

    I have created Tornado plot using QwtPlotMultiBarChart Class.

    I want to display Variable and it's min and max value on tornado bar chart.

    code snippet given below.

    To do color tornado bar chart used below code.
    Qt Code:
    1. // set red color on left side of tornado bar
    2. QwtColumnSymbol *symbol = new QwtColumnSymbol(QwtColumnSymbol::Box);
    3. symbol->setPalette(QPalette(Qt::red));
    4. tornadoBarChart->setSymbol(0, symbol);
    5.  
    6. // set blue color on right side of tornado bar
    7. QwtColumnSymbol *symbol2 = new QwtColumnSymbol(QwtColumnSymbol::Box);
    8. symbol2->setPalette(QPalette(Qt::blue));
    9. tornadoBarChart->setSymbol(1, symbol2);
    To copy to clipboard, switch view to plain text mode 


    Qt Code:
    1. QVector<QVector<qreal>> minMaxVector;
    2. sortMinMaxDiff(minMaxMap, minMaxVector);
    3. TornadoWidget = new TornadoPlot(optimumMudweightbaseValue, minMaxVector, units);
    4. TornadoWidget ->setWindowTitle("Tornado Plot");
    To copy to clipboard, switch view to plain text mode 

    thank you for any kind for help.

    Regards,
    RBsahu

  2. #2
    Join Date
    Mar 2020
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to display Tornado bar chart variable and it's min and max value using QWT

    Hi All,

    Is it feasible using QWT or not.
    Anyone have some idea please response.

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,250
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to display Tornado bar chart variable and it's min and max value using QWT

    Don't know, what exactly is the question ?

    Uwe

  4. #4
    Join Date
    Mar 2020
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to display Tornado bar chart variable and it's min and max value using QWT

    Hi Uwe,

    I have created tornado plot.
    Now my next requirement is to print the value of tornado bar.
    For reference I am attaching screen shot where tornado bar value is printed.
    Similarly I want to print tornado bar value using qwt function.
    Which function of class can be used to print tornado bar value.



    thank you
    RBSahu
    Attached Images Attached Images
    Last edited by RBSahu; 28th March 2020 at 06:43. Reason: Attached screenshot

  5. #5
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,250
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to display Tornado bar chart variable and it's min and max value using QWT

    So the question is how to draw a texts to the left/right sides of the bars ?

    Uwe

  6. #6
    Join Date
    Mar 2020
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to display Tornado bar chart variable and it's min and max value using QWT

    Thank you Uwe,

    Yes I want to print bar value and text.
    Regards,
    RBsahu
    Last edited by RBSahu; 29th March 2020 at 13:04. Reason: Spelling correction

  7. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,250
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to display Tornado bar chart variable and it's min and max value using QWT

    Quote Originally Posted by RBSahu View Post
    Yes I want to print bar value and text.
    Overload one of the drawXY methods and use QPainter::drawText or QwtText::draw.

    HTH,
    Uwe

Similar Threads

  1. Replies: 2
    Last Post: 25th March 2020, 18:10
  2. Display and update variable's value in a label.
    By SalahuddinAsh in forum Newbie
    Replies: 4
    Last Post: 4th September 2017, 22:55
  3. Replies: 0
    Last Post: 3rd March 2015, 10:00
  4. Replies: 13
    Last Post: 12th November 2013, 21:35
  5. Replies: 5
    Last Post: 10th May 2012, 07:22

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.