Class SfPolarChart
Renders polar line and area charts for data representation and enhanced user interface visualization.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class SfPolarChart : ChartBase, IDisposable, INotifyPropertyChanged
Remarks
Polar chart control is used to visualize the data in terms of values and angles.
SfPolarChart class properties provides an option to add the series collection, allows to customize the chart elements such as legend, data label, and tooltip features.
Series
ChartSeries is the visual representation of data. SfPolarChart offers PolarAreaSeries and PolarLineSeries.
To render a series, create an instance of required series class, and add it to the Series collection.
<chart:SfPolarChart>
<chart:SfPolarChart.DataContext>
<local:ViewModel/>
</chart:SfPolarChart.DataContext>
<chart:PolarAreaSeries ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/>
</chart:SfPolarChart>
Legend
The Legend contains list of data points in chart series. The information provided in each legend item helps to identify the corresponding data point in chart series. The Series XBindingPath property value will be displayed in the associated legend item.
To render a legend, create an instance of ChartLegend, and assign it to the Legend property.
<chart:SfPolarChart>
<chart:SfPolarChart.DataContext>
<local:ViewModel/>
</chart:SfPolarChart.DataContext>
<chart:SfPolarChart.Legend>
<chart:ChartLegend/>
</chart:SfPolarChart.Legend>
<chart:PolarAreaSeries Label="Series 1" ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/>
</chart:SfCircularChart>
Data Label
Data labels are used to display values related to a chart segment. To render the data labels, you need to enable the
To customize the chart data labels alignment, placement and label styles, need to create an instance of PolarDataLabelSettings and set to the
<chart:SfPolarChart>
<chart:SfPolarChart.DataContext>
<local:ViewModel/>
</chart:SfPolarChart.DataContext>
< chart:PolarAreaSeries ShowDataLabels = "True"
ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
</chart:SfPolarChart>
Constructors
SfPolarChart()
Initializes a new instance of the SfPolarChart class.
Declaration
public SfPolarChart()
Fields
GridLineTypeProperty
Identifies the GridLineType dependency property.
Declaration
public static readonly DependencyProperty GridLineTypeProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
PaletteBrushesProperty
Identifies the PaletteBrushes dependency property.
Declaration
public static readonly DependencyProperty PaletteBrushesProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
PrimaryAxisProperty
Identifies the PrimaryAxis dependency property.
Declaration
public static readonly DependencyProperty PrimaryAxisProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
SecondaryAxisProperty
Identifies the SecondaryAxis dependency property.
Declaration
public static readonly DependencyProperty SecondaryAxisProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
SeriesProperty
Identifies the Series dependency property.
Declaration
public static readonly DependencyProperty SeriesProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
StartAngleProperty
Identifies the StartAngle dependency property.
Declaration
public static readonly DependencyProperty StartAngleProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
Properties
GridLineType
Gets or sets the gridline type value that can be used to modify the polar chart grid line type to Polygon or Circle.
Declaration
public PolarChartGridLineType GridLineType { get; set; }
Property Value
Type | Description |
---|---|
PolarChartGridLineType | It accepts the PolarChartGridLineType value and its default value is Circle. |
Examples
<chart:SfPolarChart GridLineType="Polygon">
<!--omitted for brevity-->
<chart:PolarAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
</chart:SfPolarChart>
PaletteBrushes
Gets or sets the list of brushes that can be used to customize the appearance of the chart.
Declaration
public IList<Brush> PaletteBrushes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<Microsoft.UI.Xaml.Media.Brush> | This property accepts a list of brushes as input and comes with a set of predefined brushes by default. |
Remarks
It allows custom brushes, and gradient brushes to customize the appearance.
Examples
<Grid>
<Grid.Resources>
<BrushCollection x:Key="customBrushes">
<SolidColorBrush Color="#4dd0e1"/>
<SolidColorBrush Color="#26c6da"/>
<SolidColorBrush Color="#00bcd4"/>
<SolidColorBrush Color="#00acc1"/>
<SolidColorBrush Color="#0097a7"/>
<SolidColorBrush Color="#00838f"/>
</BrushCollection>
</Grid.Resources>
<chart:SfPolarChart PaletteBrushes="{StaticResource customBrushes}">
<!--omitted for brevity-->
</chart:SfPolarChart>
</Grid>
PrimaryAxis
Gets or sets the x- axis for SfPolarChart.
Declaration
public ChartAxis PrimaryAxis { get; set; }
Property Value
Type | Description |
---|---|
ChartAxis | It accepts the ChartAxis value. |
Examples
<chart:SfPolarChart>
<chart:SfPolarChart.PrimaryAxis>
<chart:NumericalAxis/>
</chart:SfPolarChart.NumericalAxis>
<chart:SfPolarChart.SecondaryAxis>
<chart:NumericalAxis/>
</chart:SfPolarChart.SecondaryAxis>
</chart:SfPolarChart>
SecondaryAxis
Gets or sets the y-axis for SfPolarChart.
Declaration
public RangeAxisBase SecondaryAxis { get; set; }
Property Value
Type | Description |
---|---|
RangeAxisBase | It accepts the RangeAxisBase value. |
Examples
<chart:SfPolarChart>
<chart:SfPolarChart.PrimaryAxis>
<chart:NumericalAxis/>
</chart:SfPolarChart.NumericalAxis>
<chart:SfPolarChart.SecondaryAxis>
<chart:NumericalAxis/>
</chart:SfPolarChart.SecondaryAxis>
</chart:SfPolarChart>
Series
Gets or sets a collection of series to be added to the chart.
Declaration
public PolarSeriesCollection Series { get; set; }
Property Value
Type | Description |
---|---|
PolarSeriesCollection | It accepts the PolarSeriesCollection value. |
Remarks
To render a series, create an instance of required series class, and add it to the collection.
Examples
<chart:SfPolarChart>
<!--omitted for brevity-->
<chart:PolarAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
</chart:SfPolarChart>
StartAngle
Gets or sets the value that can be used to modify the series starting angle.
Declaration
public ChartPolarAngle StartAngle { get; set; }
Property Value
Type | Description |
---|---|
ChartPolarAngle | It accepts the ChartPolarAngle value and it has the default value of Rotate270. |
Remarks
It allows for modifying the series rendering position on four degrees: 0, 90, 180, and 270.
Examples
<chart:SfPolarChart StartAngle="Rotate0">
<!--omitted for brevity-->
<chart:PolarAreaSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
</chart:SfPolarChart>
Methods
OnApplyTemplate()
Declaration
protected override void OnApplyTemplate()