Back to Devexpress

TdxChartCustomAxis.Interlaced Property

vcl-dxchartxydiagram-dot-tdxchartcustomaxis-72cdb8cc.md

latest3.1 KB
Original Source

TdxChartCustomAxis.Interlaced Property

Specifies if the axis applies interlacing to its diagram.

Declaration

delphi
property Interlaced: Boolean read; write; default False;

Property Value

TypeDefaultDescription
BooleanFalse

True if the axis highlights all interlaced diagram areas bound by major grid lines; otherwise, False.

|

Remarks

Set the Interlaced property to True to highlight all interlaced diagram areas associated with the axis according to settings accessible through the Appearance.InterlacedFillOptions property. Like grid lines, interlacing can improve chart readability.

The Interlaced property’s default value is False.

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:

delphi
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;
cpp
TdxChartXYDiagram *ADiagram;
  // ...
  if(dxChartControl1->DiagramCount == 0) { return; }
  ADiagram = dynamic_cast<TdxChartXYDiagram*>(dxChartControl1->Diagrams[0]);
  ADiagram->BeginUpdate();
  try
  {
    ADiagram->Axes->AxisX->ValueLabels->Angle = 45;
    ADiagram->Axes->AxisX->ValueLabels->Appearance->FontOptions->Style = TFontStyles() << 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();
  }

See Also

TdxChartCustomAxis.Ticks Property

TdxChartCustomAxis Class

TdxChartCustomAxis Members

dxChartXYDiagram Unit