Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134499

Get clicked position from plot arena in datapoint coordinates

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Graphs: 2D
    • None

    Description

      Currently, a user can get a clicked position from the plot arena by using

       

      MouseArea {
                  x: chartView.x + chartView.plotArea.x
                  y: chartView.y + chartView.plotArea.y
                  width: chartView.plotArea.width
                  height: chartView.plotArea.height
      ...
      }
       
      

      However, the point from the MouseArea is in "render coordinates" and needs to be calculated in data point coordinates. Usually, the render coordinates are calculated from data point coordinates in the Point Renderer. The Point Renderer has a method for reversing render coordinates back data point coordinates. So, if the user wants to get a clicked position in data point coordinates, they need to be able to perform those reversing operations for the point.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            oulu_hillbilly Sami Varanka
            oulu_hillbilly Sami Varanka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes