grPointInfo (Function) In french: grInfoPoint
Warning
From version 24, grInfoPoint is kept for backward compatibility. This function is replaced by grPointInfo.
Returns the screen coordinates of a point or the screen coordinates of a value found in a chart. This function allows you to retrieve the coordinates of a chart area in order to draw in this area with the drawing functions. Note: This function must be used after grDraw (once the chart was drawn). Versions 16 and later New in version 16 Versions 18 and later New in version 18 Versions 21 and later New in version 21
// Screen coordinates of a point in the chart created by programming x is int x = grPointInfo("MyChart", grXCoordinate, 1, 1)
// Coordinates of the center of a Radar chart displayed in a Chart control Coordinates is string Coordinates = grPointInfo(CHART_Radar, grXCoordinate, grAxisX, grMin) + ", " + ... grPointInfo(CHART_Radar, grYCoordinate, grAxisY, grMin)
// Coordinates of the useful area of a chart displayed in a Chart control Useful_Area is string Useful_Area = grPointInfo(CHART_Lines, grXCoordinate, grAxisX, grMin) + ", " + ... grPointInfo(CHART_Lines, grXCoordinate, grAxisX, grMax) + ":" + ... grPointInfo(CHART_Lines, grYCoordinate, grAxisY, grMin) + ", "+ ... grPointInfo(CHART_Lines, grYCoordinate, grAxisY, grMax)
// Coordinates of the area included between the minimum and maximum Y coordinate Area is string Area = grPointInfo(CHART_Lines, grYCoordinate, 1, grMin) + "," + ... grPointInfo(CHART_Lines, grYCoordinate, 1, grMax)
Syntax
<Result> = grPointInfo(<Chart name> , <Type of axis> , <Series number> , <Category number>)
<Result>: Integer Coordinates of the specified point (in pixels) according to the specified axis. The coordinates are specified in relation to the chart (and not in relation to the screen). <Chart name>: Character string (with or without quotes) Name of chart to use. This name corresponds to:- the chart name defined by programming with grCreate.
- the name of Chart control (found in the window editor or page editor).
<Type of axis>: Integer constant Type of the axis taken into account when calculating the coordinates: | | grXCoordinate (Default value) | The coordinate is calculated on the X axis. | grYCoordinate | The coordinate is calculated on the Y axis. |
<Series number>: Integer - Number of the affected series.
- Constant used to find out the coordinates of the point corresponding to the bounds of the axes:
| | grAxisX | Coordinates of bounds on the X axis. | grAxisY | Coordinates of bounds on the Y axis. |
<Category number>: Integer - Number of the affected category.
- Constant used to find out the coordinates of the point corresponding to the bounds of the axes:
| | grMax | Coordinates of upper bound. | grMin | Coordinates of lower bound. |
This page is also available for…
|
|
|