Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtChart vs QCustomplot

QtChart vs QCustomplot

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtchart
6 Posts 2 Posters 8.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    itsmaxdd
    wrote on 5 Sept 2016, 10:09 last edited by itsmaxdd 9 May 2016, 10:11
    #1

    Hello guys,
    being QtChart rather new i was wondering how it is compared to QCustomplot in terms of features.
    I can't see a tracking line feature for example nor the possibility to code it yet (getNearestValue given a certain X,Y position is not available) without some troubles.

    Is this the solution for example?

    QPointF QChart::mapToPosition(const QPointF &value, QAbstractSeries *series)

    QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series)

    QtChart looks nicely though in terms of themes.

    Anyone?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 5 Sept 2016, 11:10 last edited by
      #2

      I can't see a tracking line feature

      Could you please elaborate by what you mean by tracking line

      getNearestValue given a certain X,Y position is not available

      This is just pythagorean theorem to calculate the distance for each point and a call to std::min_element to find the nearest. It can be coded in 5 minutes

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      I 1 Reply Last reply 5 Sept 2016, 12:15
      1
      • V VRonin
        5 Sept 2016, 11:10

        I can't see a tracking line feature

        Could you please elaborate by what you mean by tracking line

        getNearestValue given a certain X,Y position is not available

        This is just pythagorean theorem to calculate the distance for each point and a call to std::min_element to find the nearest. It can be coded in 5 minutes

        I Offline
        I Offline
        itsmaxdd
        wrote on 5 Sept 2016, 12:15 last edited by
        #3

        @VRonin I meant to have a vertical cursor which is draggable around, it allows you to evaluate the sample (or the y value if it is a continuous function).

        Indeed you can code it but that was not the point, moreover if you factor in zoom and resize it could be a problem.

        Is there an easy way to do it with current the QChart implementation?

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VRonin
          wrote on 5 Sept 2016, 12:18 last edited by
          #4

          You mean something like this: http://doc.qt.io/qt-5/qtcharts-callout-example.html ?

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          I 1 Reply Last reply 5 Sept 2016, 13:02
          1
          • V VRonin
            5 Sept 2016, 12:18

            You mean something like this: http://doc.qt.io/qt-5/qtcharts-callout-example.html ?

            I Offline
            I Offline
            itsmaxdd
            wrote on 5 Sept 2016, 13:02 last edited by itsmaxdd 9 May 2016, 13:47
            #5

            @VRonin That's the example where i took the two functions mentioned in the first post, my question was if the library where ready to handle it.
            Assume you draw a vertical line, can it be make draggable?.
            If you have samples, can you make it stick to the sample upon mouse releasing for example?

            Can you suggest me a way to proceed?

            1 Reply Last reply
            0
            • V Offline
              V Offline
              VRonin
              wrote on 5 Sept 2016, 13:43 last edited by
              #6

              You can use any of this signals to react to events on a series and do whatever

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              1 Reply Last reply
              0

              1/6

              5 Sept 2016, 10:09

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved