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

TdxChartAxisValueLabelsAppearance Class

Stores axis value appearance settings.

#Declaration

Delphi
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.

VCL Chart Control: Value Labels on X and Y Axes

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

VCL Chart Control: An Axis Value Label Customization Example

#Direct TdxChartAxisValueLabelsAppearance Class References

The TdxChartAxisValueLabels.Appearance property references a TdxChartAxisValueLabelsAppearance object.

See Also