Results 1 to 3 of 3

Thread: Drawing points on a chart with a spline series

  1. #1
    Join Date
    Sep 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Drawing points on a chart with a spline series

    Hello I'm new in Qt and I want to draw points on a chart with a spline series, So far I reimplement the paint() function of QChart but it does nothing.
    Please can anyone help me??
    thank in advanced.
    pd: sorry about the english
    Last edited by Druid89; 9th November 2016 at 19:56.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Drawing points on a chart with a spline series

    So far I reimplement the paint() function of QChart but it does nothing.
    Completely the wrong way to do it. Create a new QSplineSeries, add your control points to it (QXYSeries::append()), and then add that to the QChart instance using QChart::addSeries(). *You* do not need to derive from QChart, QSplineSeries, or anything else, and you do not need to paint anything yourself. QChart and QSplineSeries do all of that for you.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Sep 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Drawing points on a chart with a spline series

    Thanks for the help, you save me!!!

Similar Threads

  1. Drawing Simple Line Chart in QML
    By neda in forum Qt Quick
    Replies: 0
    Last Post: 4th April 2016, 10:04
  2. Spline interpolation
    By DomantasB in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2013, 21:53
  3. Manually RGB Point Drawing
    By BlastDV in forum Qt Programming
    Replies: 1
    Last Post: 28th March 2013, 11:38
  4. How to Draw spline on QGraphicsScene
    By seguprasad in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2011, 05:28
  5. drawing series of rotated ellipses
    By qtn00b in forum Newbie
    Replies: 1
    Last Post: 17th December 2009, 01:51

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.