New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Configures font, color, margin, and padding for chart text elements. Supports serialization for client-side rendering.

Definition

Constructors

Initializes a new instance of the TextStyle class with specified font size and family.

C#
public TextStyle(Unit defaultFontSize, string defaultFontFamily)
Parameters:defaultFontSizeUnit

The default font size.

defaultFontFamilystring

The default font family.

Properties

Gets or sets a value that indicates whether the font is bold.

C#
public bool Bold { get; set; }

Gets or sets the text color.

C#
[TypeConverter(typeof(ColorConverter))]
public Color Color { get; set; }

Gets or sets the font family.

C#
public string FontFamily { get; set; }

Gets or sets the font size.

C#
public Unit FontSize { get; set; }

Gets or sets a value that indicates whether the font is italic.

C#
public bool Italic { get; set; }

Gets or sets the padding of the text in pixels.

C#
public string Padding { get; set; }

Methods

C#
protected override string Serialize()
Returns:

string

Overrides: TextStyleBase.Serialize()