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

Get clicked position from plot arena in datapoint coordinates

XMLWordPrintable

    • 05d38aebe (dev)

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes