Class ErrorBarSeries
The ErrorBarSeries indicate the uncertainty or error in data points, making it easy to identify patterns and trends in the data.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class ErrorBarSeries : XYDataSeries, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon
Remarks
To render a series, create an instance of ErrorBarSeries, and add it to the Series collection.
The ErrorBarSeries had no tooltip, data label, animation, and selection support.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:SfCartesianChart.Series>
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"/>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
Constructors
ErrorBarSeries()
Initializes a new instance of the ErrorBarSeries class.
Declaration
public ErrorBarSeries()
Fields
HorizontalCapLineStyleProperty
Identifies the HorizontalCapLineStyle bindable property.
Declaration
public static readonly BindableProperty HorizontalCapLineStyleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
HorizontalDirectionProperty
Identifies the HorizontalDirection bindable property.
Declaration
public static readonly BindableProperty HorizontalDirectionProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
HorizontalErrorPathProperty
Identifies the HorizontalErrorPath bindable property.
Declaration
public static readonly BindableProperty HorizontalErrorPathProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
HorizontalErrorValueProperty
Identifies the HorizontalErrorValue bindable property.
Declaration
public static readonly BindableProperty HorizontalErrorValueProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
HorizontalLineStyleProperty
Identifies the HorizontalLineStyle bindable property.
Declaration
public static readonly BindableProperty HorizontalLineStyleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ModeProperty
Identifies the Mode bindable property.
Declaration
public static readonly BindableProperty ModeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TypeProperty
Identifies the Type bindable property.
Declaration
public static readonly BindableProperty TypeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
VerticalCapLineStyleProperty
Identifies the VerticalCapLineStyle bindable property.
Declaration
public static readonly BindableProperty VerticalCapLineStyleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
VerticalDirectionProperty
Identifies the VerticalDirection bindable property.
Declaration
public static readonly BindableProperty VerticalDirectionProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
VerticalErrorPathProperty
Identifies the VerticalErrorPath bindable property.
Declaration
public static readonly BindableProperty VerticalErrorPathProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
VerticalErrorValueProperty
Identifies the VerticalErrorValue bindable property.
Declaration
public static readonly BindableProperty VerticalErrorValueProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
VerticalLineStyleProperty
Identifies the VerticalLineStyle bindable property.
Declaration
public static readonly BindableProperty VerticalLineStyleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
HorizontalCapLineStyle
Gets or sets the style for horizontal caps, and it is often used to customize the appearance of horizontal caps in the error bar for visual purposes.
Declaration
public ErrorBarCapLineStyle HorizontalCapLineStyle { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarCapLineStyle | Its default is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25
VerticalErrorValue="5"/>
<chart:ErrorBarSeries.HorizontalCapLineStyle>
<chart:ErrorBarCapLineStyle Stroke="Black"></chart:ErrorBarCapLineStyle>
</chart:ErrorBarSeries.HorizontalCapLineStyle>
</chart:SfCartesianChart>
HorizontalDirection
Gets or sets the direction to specify whether to show positive, negative or both directions of horizontal error values to display.
Declaration
public ErrorBarDirection HorizontalDirection { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarDirection | Its defaults is Both |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25,
VerticalErrorValue="5"
HorizontalDirection="Both"/>
</chart:SfCartesianChart>
HorizontalErrorPath
Gets or sets a path value on the source object to serve a horizontal error value to the series.
Declaration
public string HorizontalErrorPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | It accepts System.String and the default |
Remarks
If the HorizontalErrorPath is set, the HorizontalErrorValue will be ignored when type is Custom.
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorPath="Low"/>
</chart:SfCartesianChart>
HorizontalErrorValue
Gets or sets the value of the horizontal errors of the series.
Declaration
public double HorizontalErrorValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double and the default is 0. |
Remarks
The HorizontalErrorValue works when there is no HorizontalErrorPath set and the Mode is Both or Horizontal.
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue="0.25"/>
</chart:SfCartesianChart>
HorizontalLineStyle
Gets or sets the style for horizontal lines, and it is often used to customize the appearance of horizontal error bars for visual purposes.
Declaration
public ErrorBarLineStyle HorizontalLineStyle { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarLineStyle | Its default is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25,
VerticalErrorValue="5"/>
<chart:ErrorBarSeries.HorizontalLineStyle>
<chart:ErrorBarLineStyle Stroke = "Black" ></ chart:ErrorBarLineStyle>
</chart:ErrorBarSeries.HorizontalLineStyle>
</chart:SfCartesianChart>
Mode
Gets or sets the mode of the error bar to be displayed, whether horizontal, vertical, or both.
Declaration
public ErrorBarMode Mode { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarMode | Its defaults is Both |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25
VerticalErrorValue=5
Mode="Both"/>
</chart:SfCartesianChart>
Type
Gets or sets the error bar type, whether it is specified as a standard deviation, a standard error, a percentage, or a fixed value.
Declaration
public ErrorBarType Type { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarType | Its defaults is Fixed |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25
VerticalErrorValue=5
Type="Fixed"/>
</chart:SfCartesianChart>
VerticalCapLineStyle
Gets or sets the style for vertical caps, and it is often used to customize the appearance of vertical caps in the error bar for visual purposes.
Declaration
public ErrorBarCapLineStyle VerticalCapLineStyle { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarCapLineStyle | Its default is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25
VerticalErrorValue="5"/>
<chart:ErrorBarSeries.VerticalCapLineStyle>
<chart:ErrorBarCapLineStyle Stroke="Black" CapSize="20"></chart:ErrorBarCapLineStyle>
</chart:ErrorBarSeries.VerticalCapLineStyle>
</chart:SfCartesianChart>
VerticalDirection
Gets or sets the direction to specify whether to show positive, negative or both directions of vertical error values to display.
Declaration
public ErrorBarDirection VerticalDirection { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarDirection | Its defaults to Both |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25,
VerticalErrorValue="5"
VerticalDirection="Both"/>
</chart:SfCartesianChart>
VerticalErrorPath
Gets or sets a path value on the source object to serve a vertical error value to the series.
Declaration
public string VerticalErrorPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | It accepts System.Stringand the default is |
Remarks
If the VerticalErrorPath is set, the VerticalErrorValue will be ignored when type is Custom.
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
YBindingPath="Value"
XBindingPath = "Name"
VerticalErrorPath="High"/>
</chart:SfCartesianChart>
VerticalErrorValue
Gets or sets the value of the vertical errors of the series.
Declaration
public double VerticalErrorValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double and the default is 0. |
Remarks
The VerticalErrorValue works when there is no VerticalErrorPath set and the Mode is Both or Vertical.
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
VerticalErrorValue="5"/>
</chart:SfCartesianChart>
VerticalLineStyle
Gets or sets the style for vertical lines, and it is often used to customize the appearance of the vertical error bar for visual purposes.
Declaration
public ErrorBarLineStyle VerticalLineStyle { get; set; }
Property Value
Type | Description |
---|---|
ErrorBarLineStyle | Its default is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ErrorBarSeries ItemsSource="{Binding ThermalExpansion}"
XBindingPath="Name"
YBindingPath="Value"
HorizontalErrorValue=0.25
VerticalErrorValue="5"/>
<chart:ErrorBarSeries.VerticalLineStyle>
<chart:ErrorBarLineStyle Stroke = "Black" ></ chart:ErrorBarLineStyle>
</chart:ErrorBarSeries.VerticalLineStyle>
</chart:SfCartesianChart>
Methods
CreateSegment()
Creates the Error Bar segments.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |