ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Tooltip options to configure
  • Enabling/Disabling the tooltip
  • Formatting the elements displayed in the tooltip
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
  • 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.
Example
// Champ Graphe
// Affichage des pourcentages sur un histogramme
GRF_MonGraphe.Libellé(grShowPercent, True)
GRF_MonGraphe.Bulle(grTooltipFormat, -%"[%SERIE%]" + CR + -%"[%CATEGORIE%]" + CR + -%"[%VALEUR%]")
GRF_MonGraphe.Bulle(grShowTooltip, True)
// Dessin du graphe
GRF_MonGraphe.Dessine()
// Champ Graphe
// Affichage d'une bulle spécifique pour un point
GRF_MonGraphe.Bulle(1, 2, "Le contenu de ma bulle d'aide")
// Dessin du graphe
GRF_MonGraphe.Dessine()
Syntax

Displaying and formatting the tooltip associated with a Chart control Hide the details

<Chart control>.Tooltip(<Tooltip option to configure> , <Tooltip option value>)
<Chart control>: Control name
Name of the Chart control to use (in the window editor).
<Tooltip option to configure>: Integer constant
Enables or disables the tooltip and configures its characteristics.
grShowTooltipEnables or disables the tooltip.
grTooltipFormatDescribes the tooltip format.
grTooltipFormatBubbleChartDescribes the tooltip format for a Bubble chart.
grTooltipFormatCrosshairHeaderDescribes the header format for the chart crosshairs.
grTooltipFormatHeatMapDescribes the tooltip format for a Heatmap chart.
grTooltipFormatPieDescribes the tooltip format for a Pie chart.
grTooltipFormatRangeAreaDescribes the tooltip format for a Range Area chart.
grTooltipFormatScatterDescribes the tooltip format for a Scatter chart.
grTooltipFormatStockDescribes the tooltip format for a Stock chart.
New in version 2024
grTooltipFormatWaffle
Describes the tooltip format for a Waffle graph.
<Tooltip option value>: Character string or boolean
Option value for the selected tooltip. This value depends on the selected option (see the above table).

Finding out the characteristics of tooltip associated with a Chart control Hide the details

<Result> = <Chart control>.Tooltip(<Tooltip option>)
<Result>: Type corresponding to the option (boolean or character string)
Value of the sought option.
<Chart control>: Control name
Name of the Chart control to use (in the window editor).
<Tooltip option>: Integer constant
Tooltip option whose value is requested.
grShowTooltipEnables or disables the tooltip.
grTooltipFormatDescribes the tooltip format.
grTooltipFormatBubbleChartDescribes the tooltip format for a Bubble chart.
grTooltipFormatCrosshairHeaderDescribes the header format for the chart crosshairs.
grTooltipFormatHeatMapDescribes the tooltip format for a Heatmap chart.
grTooltipFormatPieDescribes the tooltip format for a Pie chart.
grTooltipFormatRangeAreaDescribes the tooltip format for a Range Area chart.
grTooltipFormatScatterDescribes the tooltip format for a Scatter chart.
grTooltipFormatStockDescribes the tooltip format for a Stock chart.
New in version 2024
grTooltipFormatWaffle
Describes the tooltip format for a Waffle graph.

Displaying and customizing the tooltip associated with a point Hide the details

<Chart control>.grTooltip(<Series number> , <Category number> , <Tooltip value>)
<Chart control>: Control name
Name of the Chart control to use (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 tooltip associated with the point.
Remarks

Tooltip options to configure

ConstantEffectOption value
grShowTooltipEnables 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.
grTooltipFormatDescribes the tooltip format.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%SERIES%]: Displays the series label (defined by <Chart>.SeriesLabel).
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%VALUE%]: Displays the value
    Example: "[%VALUE%]"+CR+"[%CATEGORY%]"
By default, the format is as follows: "[%CATEGORY%]"+CR+"[%SERIES%]"+"="+"[%VALUE%]"
grTooltipFormatStockDescribes the tooltip format for a Stock chart.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%SERIES%]: Displays the series label (defined by <Chart>.SeriesLabel).
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%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%]"
grTooltipFormatRadialBarDescribes the tooltip format for a Radial Bar chart.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%SERIES%]: Displays the series label (defined by <Chart>.SeriesLabel).
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%VALUE%]: Displays the value
    [%%%]: Displays the percentage
    Example: "[%VALUE%]"+CR+"[%CATEGORY%]"+CR+"[%%%]"
By default, the format is as follows: "[%CATEGORY%]"+CR+"[%VALUE%]"+CR+"[%%%]"
grTooltipFormatCrosshairHeaderDescribes 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 label (defined by <Chart>.CategoryLabel).
By default, the format is as follows: "[%CATEGORY%]" Stacked Column chart: The total of stack can be added into the tooltip of a stacked column chart by using the following syntax:
GRF_MonGraphe.grBulle(grTooltipFormatCrosshairHeader, ...
"[%CATEGORIE%], Somme = [%VALEUR%]")
grTooltipFormatBubbleChartDescribes the tooltip format for a bubble chart.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%SERIES%]: Displays the series label (defined by <Chart>.SeriesLabel).
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%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%]"
grTooltipFormatScatterDescribes the tooltip format for a Scatter chart.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%SERIES%]: Displays the series label (defined by <Chart>.SeriesLabel).
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%X%]: Displays the X-coordinate.
By default, the format is as follows: "[%X%]"+CR+"[%Y%]"+CR+"[%SERIES%]"+CR+"[%CATEGORY%]"
grTooltipFormatHeatMapDescribes the tooltip format for a Heatmap chart. Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%SERIES%]: Displays the series label (defined by <Chart>.SeriesLabel).
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%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%]"
grTooltipFormatPieDescribes the tooltip format for a Pie chart.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%SERIES%]: Displays the series label (defined by <Chart>.SeriesLabel).
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%VALUE%]: Displays the value
    [%%%]: Displays the percentage
    Example: "[%VALUE%]"+CR+"[%CATEGORY%]"+CR+"[%%%]"
By default, the format is as follows: "[%CATEGORY%]"+CR+"[%VALUE%]"+CR+"[%%%]"
New in version 2024
grTooltipFormatWaffle
Describes the tooltip format for a Waffle graph.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    [%VALUE%]: Displays the value
    [%%%]: Displays the percentage
    Example: "[%VALUE%]"+CR+"[%CATEGORY%]"+CR+"[%%%]"
By default, the format is as follows: "[%CATEGORY%]"+CR+"[%VALUE%]"+CR+"[%%%]"
grTooltipFormatRangeAreaDescribes the tooltip format for a Range Area chart.Character string
  • Empty string to use the default format.
  • Combination of the following strings:
    [%START%]: Displays the start value of the interval.
    [%END%]: Displays the end value of the interval.
    [%CATEGORY%]: Displays the category label (defined by <Chart>.CategoryLabel).
    Example: "[%START%]"+CR+"[%END%]"+CR+"[%CATEGORY%]"
By default, the format is as follows: "[%START%]"+CR+"[%END%]

If the default format is used:Caution: If you use dynamic string construction ("Allow "[% %]" in strings" in the "Compilation" tab of the project description), a compilation error occurs (unknown identifier). In this case, each string must be preceded by '-%'. Example:
GRF_Echéance.Bulle(grTooltipFormat, "[%CATEGORIE%]" + CR + CR+ "[%VALEUR%]" + " H")
becomes
GRF_Echéance.Bulle(grTooltipFormat, -%"[%CATEGORIE%]" + CR + CR + -%"[%VALEUR%]" + " H")

Enabling/Disabling the tooltip

The tooltip activation/deactivation (grShowTooltip constant) takes effect only when <Chart>.Draw is executed.

Formatting the elements displayed in the tooltip

To format the values displayed in the tooltip (value and percentage), use <Chart>.Mask.
Component: wd290grf.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/21/2023

Send a report | Local help