|
|
|
|
|
- Handling the category labels
- Initializing fonts
- Orientation of the font
grLabelFont (Function) In french: grPoliceEtiquette Modifies the font used for the category labels of a chart.
// 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 grLabelFont(CHART_Chart, fntLabel) grDraw(CHART_Chart) // Use the syntax kept for backward compatibility // Modify the font used for the labels of "MyChart" // The identifier of font used is 7 grLabelFont("MyChart", 7)
Syntax
Defining the font used for the chart labels Hide the details
grLabelFont(<Chart name> , <Font used>)
<Chart name>: Control name or character string Name of the chart to be used. This name corresponds to:- the chart name defined through programming with grCreate.
- the name of Chart control found in the report editor.
<Font used>: Font Font to use. This parameter corresponds to a variable of type Font. The font characteristics have been defined with FontCreate or via the font properties.
Defining the font used for the chart labels (syntax kept for backward compatibility) Hide the details
grLabelFont(<Chart name> , <Font identifier>)
<Chart name>: Control name or character string Name of the chart to be used. This name corresponds to:- the chart name defined through programming with grCreate.
- the name of 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 Line and Stock charts (Candlestick and BarCharts),
- below the X-axis for Column and MinMax charts.
Category labels cannot be used in Scatter charts. The label font can be modified by grLabelFont. The category labels defined by grCategoryLabel can be displayed in the caption of the Pie chart ( grShowLabel constant used with grLabel). Initializing fonts The default font used for the labels has the following characteristics: - Font name: Arial
- Size: 14
- Style: Normal
- Color: Black
When grCreate is used, the default font is used for the labels. 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:
|
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, ...)
|
|
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, ...)
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|