NumericConstantLineCollection Class

The collection of NumericConstantLine objects.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll


public class NumericConstantLineCollection :

Returned By

Properties that return NumericConstantLineCollection instances:


A numeric constant line is a vertical or horizontal straight line that passes through the chart and indicates an x- or y-axis's value.

Numeric Constant Line Sample

Each axis can have any number of constant lines. A numeric axis (NumericAxisY or NumericAxisX ) holds its constant lines in the NumericConstantLineCollection collection which the NumericAxisY.ConstantLines or NumericAxisX.ConstantLines property returns.


This example shows how to add a constant line to a numeric y-axis, customize its appearance and show it in the chart legend. To do this, add a NumericConstantLine object with the specified properties to the NumericAxisY.ConstantLines collection.

NumericAxisY Constant Line

              <dxc:NumericConstantLine AxisValue="100" ShowBehind="False" 
                                       VisibleInLegend="True" LegendText="Constant Line Sample">
                  <!-- Customize the constant line title. -->
                      <dxc:ConstantLineTitle Text="Constant Line Sample" ShowBelowLine="True" Alignment="Far">
                                      <dxc:TextStyle Color="DarkBlue" Size="24"/>
                  <!-- Customize the constant line appearance. -->
                      <dxc:ConstantLineStyle Thickness="3"/>
See Also