TXLSXChartTextStyle controls DrawingML text properties for chart titles, legend labels, axis titles and axis tick labels
Declaration
type
TXLSXChartTextStyle = class
property Name: WideString;
property Size: Double;
property Color: LongWord;
property HasColor: Boolean;
property Bold, Italic, Underline, Strikeout: Boolean;
property Rotation: Double;
procedure Assign(Source: TXLSXChartTextStyle);
procedure Clear;
procedure ClearColor;
function IsDefault: Boolean;
end;
Properties
| Name | Latin typeface name or theme font token |
| Size | Point size, where zero inherits the chart theme |
| Color and HasColor | Explicit RGB text colour and its presence flag |
| Bold, Italic, Underline and Strikeout | Typed emphasis switches written as DrawingML character properties |
| Rotation | Text rotation in degrees, serialized in native DrawingML angle units |
Usage
Chart-owned instances are available through TitleTextStyle and LegendTextStyle Axis-owned instances are available through TextStyle and TitleTextStyle
ClearColor returns colour selection to the chart theme without changing other text properties Clear returns the complete style to inherited defaults
Example
Chart.TitleTextStyle.Name := 'Aptos Display';
Chart.TitleTextStyle.Size := 18;
Chart.TitleTextStyle.Color := $204080;
Chart.TitleTextStyle.Bold := True;
Chart.CategoryAxis.TextStyle.Rotation := -45;
See also