- 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 chart section (section for a Pie chart, bar for a Column chart, etc.). Also allows you to find out the characteristics of the tooltip associated with each chart section.
Versions 23 and latera custom tooltip, associated with a point. New in version 23a custom tooltip, associated with a point. 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. Versions 19 and later New in version 19 Versions 23 and later New in version 23
// Chart control // Display the percentages on a column chart grLabel(CHART_MyChart, grShowPercent, True) grTooltip(CHART_MyChart, grTooltipFormat, "[%SERIES%]" + CR + "[%CATEGORY%]" + CR + "[%VALUE%]") grTooltip(CHART_MyChart, grShowTooltip, True) // Draw the chart grDraw(CHART_MyChart)
Versions 23 and later
// Chart control // Display a specific tooltip for a point grTooltip(CHART_MyChart, 1, 2, "The tooltip content") // Draw the chart grDraw(CHART_MyChart)
New in version 23
// Chart control // Display a specific tooltip for a point grTooltip(CHART_MyChart, 1, 2, "The tooltip content") // Draw the chart grDraw(CHART_MyChart)
// Chart control // Display a specific tooltip for a point grTooltip(CHART_MyChart, 1, 2, "The tooltip content") // Draw the chart grDraw(CHART_MyChart)
Syntax
Displaying and formatting the tooltip associated with a chart Hide the details
grTooltip(<Chart name> , <Tooltip option to configure> , <Value of tooltip option>)
Finding out the characteristics of tooltip associated with a chart Hide the details
<Result> = grTooltip(<Chart name> , <Tooltip option>)
Versions 23 and later
Displaying and customizing the tooltip associated with a point Hide the details
grTooltip(<Chart name> , <Series number> , <Category number> , <Tooltip value>)
<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.
<Series number>: Integer Number of the series to use. <Category number>: Integer Number of the category to use. <Tooltip value>: Character string (with quotes) Custom text of tooltip associated with the point. New in version 23
Displaying and customizing the tooltip associated with a point Hide the details
grTooltip(<Chart name> , <Series number> , <Category number> , <Tooltip value>)
<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.
<Series number>: Integer Number of the series to use. <Category number>: Integer Number of the category to use. <Tooltip value>: Character string (with quotes) Custom text of tooltip associated with the point.
Displaying and customizing the tooltip associated with a point Hide the details
grTooltip(<Chart name> , <Series number> , <Category number> , <Tooltip value>)
<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.
<Series number>: Integer Number of the series to use. <Category number>: Integer Number of the category to use. <Tooltip value>: Character string (with quotes) Custom text of tooltip associated with the point. Remarks Tooltip options to configure | | | Constant | Effect | Value of option |
---|
grShowTooltip | Enables or disables the tooltip. | Boolean- True (by default) to enable the tooltip,
- False to avoid displaying it.
Caution: the parameters defined for the tooltip are not re-initialized during the display. | grTooltipFormat | Describes the tooltip format. | Character string- Empty string to use the default format.
- Combination of following strings:
[%SERIES%]: Displays the series caption (defined by grSeriesLabel). [%CATEGORY%]: Displays the category caption (defined by grCategoryLabel). [%VALUE%]: Displays the value Example: "[%VALUE%]"+CR+"[%CATEGORY%]" By default, the format is as follows: "[%CATEGORY%]"+CR+"[%SERIES%]"+"="+"[%VALUE%]" | grTooltipFormatStock | Describes the tooltip format for a Stock chart. | Character string- Empty string to use the default format.
- Combination of following strings:
[%SERIES%]: Displays the series caption (defined by grSeriesLabel). [%CATEGORY%]: Displays the category caption (defined by grCategoryLabel). [%MAX%]: Displays the maximum value of the session. [%MIN%]: Displays the minimum value of the session. [%START%]: Displays the first value of the session. [%END%]: Displays the end value of the session. By default, the format is as follows: "[%CATEGORY%]"+CR+"Min.=[%MIN%]"+CR+"Max.=[%MAX%]"+CR+"Start=[%START%]"+CR+"End=[%END%]" | Versions 20 and latergrTooltipFormatCrosshairHeader New in version 20grTooltipFormatCrosshairHeader grTooltipFormatCrosshairHeader | Describes the header format for the chart crosshairs. | Character string- Empty string to use the default format.
- Character string containing the following string:
[%CATEGORY%]: Displays the category caption (defined by grCategoryLabel). By default, the format is as follows: "[%CATEGORY%]"
Versions 22 and laterStacked Column chart: The total of stack can be added into the tooltip of a stacked column chart by using the following syntax:
grTooltip(MySelf, grTooltipFormatCrosshairHeader, ... "[%CATEGORY%], Sum = [%VALUE%]")
New in version 22Stacked Column chart: The total of stack can be added into the tooltip of a stacked column chart by using the following syntax:
grTooltip(MySelf, grTooltipFormatCrosshairHeader, ... "[%CATEGORY%], Sum = [%VALUE%]")
Stacked Column chart: The total of stack can be added into the tooltip of a stacked column chart by using the following syntax:
grTooltip(MySelf, grTooltipFormatCrosshairHeader, ... "[%CATEGORY%], Sum = [%VALUE%]")
| Versions 16 and latergrTooltipFormatBubbleChart New in version 16grTooltipFormatBubbleChart grTooltipFormatBubbleChart | Describes the tooltip format for a bubble chart. | Character string- Empty string to use the default format.
- Combination of following strings:
[%SERIES%]: Displays the series caption (defined by grSeriesLabel). [%CATEGORY%]: Displays the category caption (defined by grCategoryLabel). [%X%]: Displays the X coordinate (first series) [%Y%]: Displays the Y coordinate (second series) [%Z%]: Displays the value of the third series. By default, the format is as follows: "([%X%];[%Y%]): [%Z%]"+CR+"[%CATEGORY%]" | grTooltipFormatScatter | Describes the tooltip format for a Scatter chart. | Character string- Empty string to use the default format.
- Combination of following strings:
[%SERIES%]: Displays the series caption (defined by grSeriesLabel). [%CATEGORY%]: Displays the category caption (defined by grCategoryLabel). [%X%]: Displays the X coordinate. By default, the format is as follows: "[%X%]"+CR+"[%Y%]"+CR+"[%SERIES%]"+CR+"[%CATEGORY%]" | Versions 21 and latergrTooltipFormatHeatMap New in version 21grTooltipFormatHeatMap grTooltipFormatHeatMap | Describes the tooltip format for a Heatmap chart. | Character string- Empty string to use the default format.
- Combination of following strings:
[%SERIES%]: Displays the series caption (defined by grSeriesLabel). [%CATEGORY%]: Displays the category caption (defined by grCategoryLabel). [%X%]: Displays the X coordinate (first series) [%Y%]: Displays the Y coordinate (second series) [%Z%]: Displays the value of the third series. By default, the format is as follows: "([%X%];[%Y%]): [%Z%]"+CR+"[%CATEGORY%]" | grTooltipFormatPie | Describes the tooltip format for a Pie chart. | Character string
- Empty string to use the default format.
- Combination of following strings:
[%SERIES%]: Displays the series caption (defined by grSeriesLabel). [%CATEGORY%]: Displays the category caption (defined by grCategoryLabel). [%VALUE%]: Displays the value [%%%]: Displays the percentage Example: "[%VALUE%]"+CR+"[%CATEGORY%]"+CR+"[%%%]" By default, the format is as follows: "[%CATEGORY%]"+CR+"[%VALUE%]"+CR+"[%%%]" |
If the default format is used: - "[%CATEGORY%]" is ignored if no category caption was specified by grCategoryLabel.
- the "[%SERIES%]" string is ignored if no series caption was specified with grSeriesLabel.
Versions 22 and laterCaution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
grTooltip(CHART_Deadline, grTooltipFormat, "[%CATEGORY%]" + CR + CR+ "[%VALUE%]" + " H")
becomes
grTooltip(CHART_Deadline, grTooltipFormat, -%"[%CATEGORY%]" + CR + CR + -%"[%VALUE%]" + " H")
New in version 22Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
grTooltip(CHART_Deadline, grTooltipFormat, "[%CATEGORY%]" + CR + CR+ "[%VALUE%]" + " H")
becomes
grTooltip(CHART_Deadline, grTooltipFormat, -%"[%CATEGORY%]" + CR + CR + -%"[%VALUE%]" + " H")
Caution: If you are using the dynamic construction of strings ("Allow "[% %]" in the strings" option in the "Compilation" tab of project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
grTooltip(CHART_Deadline, grTooltipFormat, "[%CATEGORY%]" + CR + CR+ "[%VALUE%]" + " H")
becomes
grTooltip(CHART_Deadline, grTooltipFormat, -%"[%CATEGORY%]" + CR + CR + -%"[%VALUE%]" + " H")
Enabling/Disabling the tooltip The tooltip activation/deactivation ( grShowTooltip constant) is taken into account when running grDraw. 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…
|
|
|