|
|
|
|
|
- Overview
- Implementation
- Crosshair in a Chart control
- Modifying the multiple crosshair programmatically
- Configuring the crosshair options programmatically
In a Line chart, it may be difficult to read the value of axes for a point that is far from these axes. Via the new crosshair included in all charts, the end user precisely knows the pointed value. All charts with axes automatically benefit from the crosshair. The user hovers a point in the chart and the crosshair is displayed! If the Vertical crosshairs intersect several curves, they display the value at each intersection: this is the multiple crosshairs.. For a multiple crosshair, the tooltip header can be customized. Crosshair in a Chart control The crosshair is available by default for all Chart controls created from version 20. To display a crosshair in a Chart control: - Open the Chart control description window.
- In the "Details" tab:
 in the "Interactivity" area, check (if necessary) "Interactive chart" then check "Enable the chart crosshair". The "Multiple crosshair" option allows you to get a multiple crosshair in the Line or Column charts.
Only the interactive Chart controls are available in PHP.
- Validate the control description window.
Remarks: - The crosshairs are available for the following graph types: Area, Bubble, Curve, Column chart, MinMax, Radar and Waterfall.
 You can define the characteristics of the crosshairs in the "Style" tab of the Chart control: color, opacity and thickness..
Modifying the multiple crosshair programmatically By default, the multiple crosshair displays: - in header, the category name.
- the content of different tooltips for the points corresponding to the crosshair.
It is possible to modify the header of the crosshair tooltip via grTooltip associated with the grTooltipFormatCrosshairHeader constant. For example: grTooltip(GRF_Graphe1, grTooltipFormatCrosshairHeader, "Catégorie: [%CATEGORIE%]")
Configuring the crosshair options programmatically The crosshair has the following characteristics by default: - color based on the color of gridlines in the Chart control.
- thickness: 1 pixel.
- Opacity: completely opaque crosshairs.
These characteristics can be modified by the following properties:
| | CrosshairColor | The CrosshairColor property gets and sets the color of the crosshair in a Chart control. | CrosshairOpacity | The CrosshairOpacity property is used to determine and change the opacity of the crosshair in a Chart control. | CrosshairThickness | The CrosshairThickness property is used to determine and change the thickness of the crosshair in a Chart control. |
Related Examples:
|
Training (WINDEV): WD Chart
[ + ] This example presents the different uses of the Chart control. Different types of charts are presented: - Pie - Sunburst - Line - Scatter - Column - Area - etc. The main features presented here are the possibility to customize of charts from the code, as well as to fill the chart from an HFSQL data file, or in the editor.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|