PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Handling the category labels
  • Initializing the fonts
  • Orientation of the font
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
Modifies the font used for the category labels of a chart.
Category label
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Modify the font of labels for the axes of Chart control: CHART_Chart
 
// Create a specific font
fntLabel is Font
fntLabel..Name = "Verdana"
fntLabel..Size = 10
fntLabel..Bold = True
 
// Change the font
CHART_Chart.LabelFont(fntLabel)
CHART_Chart.Draw()
Syntax

Defining the font used for the chart labels Hide the details

<Chart control>.LabelFont(<Font used>)
<Chart control>: Control name
Name of the Chart control found in the report editor.
<Font used>: Font
Font to use. This parameter corresponds to a Font variable. The font characteristics have been defined by FontCreate or via the properties for font management.

Defining the font used for the chart labels (syntax kept for backward compatibility) Hide the details

<Chart control>.LabelFont(<Font identifier>)
<Chart control>: Control name
Name of the Chart control found in the report editor.
<Font identifier>: Integer
Font identifier, defined by grCreateFont. A WLanguage error occurs if this font does not exist.
Remarks

Handling the category labels

The category labels are displayed:
  • below the horizontal marks for the Line charts and Stock charts (Candlestick and BarCharts),
  • below the X axis for the column charts and MinMax charts.
Category label
The category labels cannot be used with the Scatter charts.
The category labels are defined by <Chart>.CategoryLabel.
The label font can be modified by <Chart>.LabelFont.
The category labels defined by <Chart>.CategoryLabel can be displayed in the caption of the Pie chart (grShowLabel constant used with <Chart>.Label).

Initializing the fonts

The default font used for the labels has the following characteristics:
  • Font name: Arial
  • Size: 14
  • Style: Normal
  • Color: Black

Orientation of the font

For the labels of a chart, the "orientation" property of the font is ignored.
To change the orientation of the font in the labels, the description of the Chart control must be modified in the 7-tab window.
By default, the orientation is automatically chosen. This orientation takes into account the size and the number of labels to display.
Related Examples:
The Chart functions Unit examples (WEBDEV): The Chart functions
[ + ] This example presents the main features of the chart designer of WEBDEV and it allows you to:
- Create a chart: Pie, Column or Line
- Define the display area of a chart
- Define the options of the chart (legend, percentage, ...)
The Chart functions Unit examples (WINDEV Mobile): The Chart functions
[ + ] Using the Chart functions:
- create a Pie, Column or Line chart by programming
- define the chart options (legend, percentage, ...)
Component : wd240grf.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment