PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Implementation
  • Crosshair in a Chart control
  • Crosshair in the AAFs (Automatic Application Features)
  • Modifying the multiple crosshair by programming
  • Configuring the crosshair options by programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
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!
Crosshair on a line
If the vertical crosshair crosses several lines, the value is displayed for each intersection: it is the multiple crosshair.
Multiple crosshair
For a multiple crosshair, the tooltip header can be customized.
Versions 23 and later
Android This feature is now available for the Android applications.
PHP This feature is now available for the PHP sites.
New in version 23
Android This feature is now available for the Android applications.
PHP This feature is now available for the PHP sites.
Android This feature is now available for the Android applications.
PHP This feature is now available for the PHP sites.
Implementation

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:
  1. Display the description window of Chart control.
  2. In the "Details" tab:
    • WINDEVAndroidiPhone/iPad in the "Zoom and crosshair" area, check "Enable the chart crosshair".
      The "Multiple crosshair" option allows you to get a multiple crosshair in the Line or Column charts.
    • WEBDEV - Server codePHP 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. PHP Only the interactive Chart controls are available in PHP.
  3. Validate the description window of control.
Notes:
  • The crosshair is available for the following types of charts: Area, Bubble, Line, Column, MinMax, Radar and Waterfall.
  • WEBDEV - Server codePHP The crosshair characteristics can be defined in the "Style" tab of Chart control: color, opacity and thickness.
WINDEV

Crosshair in the AAFs (Automatic Application Features)

If the crosshair is not enabled in a chart, it can be enabled by the user via the popup menu of chart ("Enable the crosshair").

Modifying the multiple crosshair by programming

By default, the multiple crosshair displays:
  • in header, the category name.
  • the content of different tooltips for the points corresponding to the crosshair.
The header of crosshair tooltip can be modified by grTooltip associated with the grTooltipFormatCrosshairHeader constant.
For example:
grTooltip(CHART_Chart1, grTooltipFormatCrosshairHeader, "Category: [%CATEGORY%]")

Configuring the crosshair options by programming

The crosshair has the following characteristics by default:
  • color based on the color of gridlines in the Chart control.
  • thickness: 1 pixel.
  • opacity: entirely opaque crosshair.
These characteristics can be modified by the following properties:
Versions 20 and later
CrosshairColor
New in version 20
CrosshairColor
CrosshairColor
..CrosshairColor is used to find out and modify the color of the crosshair for a Chart control.
Versions 20 and later
CrosshairOpacity
New in version 20
CrosshairOpacity
CrosshairOpacity
..CrosshairOpacity is used to find out and modify the opacity of the crosshair for a Chart control.
Versions 20 and later
CrosshairThickness
New in version 20
CrosshairThickness
CrosshairThickness
..CrosshairThickness is used to find out and modify the thickness of the crosshair for a Chart control.

Android The properties are not available.
Related Examples:
WD Chart Training (WINDEV): WD Chart
[ + ] This educational example present different uses of the chart control.
The following charts are presented:
- Semi-circular
- Donut
- Pie
- Sunburst
- Line
- Scatter
- 3D Scatter
- Column
- Area
- Bubble
- Radar
- Funnel
- Surface
- Waterfall
- Composite

The main features presented in this example are the ability to customize the charts by programming as well as the method used to fill a chart from a HFSQL file or in the editor.
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment