menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ConnectorLineStyle - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ConnectorLineStyle

    The ConnectorLineStyle class is used to customize the appearance of the data label connector line when data labels are placed outside.

    Inheritance
    System.Object
    ChartLineStyle
    ConnectorLineStyle
    Inherited Members
    ChartLineStyle.Stroke
    ChartLineStyle.StrokeDashArray
    ChartLineStyle.StrokeDashArrayProperty
    ChartLineStyle.StrokeProperty
    ChartLineStyle.StrokeWidth
    ChartLineStyle.StrokeWidthProperty
    Namespace: Syncfusion.Maui.Charts
    Assembly: Syncfusion.Maui.Charts.dll
    Syntax
    public class ConnectorLineStyle : ChartLineStyle, IThemeElement
    Remarks

    To customize connector lines, create an instance of the ConnectorLineStyle class, and set it to the ConnectorLineSettings property of the CircularDataLabelSettings.

    # [Xaml](#tab/tabid-1)
       <chart:SfCircularChart>
          <chart:PieSeries ItemsSource ="{Binding Data}" 
                           XBindingPath="XValue" 
                           YBindingPath="YValue"
                           ShowDataLabels="True">
          <chart:PieSeries.DataLabelSettings>
               <chart:CircularDataLabelSettings LabelPosition="Outside" >
                   <chart:CircularDataLabelSettings.ConnectorLineSettings>
                      <chart:ConnectorLineStyle Stroke="Red" StrokeWidth="2" />
                   </chart:CircularDataLabelSettings.ConnectorLineSettings>
               </chart:CircularDataLabelSettings>
           </chart:PieSeries.DataLabelSettings>
          </chart:PieSeries>
       </chart:SfCircularChart>
    # [C#](#tab/tabid-2)
        SfCircularChart chart = new SfCircularChart();
        ViewModel viewModel = new ViewModel();
    
    PieSeries series = new PieSeries()
    {
       ItemsSource = viewModel.Data,
       XBindingPath = &quot;XValue&quot;,
       YBindingPath = &quot;YValue&quot;,
       ShowDataLabels = true,
    };
    
    var connectorLineStyle = new ConnectorLineStyle
    {
      Stroke = new SolidColorBrush(Colors.Red),
      StrokeWidth = 2
    };
    series.DataLabelSettings = new CircularDataLabelSettings()
    {
      LabelPosition=&quot;Outside&quot;
      ConnectorLineSettings = connectorLineStyle
    };
    
    chart.Series.Add(series);</code></pre>
    

    Constructors

    ConnectorLineStyle()

    Declaration
    public ConnectorLineStyle()

    Fields

    ConnectorTypeProperty

    Identifies the ConnectorType bindable property.

    Declaration
    public static readonly BindableProperty ConnectorTypeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    Properties

    ConnectorType

    Gets or sets a value that specifies the connector type.

    Declaration
    public ConnectorType ConnectorType { get; set; }
    Property Value
    Type Description
    ConnectorType

    It accepts ConnectorType values and its default value is Line.

    Examples
    • Xaml
    • C#
        <chart:SfCircularChart>
               <chart:PieSeries ItemsSource="{Binding Data}"                                                         
                                XBindingPath="Product"
                                YBindingPath="SalesRate"
                                ShowDataLabels="True">
                   <chart:PieSeries.DataLabelSettings>
                       <chart:CircularDataLabelSettings LabelPlacement="Outer" ConnectorType="Curve"/>
                   </chart:PieSeries.DataLabelSettings>
               </chart:PieSeries>
         </chart:SfCircularChart>
        SfCircularChart chart = new SfCircularChart();
        PieSeries series = new PieSeries();
        series.ItemsSource = new ViewModel().Data;
        series.XBindingPath = "Product";
        series.YBindingPath = "SalesRate";
        series.ShowDataLabels = true;
        series.DataLabelSettings = new CircularDataLabelSettings()
        {
           ConnectorType = ConnectorType.Curve,
           LabelPlacement = DataLabelPlacement.Outer
        };
        chart.Series.Add(series);
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved