ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • X and Y positions
  • Column chart
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
grInfoXY (Function)
In french: grInfoXY
Returns information about the series found at a specific chart point. This information is identical to the one displayed in the tooltip.
Note: This function is not available for 3D or surface charts.
Linux Caution: In Linux, this function requires a specific configuration. For more details, see The charts.
Example
WINDEVWEBDEV - Server codeiPhone/iPadIOS WidgetMac Catalyst
// Code de clic sur un graphe GRF_MonGraphe
Information is string = ...
	"(" + MouseXPos() + "," + MouseYPos() + ")" + CR + ...
	"grSérie -->" + TAB + grInfoXY(MySelf, grSeries, MouseXPos(), MouseYPos()) + CR + ...
	"grCatégorie -->" + TAB + grInfoXY(MySelf, grCategory, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeur -->" + TAB + grInfoXY(MySelf, grValue, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeurX -->" + TAB + grInfoXY(MySelf, grXValue, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeurMin -->" + TAB + grInfoXY(MySelf, grMinValue, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeurY -->" + TAB + grInfoXY(MySelf, grYValue, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeurMax -->" + TAB + grInfoXY(MySelf, grMaxValue, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeurDebut -->" + TAB + grInfoXY(MySelf, grStartValue, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeurFin -->" + TAB + grInfoXY(MySelf, grEndValue, MouseXPos(), MouseYPos())
WEBDEV - Browser codeAndroid
// Code de clic sur un graphe
Information is string = ...
	"(" + MouseXPos() + "," + MouseYPos() + ")" + CR + ...
	"grSérie -->" + TAB + grInfoXY(MySelf, grSeries, MouseXPos(), MouseYPos()) + CR + ...
	"grCatégorie -->" + TAB + grInfoXY(MySelf, grCategory, ...
				MouseXPos(), MouseYPos()) + CR + ...
	"grValeur -->" + TAB + grInfoXY(MySelf, grValue, ...
				MouseXPos(), MouseYPos()))
Syntax
<Result> = grInfoXY(<Chart name> , <Type of information> [, <X> , <Y>])
<Result>: Integer or real
  • Requested information.
  • If no chart element is found under the mouse,
    • -1 (grSeries and grCategory constants)
    • 0 (grValueXXXX constant).
<Chart name>: Control name or character string
Name of the chart to be used. This name corresponds to:
  • the name of the chart defined programmatically with grCreate.
  • the name of the Chart control (in the window or page editor).
Android Only Chart controls are available.
WEBDEV - Browser code Only interactive Chart controls are available ("Interactive chart" option in the "Details" tab of the control description window).
<Type of information>: Constant
Type of information requested:
grCategoryNumber of pointed category.
grTheoreticalCategoryNumber of the category that corresponds to a pointed X-coordinate (regardless of the series) and even if the cursor is not on the chart drawing.
WEBDEV - Browser codeAndroid This constant is not available.
grPathPath of section in the Sunburst chart.
WEBDEV - Server codeWEBDEV - Browser codeAndroidiPhone/iPadIOS WidgetMac Catalyst This constant is not available.
grXCoordX-coordinate of chart point.
WEBDEV - Browser codeAndroid This constant is not available.
grYCoordY-coordinate of chart point.
WEBDEV - Browser codeAndroid This constant is not available.
grSecondaryYCoordY-coordinate according to the secondary axis of chart point.
WEBDEV - Browser codeAndroid This constant is not available.
grSeriesSeries number.
Note For Stock charts and Scatter charts, there is only one series out of 4 or 2.
grValueValue of series.
grStartValueStart value of the series for a Stock chart.
WEBDEV - Browser codeAndroid This constant is not available.
grEndValueEnd value of the series for a Stock chart.
WEBDEV - Browser codeAndroid This constant is not available.
grMaxValueMaximum value of the series for a Stock chart.
WEBDEV - Browser codeAndroid This constant is not available.
grMinValueMinimum value of the series for a Stock chart.
WEBDEV - Browser codeAndroid This constant is not available.
grXValueX value of series for a Scatter chart.
WEBDEV - Browser codeAndroid This constant is not available.
grYValueY value of series for a Scatter chart.
WEBDEV - Browser codeAndroid This constant is not available.
<X>: Optional integer
X-coordinate (in pixels) to be analyzed. This coordinate is expressed in relation to the control.
If this parameter is not specified, the position used in the last call to grInfoXY is taken into account.
<Y>: Optional integer
Y-coordinate (in pixels) to be analyzed. This coordinate is expressed in relation to the control.
If this parameter is not specified, the position used in the last call to grInfoXY is taken into account.
Remarks

X and Y positions

The <X> and <Y> parameters must be specified at least once.
A WLanguage error occurs if the chart has changed between 2 calls to grInfoXY and if the X and Y positions are not specified.

Column chart

When clicking a bar of the column chart, the area taken into account will be a little bit larger (at the top and at the bottom).
Related Examples:
The Chart control (click management) Unit examples (WINDEV): The Chart control (click management)
[ + ] Customizing the click on a Pie chart.
Here, the section clicked by the user is pulled out by the application.
To implement this behavior, all you have to do is use grInfoXY (to identify the section clicked) and grPiePullOut (to pull out the section).
WM Click on Chart Cross-platform examples (WINDEV Mobile): WM Click on Chart
[ + ] The "WM Click on Chart" example proposes a solution for pulling out the sections of a Pie chart via a simple click.
This example includes a control template named "TPLC_PullOutChart". This control template is used to pull out the chart sections via a simple click.
To include this feature in another application, all you have to do is import the "TPLC_PullOutChart" template.
Component: wd300grf.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help