Class RangeAreaSeries
The RangeAreaSeries is a chart type to represent data as filled areas between two ranges, typically depicting a range of values or uncertainty.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class RangeAreaSeries : RangeSeriesBase, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon, IMarkerDependent
Remarks
To render a series, create an instance of RangeAreaSeries class, and add it to the Series collection.
EnableTooltip - A tooltip displays information while tapping or mouse hovering above a segment. To display the tooltip on a chart, you need to set the EnableTooltip property as true in RangeAreaSeries class, and also refer TooltipBehavior property.
Data Label - Data labels are used to display values related to a chart segment. To render the data labels, you need to set the ShowDataLabels property as true in RangeAreaSeries class. To customize the chart data labels alignment, placement, and label styles, you need to create an instance of CartesianDataLabelSettings and set to the DataLabelSettings property.
Animation - To animate the series, set True to the EnableAnimation property.
LegendIcon - To customize the legend icon using the LegendIcon property.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:SfCartesianChart.Series>
<chart:RangeAreaSeries
ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="HighValue"
Low="LowValue"/>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
Constructors
RangeAreaSeries()
Declaration
public RangeAreaSeries()
Fields
MarkerSettingsProperty
Identifies the MarkerSettings bindable property.
Declaration
public static readonly BindableProperty MarkerSettingsProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ShowMarkersProperty
Identifies the ShowMarkers bindable property.
Declaration
public static readonly BindableProperty ShowMarkersProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
MarkerSettings
Gets or sets the option for customize the series markers.
Declaration
public ChartMarkerSettings MarkerSettings { get; set; }
Property Value
Type | Description |
---|---|
ChartMarkerSettings | It accepts ChartMarkerSettings. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:RangeAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="HighValue"
Low="LowValue"
ShowMarkers="True">
<chart:RangeAreaSeries.MarkerSettings>
<chart:ChartMarkerSettings Fill="Red" Height="15" Width="15" />
</chart:RangeAreaSeries.MarkerSettings>
</chart:RangeAreaSeries>
</chart:SfCartesianChart>
ShowMarkers
Gets or sets the value indicating whether to show markers for the series data point.
Declaration
public bool ShowMarkers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts boolean values and its default value is false. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:RangeAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="HighValue"
Low="LowValue"
ShowMarkers="True"/>
</chart:SfCartesianChart>
Methods
CreateSegment()
Creates the Range Area segment.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |
Overrides
DrawMarker(ICanvas, Int32, ShapeType, Rect)
Calls when drawing markers.
Declaration
protected virtual void DrawMarker(ICanvas canvas, int index, ShapeType type, Rect rect)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Graphics.ICanvas | canvas | |
System.Int32 | index | |
ShapeType | type | |
Microsoft.Maui.Graphics.Rect | rect |
GetDataPointIndex(Single, Single)
Methods to get the index of data point.
Declaration
public override int GetDataPointIndex(float pointX, float pointY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | pointX | |
System.Single | pointY |
Returns
Type |
---|
System.Int32 |
Overrides
OnBindingContextChanged()
Declaration
protected override void OnBindingContextChanged()