Skip to main content
A newer version of this page is available. .

LineSeries.Label Property

Gets or sets the series label settings.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

NuGet Package: DevExpress.XamarinForms.Charts

Declaration

public MarkerSeriesLabel Label { get; set; }

Property Value

Type Description
MarkerSeriesLabel

An object that stores the series label settings.

Remarks

You can accompany line series’ data points with labels to show data point values as text on a chart:

Line Series Labels

To enable series labels, set the LineSeries.Label property to the MarkerSeriesLabel object, and use this object’s properties to adjust the label settings:

  • TextPattern - Formats series label text.
    A pattern includes regular text (which is displayed as is) and placeholder strings enclosed in braces. Placeholders define which values are shown in labels. You can use the following placeholders to specify the text pattern for line series’ labels:

    Placeholder

    Description

    {S}

    Displays a series name.

    {A}

    Displays a series point argument.

    {V}

    Displays a series point value.

    Note

    To format these values, you can use default format strings after the $ sign.
    For example, in the {V$#.##} string, V is a placeholder, $ is a format string separator, and #.## is a format string.

  • Angle , Indent - Specify how a label is positioned relative to a series point.
  • Style - Provides access to the SeriesLabelStyle object that stores label appearance settings (TextStyle).
  • Visible - Allows you to show or hide labels for the series.
<dxc:LineSeries>
    <dxc:LineSeries.Label>
        <dxc:MarkerSeriesLabel Angle="45" 
                               Indent="15" 
                               TextPattern="{}{V$##}M">
            <dxc:MarkerSeriesLabel.Style>
                <dxc:SeriesLabelStyle>
                    <dxc:SeriesLabelStyle.TextStyle>
                        <dxc:TextStyle Color="DarkBlue" Size="10"/>
                    </dxc:SeriesLabelStyle.TextStyle>
                </dxc:SeriesLabelStyle>
            </dxc:MarkerSeriesLabel.Style>
        </dxc:MarkerSeriesLabel>
    </dxc:LineSeries.Label>
</dxc:LineSeries>
See Also