Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxChartAxisValueLabels.Appearance Property

Provides access to appearance settings of value labels.

#Declaration

Delphi
property Appearance: TdxChartAxisValueLabelsAppearance read; write;

#Property Value

Type Description
TdxChartAxisValueLabelsAppearance

Stores appearance settings of value labels.

#Remarks

You can use Appearance.FontOptions and Appearance.TextColor properties to change the appearance of label inscriptions.

Refer to the TdxChartAxisValueLabelsAppearance class description for detailed information on all available options.

#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;

VCL Chart Control: An Axis Value Label Customization Example

See Also