Skip to main content

XYDiagramSeriesViewBase.FirstPoint Property

Specifies settings for the first series point.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Elements)]
[XtraSerializableProperty(XtraSerializationVisibility.Content, true)]
public SidePoint FirstPoint { get; set; }

Property Value

Type Description
SidePoint

A SidePoint object that contains settings for the first series point.

Remarks

FirstPoint specifies how the chart displays the first point and its related visual elements.

The FirstPoint.LabelDisplayMode property defines how to display the point’s label.

The following values are available:

Value

Description

Example

Default

The label uses common label settings.

DiagramEdge

The control displays the label at the diagram edge. The SidePoint.Label property specifies appearance settings.

SeriesPoint

The control shows the label next to the series point. If the label should be outside a visual area when zooming or scrolling, the label is displayed at the diagram’s edge. The SidePoint.Label property specifies appearance settings.

Use the FirstPoint.Label property to customize label’s text color, background color, border options, text pattern, and other settings. Refer to the SeriesLabelBase’s Properties page for a list of available options.

You can specify how to display markers in series that support markers (for example, Lines or Points). To do this, cast FirstPoint to the SidePointMarker type.

The SidePointMarker.MarkerDisplayMode property defines how to display the marker. To show the marker on the first series point, set SidePointMarker.MarkerDisplayMode to SidePointDisplayMode.SeriesPoint. To display it on the diagram’s edge, set SidePointMarker.MarkerDisplayMode to SidePointDisplayMode.DiagramEdge.

Example

This example demonstrates how to customize the first series point.

To show its label, set the FirstPoint.LabelDisplayMode property to SeriesPoint.

The code below specifies the following label settings:

Set SidePointMarker.MarkerDisplayMode to SeriesPoint to display the first point marker. Set View.MarkerVisibility to False to hide other markers.

LineSeriesView seriesView = (LineSeriesView)chartControl1.Series[0].View;
seriesView.MarkerVisibility = DevExpress.Utils.DefaultBoolean.False;
seriesView.FirstPoint.LabelDisplayMode = SidePointDisplayMode.SeriesPoint;

seriesView.FirstPoint.Label.BackColor = Color.LightGray;
seriesView.FirstPoint.Label.Border.Color = Color.Red;
seriesView.FirstPoint.Label.Border.Thickness = 2;
seriesView.FirstPoint.Label.TextColor = Color.Red;
seriesView.FirstPoint.Label.TextPattern = "{V:F2}";

SidePointMarker firstPointMarker = (SidePointMarker)seriesView.FirstPoint;
firstPointMarker.MarkerDisplayMode = SidePointDisplayMode.SeriesPoint;
See Also