menu

MAUI Toolkit

  • User Guide
  • Demos
  • Support
Class EmptyPointSettings - MAUI-ToolKit API Reference | Syncfusion

    Show / Hide Table of Contents

    Class EmptyPointSettings

    Used to customize the empty points which are NaN data points.

    Inheritance
    System.Object
    EmptyPointSettings
    Namespace: Syncfusion.Maui.Toolkit.Charts
    Assembly: Syncfusion.Maui.Toolkit.dll
    Syntax
    public class EmptyPointSettings : Element
    Remarks

    By customizing these empty points, the positions of the data points are highlighted, thereby improving data visualization.

    EmptyPointSettings class provides properties to customize these empty points by modifying attributes such as Fill, Stroke, and StrokeWidth.

    To customize empty points, create an instance of EmptyPointSettings, configure it as needed, and then add it to the series.

    EmptyPointSettings is not supported for all area-related series, as well as for FastChart and ErrorBarSeries.

    # [MainPage.xaml](#tab/tabid-1)
    <chart:SfCartesianChart>
    
        &lt;chart:SfCartesianChart.BindingContext>
            &lt;local:ViewModel/>
        &lt;/chart:SfCartesianChart.BindingContext>
    
        &lt;chart:SfCartesianChart.XAxes>
            &lt;chart:CategoryAxis/>
        &lt;/chart:SfCartesianChart.XAxes>
    
        &lt;chart:SfCartesianChart.YAxes>
            &lt;chart:NumericalAxis/>
        &lt;/chart:SfCartesianChart.YAxes>
    
        &lt;chart:SfCartesianChart.Series>
           &lt;chart:LineSeries ItemsSource = &quot;{Binding Data}&quot; XBindingPath=&quot;XValue&quot; YBindingPath=&quot;YValue&quot; EmptyPointMode=&quot;Zero&quot;/>
           &lt;chart:LineSeries.EmptyPointSettings>
                   &lt;chart:EmptyPointSettings Fill=&quot;Orange&quot; Stroke=&quot;Red&quot; StrokeWidth=&quot;3&quot;/>
               &lt;/chart:LineSeries.EmptyPointSettings>         
       &lt;/chart:SfCartesianChart.Series>
    

    </chart:SfCartesianChart>

    • MainPage.xaml.cs
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yAxis = new NumericalAxis();
    chart.YAxes.Add(yAxis);
    
     LineSeries series = new LineSeries();
     series.ItemsSource = viewModel.Data;
     series.XBindingPath = "XValue";
     series.YBindingPath = "YValue";
     series.EmptyPointMode = EmptyPointMode.Zero;
     series.EmptyPointSettings = new EmptyPointSettings();
     series.EmptyPointSettings.Fill = Colors.Orange;
     series.EmptyPointSettings.Stroke = Colors.Red;
     series.EmptyPointSettings.StrokeWidth = 3; 
     chart.Series.Add(series);

    Constructors

    EmptyPointSettings()

    Initializes a new instance of the EmptyPointSettings

    Declaration
    public EmptyPointSettings()

    Fields

    FillProperty

    Identifies the Fill bindable property.

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

    The identifier for the Fill bindable property determines the fill color of the empty point.

    StrokeProperty

    Identifies the Stroke bindable property.

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

    The identifier for the Stroke bindable property determines the stroke color of the empty point.

    StrokeWidthProperty

    Identifies the StrokeWidth bindable property.

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

    The identifier for the StrokeWidth bindable property determines the stroke width of the empty point.

    Properties

    Fill

    Gets or sets the value to fill empty point.

    Declaration
    public Brush Fill { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    It accepts a Microsoft.Maui.Controls.Brush value and its default value is FF4F4F.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:LineSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               YBindingPath="YValue"
                               EmptyPointMode="Zero">
                   <chart:LineSeries.EmptyPointSettings>
                       <chart:EmptyPointSettings Fill="Orange"/>
                   </chart:LineSeries.EmptyPointSettings>   
             </chart:LineSeries>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        LineSeries series = new LineSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              EmptyPointMode = EmptyPointMode.Zero,
        };
        series.EmptyPointSettings = new EmptyPointSettings();
        series.EmptyPointSettings.Fill = Colors.Orange;
        chart.Series.Add(series);

    Stroke

    Gets or sets the value for empty point stroke.

    Declaration
    public Brush Stroke { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    It accepts Microsoft.Maui.Controls.Brush values and its default value is Transparent.

    Remarks

    EmptyPointSettings of stroke is not supported for Waterfall series.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:ColumnSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               YBindingPath="YValue"
                               EmptyPointMode="Average">
                   <chart:ColumnSeries.EmptyPointSettings>
                       <chart:EmptyPointSettings Stroke="Red" StrokeWidth="3"/>
                   </chart:ColumnSeries.EmptyPointSettings>   
             </chart:ColumnSeries>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        ColumnSeries series = new ColumnSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              EmptyPointMode = EmptyPointMode.Average,
        };
        series.EmptyPointSettings = new EmptyPointSettings();
        series.EmptyPointSettings.Stroke = Colors.Red;
        series.EmptyPointSettings.StrokeWidth = 3; 
        chart.Series.Add(series);

    StrokeWidth

    Gets or sets the value for empty point stroke width.

    Declaration
    public double StrokeWidth { get; set; }
    Property Value
    Type Description
    System.Double

    It accepts double values and its default value is 1.

    Remarks

    The value needs to be greater than zero.

    EmptyPointSettings of StrokeWidth is not supported for Waterfall series.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:LineSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               YBindingPath="YValue"
                               EmptyPointMode="Zero">
                   <chart:LineSeries.EmptyPointSettings>
                       <chart:EmptyPointSettings StrokeWidth="3"/>
                   </chart:LineSeries.EmptyPointSettings>   
             </chart:LineSeries>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        LineSeries series = new LineSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              EmptyPointMode = EmptyPointMode.Zero,
        };
        series.EmptyPointSettings = new EmptyPointSettings();
        series.EmptyPointSettings.StrokeWidth = 3; 
        chart.Series.Add(series);
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved