Skip to content
Thomas Möller edited this page Apr 12, 2024 · 9 revisions

Class name

Font

Purpose / Description

This class contains methods and properties related to the font.

Methods

  • none

Properties


Detailed description

The following sections contain a detailed description of the methods and properties.

Color

Description:

With this property you can specify the font color. By default, the font color is black.

You can specify the background color in four ways:

  • rgba-code: rgba(77,22,66,0.5)
  • rgb-code: rgb(128,255,73)
  • hex-code: #FF77A1
  • color name: green

Default value:

{empty}, which leads to black

Sample code:

myChart.Chart.DataLabels.Font.Color = "red"

Related to:

Family, Size

Family

Description:

With this property you can specify the font family. By default, the font family is "Arial".

Default value:

{empty}, which leads to "Arial"

Sample code:

myChart.DataLabels.Font.Family = "Calibri"

Related to:

Color, Size

Size

Description:

With this property you can specify the font size. By default, the font size is 12.

Default value:

{empty}, which leads to 12

Sample code:

myChart.DataLabels.Font.Size = 14

Related to:

Family, Color

Style

Description:

With this property you can specify the font style. By default, it is 'fsUndefined'.

Possible values:

  • fsUndefined
  • fsNormal
  • fsItalic
  • fsOblique

Default value:

fsUndefined, which leads to fsNormal

Sample code:

myChart.DataLabels.Font.Style = fsItalic

Related to:

Family, Color

Weight

Description:

With this property you can specify the font weight (boldness). By default, it is 'fwUndefined'.

Possible values:

  • fwUndefined
  • fwThin
  • fwExtraLight
  • fwLight
  • fwNormal
  • fwMedium
  • fwSemiBold
  • fwBold
  • fwExtraBold
  • fwBlack

Default value:

fwUndefined, which leads to fwNormal

Sample code:

myChart.DataLabels.Font.Weight = fwBold

Related to:

Family, Color