TdxChartAxisValueLabelsAppearance Class
Stores axis value appearance settings.
#Declaration
TdxChartAxisValueLabelsAppearance = class(
TdxChartCustomLabelsAppearance
)
#Remarks
Value labels mark values on an axis. Use value label appearance settings to change font appearance, display label borders, and fill label areas.
#Main API Members
The list below outlines key members of the TdxChartAxisValueLabelsAppearance
class that allow you to customize value label appearance.
- Assign
- Copies value label appearance settings between axes.
- BeginUpdate | CancelUpdate | EndUpdate
- Allow you to avoid excessive redraw operations during batch label appearance changes.
- Border
- Specifies if value labels display borders.
- BorderColor | BorderThickness
- Change label border appearance.
- FontOptions | TextColor
- Allow you to customize label font settings.
- FillOptions
- Provides access to label background fill settings.
#Code Example: Customize Axis Appearance
The following code example applies identical value label appearance settings to the main X and Y axes in a diagram:
var
ADiagram: TdxChartXYDiagram;
begin
if dxChartControl1.DiagramCount = 0 then Exit;
ADiagram := dxChartControl1.Diagrams[0] as TdxChartXYDiagram;
ADiagram.BeginUpdate;
try
ADiagram.Axes.AxisX.ValueLabels.Angle := 45;
ADiagram.Axes.AxisX.ValueLabels.Appearance.FontOptions.Style := [fsBold, fsItalic];
ADiagram.Axes.AxisX.ValueLabels.Appearance.TextColor := TdxAlphaColors.Gray;
ADiagram.Axes.AxisY.Assign(ADiagram.Axes.AxisX); // Copies settings between axes
ADiagram.Axes.AxisY.Interlaced := False; // Restores the previous Interlaced property value
finally
ADiagram.EndUpdate;
end;
end;
#Direct TdxChartAxisValueLabelsAppearance Class References
The TdxChartAxisValueLabels.Appearance property references a TdxChartAxisValueLabelsAppearance
object.