alexa
Syncfusion
menu Syncfusion

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    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
    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
    Remarks

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

    • Xaml
    • C#
    <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>
    SfCircularChart chart = new SfCircularChart();
    ViewModel viewModel = new ViewModel();
    
    PieSeries series = new PieSeries()
    {
       ItemsSource = viewModel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue",
       ShowDataLabels = true,
    };
    
    var connectorLineStyle = new ConnectorLineStyle
    {
      Stroke = new SolidColorBrush(Colors.Red),
      StrokeWidth = 2
    };
    series.DataLabelSettings = new CircularDataLabelSettings()
    {
      LabelPosition="Outside"
      ConnectorLineSettings = connectorLineStyle
    };
    
    chart.Series.Add(series);

    Constructors

    ConnectorLineStyle()

    Declaration
    public ConnectorLineStyle()

    Fields

    ConnectorTypeProperty

    Identifies the ConnectorType bindable property.

    Declaration
    public static readonly BindableProperty ConnectorTypeProperty
    Field Value
    Type
    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);
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved