|
|
|
|
|
- Tooltip options to configure
- Enabling/Disabling the tooltip
- Formatting the elements displayed in the tooltip
grTooltip (Function) In french: grBulle Displays and formats: - the tooltip associated with each section of a chart (section of a Pie chart, column of a Column chart, etc.). This function also gets the characteristics of the tooltip associated with each section of the chart.
- a custom tooltip, associated with a point.
By default, a tooltip is automatically displayed (grShowTooltip set to True) when a chart is hovered by the mouse cursor.
grLabel(GRF_MonGraphe, grShowPercent, True)
grTooltip(GRF_MonGraphe, grTooltipFormat, -%"[%SERIE%]" + CR + -%"[%CATEGORIE%]" + ...
CR + -%"[%VALEUR%]")
grTooltip(GRF_MonGraphe, grShowTooltip, True)
grDraw(GRF_MonGraphe)
grTooltip(GRF_MonGraphe, 1, 2, "Le contenu de ma bulle d'aide")
grDraw(GRF_MonGraphe)
Syntax
Displaying and formatting the tooltip associated with a chart Hide the details
grTooltip(<Chart name> , <Tooltip option to configure> , <Tooltip option value>)
<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 editor.
<Tooltip option to configure>: Integer constant Enables or disables the tooltip and configures its characteristics. | | grShowTooltip | Enables or disables the tooltip. | grTooltipFormat | Defines the tooltip format. | grTooltipFormatBubbleChart | Defines the tooltip format in a Bubble chart.
| grTooltipFormatCrosshairHeader | Defines the format of the chart crosshair header. | grTooltipFormatHeatMap | Defines the tooltip format in a Heatmap chart.
| grTooltipFormatPie | Defines the tooltip format in a Pie chart. | grTooltipFormatRangeArea | Defines the tooltip format in a Range Area chart. | grTooltipFormatScatter | Defines the tooltip format in a Scatter chart.
| grTooltipFormatStock | Defines the tooltip format in a Stock chart.
| grTooltipFormatWaffle | Defines the tooltip format in a Waffle chart. |
<Tooltip option value>: Character string or boolean Value of the selected tooltip option. This value depends on the selected option (see the above table).
Getting the characteristics of the tooltip associated with a chart Hide the details
<Result> = grTooltip(<Chart name> , <Tooltip option>)
<Result>: Type corresponding to the option (boolean or character string) Value of the search option. <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 editor.
<Tooltip option>: Integer constant Tooltip option whose value you want to get. | | grShowTooltip | Enables or disables the tooltip. | grTooltipFormat | Defines the tooltip format. | grTooltipFormatBubbleChart | Defines the tooltip format in a Bubble chart.
| grTooltipFormatCrosshairHeader | Defines the format of the chart crosshair header. | grTooltipFormatHeatMap | Defines the tooltip format in a Heatmap chart.
| grTooltipFormatPie | Defines the tooltip format in a Pie chart. | grTooltipFormatRangeArea | Defines the tooltip format in a Range Area chart.
| grTooltipFormatScatter | Defines the tooltip format in a Scatter chart.
| grTooltipFormatStock | Defines the tooltip format in a Stock chart.
| grTooltipFormatWaffle | Defines the tooltip format in a Waffle chart. |
Displaying and customizing the tooltip associated with a point Hide the details
grTooltip(<Chart name> , <Series number> , <Category number> , <Tooltip value>)
<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.
<Series number>: Integer Number of the series to use. <Category number>: Integer Number of the category to use. <Tooltip value>: Character string Custom text of the tooltip associated with the point. Remarks Tooltip options to configure | | | Constant | Effect | Option value |
---|
grShowTooltip | Enables or disables the tooltip. | Boolean- True (by default) to enable the tooltip,
- False to disable the tooltip.
Caution: tooltip parameters are not reset on display. | grTooltipFormat | Defines the tooltip format. | Character string- Empty string to use the default format.
- Combination of the following strings:
[%SERIE%]: Displays the series label (defined with the grSeriesLabel function).. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%VALUE%]: Displays the value Example: "[%VALUE%]"+CR+"[%CATEGORY%]" The default format is: "[%CATEGORY%]"+RC+"[%SERIES%]"+"="+"[%VALUE%]". | grTooltipFormatStock | Defines the tooltip format in a Stock chart. | Character string- Empty string to use the default format.
- Combination of the following strings:
[%SERIE%]: Displays the series label (defined with the grSeriesLabel function).. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%MAX%]: Displays the session's maximum value. [%MIN%]: Displays the session's minimum value. [%DEBUT%]: Displays the first value of the session. [%FIN%]: Displays the session end value. By default, the format is as follows: "[%CATEGORY%]"+CR+"Min.=[%MIN%]"+CR+"Max.=[%MAX%]"+CR+"Open=[%OPEN%]"+CR+"Close=[%CLOSE%]" | grTooltipFormatRadialBar | Defines the tooltip format in a Radial Bar chart. | Character string
- Empty string to use the default format.
- Combination of the following strings:
[%SERIE%]: Displays the series label (defined with the grSeriesLabel function).. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%VALUE%]: Displays the value [%%%]: Displays the percentage Exemple: "[%VALEUR%]"+RC+"[%CATEGORIE%]"+RC+"[%%%]" The default format is "[%CATEGORY%]"+RC+"[%VALUE%]"+RC+"[%%%]". | grTooltipFormatCrosshairHeader | Defines the format of the chart crosshair header. | Character string- Empty string to use the default format.
- Character string containing the following string:
[%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. The default format is "[%CATEGORY%]".
Stacked histogram: You can add the stack total to the tooltip of a stacked histogram using the following syntax:
grTooltip(MySelf, grTooltipFormatCrosshairHeader, ...
"[%CATEGORIE%], Somme = [%VALEUR%]")
| grTooltipFormatBubbleChart | Defines the tooltip format in a Bubble chart. | Character string- Empty string to use the default format.
- Combination of the following strings:
[%SERIE%]: Displays the series label (defined with the grSeriesLabel function).. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%X%]: Displays abscissa (first series) [%Y%]: Displays ordinate (second series) [%Z%]: Displays the value of the third series.. The default format is "([%X%];[%Y%]): [%Z%]"+RC+"[%CATEGORY%]". | grTooltipFormatScatter | Defines the tooltip format in a Scatter chart. | Character string- Empty string to use the default format.
- Combination of the following strings:
[%SERIE%]: Displays the series label (defined with the grSeriesLabel function).. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%X%]: Displays abscissa. The default format is "[%X%]"+RC+"[%Y%]"+RC+"[%SERIE%]"+RC+"[%CATEGORIE%]". | grTooltipFormatHeatMap | Defines the tooltip format in a Heatmap chart. | Character string- Empty string to use the default format.
- Combination of the following strings:
[%SERIE%]: Displays the series label (defined with the grSeriesLabel function).. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%X%]: Displays abscissa (first series) [%Y%]: Displays ordinate (second series) [%Z%]: Displays the value of the third series.. The default format is "([%X%];[%Y%]): [%Z%]"+RC+"[%CATEGORY%]". | grTooltipFormatPie | Defines the tooltip format in a Pie chart. | Character string
- Empty string to use the default format.
- Combination of the following strings:
[%SERIE%]: Displays the series label (defined with the grSeriesLabel function).. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%VALUE%]: Displays the value [%%%]: Displays the percentage Exemple: "[%VALEUR%]"+RC+"[%CATEGORIE%]"+RC+"[%%%]" The default format is "[%CATEGORY%]"+RC+"[%VALUE%]"+RC+"[%%%]". | grTooltipFormatWaffle | Defines the tooltip format in a Waffle chart. | Character string
- Empty string to use the default format.
- Combination of the following strings:
[%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. [%VALUE%]: Displays the value [%%%]: Displays the percentage Exemple: "[%VALEUR%]"+RC+"[%CATEGORIE%]"+RC+"[%%%]" The default format is "[%CATEGORY%]"+RC+"[%VALUE%]"+RC+"[%%%]". | grTooltipFormatRangeArea | Defines the tooltip format in a Range Area chart. | Character string
- Empty string to use the default format.
- Combination of the following strings:
[%DEBUT%]: Displays interval start value. [%FIN%]: Displays end of interval value. [%CATEGORY%]: Displays the category label (defined with the grCategoryLabel function).. Example: "[%OPEN%]"+CR+"[%CLOSE%]"+CR+"[%CATEGORY%]" The default format is: "[%DEBUT%]"+RC+"[%FIN%] |
If the default format is used: - "[%CATEGORY%]" is ignored if no category label was specified by grCategoryLabel.
- "[%SERIES%]" is ignored if no series label was specified with grSeriesLabel.
Warning: If you use dynamic string construction (option "Allow "[% %]" in strings" in the "Compilation" tab of the project description), a compilation error will appear (unknown identifier).. In this case, each string must be preceded by '-%'. Example:
grTooltip(GRF_Echéance, grTooltipFormat, "[%CATEGORIE%]" + CR + CR+ "[%VALEUR%]" + " H")
becomes
grTooltip(GRF_Echéance, grTooltipFormat, -%"[%CATEGORIE%]" + CR + CR + -%"[%VALEUR%]" + " H")
Enabling/Disabling the tooltip The tooltip activation/deactivation ( grShowTooltip constant) takes effect only when grDraw is executed. Formatting the elements displayed in the tooltip To format the values displayed in the tooltip (value and percentage), use grMask. Business / UI classification: UI Code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|