Back to Devexpress

SidePoint.LabelDisplayMode Property

corelibraries-devexpress-dot-xtracharts-dot-sidepoint-cc18702e.md

latest7.4 KB
Original Source

SidePoint.LabelDisplayMode Property

Specifies how the label of a side series point is displayed.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public SidePointDisplayMode LabelDisplayMode { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property LabelDisplayMode As SidePointDisplayMode

Property Value

TypeDescription
SidePointDisplayMode

A SidePointDisplayMode enumeration value.

|

Available values:

NameDescription
Default

The label/marker uses common settings.

| | SeriesPoint |

The control shows the label/marker next to the series point. If the label/marker should be outside a visual area when zooming or scrolling, the label/marker is displayed at the diagram’s edge.

| | DiagramEdge |

The control displays the label/marker at the diagram edge.

|

Remarks

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.

|

|

Example

This example shows how to customize side series points.

Use the XYDiagramSeriesViewBase.FirstPoint and LastPoint properties to access side point options.

To show labels, set the SidePoint.LabelDisplayMode property to SeriesPoint.

The code below customizes the following options of the first label:

The last point label uses default settings.

csharp
LineSeriesView seriesView = (LineSeriesView)chartControl1.Series[0].View;

seriesView.FirstPoint.LabelDisplayMode = SidePointDisplayMode.SeriesPoint;
seriesView.LastPoint.LabelDisplayMode = SidePointDisplayMode.SeriesPoint;

seriesView.FirstPoint.Label.BackColor = Color.LightGray;
seriesView.FirstPoint.Label.LineColor = Color.Red;

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}";
vb
Dim seriesView As LineSeriesView = CType(chartControl1.Series(0).View, LineSeriesView)

seriesView.FirstPoint.LabelDisplayMode = SidePointDisplayMode.SeriesPoint
seriesView.LastPoint.LabelDisplayMode = SidePointDisplayMode.SeriesPoint

seriesView.FirstPoint.Label.BackColor = Color.LightGray
seriesView.FirstPoint.Label.LineColor = Color.Red

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}"

The following code snippets (auto-collected from DevExpress Examples) contain references to the LabelDisplayMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-charts-create-real-time-chart/CS/RealTimeChartUpdates/Form1.cs#L25

csharp
LineSeriesView seriesView = (LineSeriesView)series.View;
seriesView.LastPoint.LabelDisplayMode = SidePointDisplayMode.DiagramEdge;
seriesView.LastPoint.Label.TextPattern = "{V:f2}";

winforms-charts-create-real-time-chart-and-collect-data-in-separate-thread/CS/RealTimeChartUpdates/Form1.cs#L34

csharp
LineSeriesView seriesView = (LineSeriesView)series.View;
seriesView.LastPoint.LabelDisplayMode = SidePointDisplayMode.SeriesPoint;
seriesView.LastPoint.Label.TextPattern = "{V:f2}";

winforms-charts-create-real-time-chart/VB/RealTimeChartUpdates/Form1.vb#L30

vb
Dim seriesView As LineSeriesView = CType(series.View, LineSeriesView)
seriesView.LastPoint.LabelDisplayMode = SidePointDisplayMode.DiagramEdge
seriesView.LastPoint.Label.TextPattern = "{V:f2}"

winforms-charts-create-real-time-chart-and-collect-data-in-separate-thread/VB/RealTimeChartUpdates/Form1.vb#L45

vb
Dim seriesView As LineSeriesView = CType(series.View, LineSeriesView)
seriesView.LastPoint.LabelDisplayMode = SidePointDisplayMode.SeriesPoint
seriesView.LastPoint.Label.TextPattern = "{V:f2}"

See Also

FirstPoint

LastPoint

SidePoint Class

SidePoint Members

DevExpress.XtraCharts Namespace