Hide Comments
Hide Comments

TRSCustomChartPanel.PointToAxesPoint(TCanvasPoint,TRSChartAxis,TRSChartAxis) Method

Comments (0)

Converts a canvas coordinate to axes coordinates using the specified X and Y axes. The PointToAxesPoint uses the TRSChartAxis PixelToAxis method. Unlike the PixelToAxis method which converts only the x value or y value, the PointToAxesPoint method converts a point to the internal point coordinate.

Namespace: FMX.RS.ChartPanel

expandingSyntax

Delphi

public
  class function PointToAxesPoint( Pt: TCanvasPoint; XAxis, YAxis: TRSChartAxis ): TRSPoint;
 

Parameters

Pt

Type: TCanvasPoint

XAxis

Type: TRSChartAxis

YAxis

Type: TRSChartAxis

Return Value

Type: TRSPoint

expandingExamples

The following code changes the form's caption to display the chart value under the mouse:

Delphi

procedure TForm1.RSChartPanel1MouseMove(Sender: TObject;
   Shift: TShiftState; X, Y: Integer);
 begin
      with RSChartPanel1.PointToAxesPoint(Point(X,Y), RSChartPanel1.BottomAxis, RSChartPanel1.LeftAxis) do
           Caption := FloatToStr(X) + ', ' + FloatToStr(Y);
 end;

expandingSee Also

Comments (0)

RiverSoftAVG Charting Component Suite (RCCS) © 2005-2015, Thomas G. Grubb