WinUI

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfPolarChart - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfPolarChart

    Renders the polar type charts.

    Inheritance
    System.Object
    ChartBase
    SfPolarChart
    Implements
    System.IDisposable
    Inherited Members
    ChartBase.VisibleSeriesProperty
    ChartBase.HeaderProperty
    ChartBase.HorizontalHeaderAlignmentProperty
    ChartBase.VerticalHeaderAlignmentProperty
    ChartBase.TooltipBehaviorProperty
    ChartBase.LegendProperty
    ChartBase.SuspendSeriesNotification()
    ChartBase.ResumeSeriesNotification()
    ChartBase.Dispose()
    ChartBase.OnApplyTemplate()
    ChartBase.MeasureOverride(Size)
    ChartBase.OnLostFocus(RoutedEventArgs)
    ChartBase.OnGotFocus(RoutedEventArgs)
    ChartBase.OnPointerCaptureLost(PointerRoutedEventArgs)
    ChartBase.OnTapped(TappedRoutedEventArgs)
    ChartBase.OnRightTapped(RightTappedRoutedEventArgs)
    ChartBase.OnPointerWheelChanged(PointerRoutedEventArgs)
    ChartBase.OnPointerExited(PointerRoutedEventArgs)
    ChartBase.OnPointerEntered(PointerRoutedEventArgs)
    ChartBase.OnPointerCanceled(PointerRoutedEventArgs)
    ChartBase.OnKeyUp(KeyRoutedEventArgs)
    ChartBase.OnKeyDown(KeyRoutedEventArgs)
    ChartBase.OnHolding(HoldingRoutedEventArgs)
    ChartBase.OnManipulationStarting(ManipulationStartingRoutedEventArgs)
    ChartBase.OnManipulationStarted(ManipulationStartedRoutedEventArgs)
    ChartBase.OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)
    ChartBase.OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)
    ChartBase.OnManipulationDelta(ManipulationDeltaRoutedEventArgs)
    ChartBase.OnPointerPressed(PointerRoutedEventArgs)
    ChartBase.OnPointerMoved(PointerRoutedEventArgs)
    ChartBase.OnPointerReleased(PointerRoutedEventArgs)
    ChartBase.OnDoubleTapped(DoubleTappedRoutedEventArgs)
    ChartBase.TooltipBehavior
    ChartBase.Header
    ChartBase.HorizontalHeaderAlignment
    ChartBase.VerticalHeaderAlignment
    ChartBase.Legend
    ChartBase.SeriesBoundsChanged
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.Chart.WinUI.dll
    Syntax
    public class SfPolarChart : ChartBase, IDisposable
    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.

    • MainPage.xaml
    • MainPage.xaml.cs
    • ViewModel.cs
     
    <chart:SfPolarChart>
    
           <chart:SfPolarChart.BindingContext>
               <local:ViewModel/>
           </chart:SfPolarChart.BindingContext>
    
           <chart:SfPolarChart.Series>
               <chart:PolarAreaSeries ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/>
           </chart:SfPolarChart.Series>
    </chart:SfPolarChart>
    SfPolarChart chart = new SfPolarChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    PolarAreaSeries series = new PolarAreaSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue"
    };
    chart.Series.Add(series);
    public ObservableCollection<Model> Data { get; set; }
    
    public ViewModel()
    {
       Data = new ObservableCollection<Model>();
       Data.Add(new Model() { XValue = "A", YValue = 100 });
       Data.Add(new Model() { XValue = "B", YValue = 150 });
       Data.Add(new Model() { XValue = "C", YValue = 110 });
       Data.Add(new Model() { XValue = "D", YValue = 230 });
    }

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

    • MainPage.xaml
    • MainPage.xaml.cs
     
    <chart:SfPolarChart>
    
           <chart:SfPolarChart.BindingContext>
               <local:ViewModel/>
           </chart:SfPolarChart.BindingContext>
    
           <chart:SfPolarChart.Legend>
               <chart:ChartLegend/>
           </chart:SfPolarChart.Legend>
    
           <chart:SfPolarChart.Series>
               <chart:PolarAreaSeries Label="Series 1" ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/>
           </chart:SfPolarChart.Series>
    </chart:SfCircularChart>
    SfPolarChart chart = new SfPolarChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.Legend = new ChartLegend();
    
    PolarAreaSeries series = new PolarAreaSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue",
        Label="Series 1"
    };
    chart.Series.Add(series);

    Tooltip

    Tooltip displays information while tapping or mouse hover on the segment. To display the tooltip on the chart, you need to set the ShowTooltip property as true in ChartSeriesBase.

    To customize the appearance of the tooltip elements like Background, TextColor and Font, create an instance of ChartTooltipBehavior class, modify the values, and assign it to the chart’s TooltipBehavior property.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfPolarChart>
    
            <chart:SfPolarChart.BindingContext>
                <local:ViewModel/>
            </chart:SfPolarChart.BindingContext>
    
            <chart:SfPolarChart.TooltipBehavior>
                <chart:ChartTooltipBehavior/>
            </chart:SfPolarChart.TooltipBehavior>
    
            <chart:SfPolarChart.Series>
                <chart:PolarAreaSeries ShowTooltip = "True" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/>
            </chart:SfPolarChart.Series>
    
    </chart:SfPolarChart>
    SfPolarChart chart = new SfPolarChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.TooltipBehavior = new ChartTooltipBehavior();
    
    PolarAreaSeries series = new PolarAreaSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue",
       ShowTooltip = true
    };
    chart.Series.Add(series);

    Data Label

    Data labels are used to display values related to a chart segment. To render the data labels, you need to enable the ShowDataLabels property as true in ChartSeries class.

    To customize the chart data labels alignment, placement and label styles, need to create an instance of PolarDataLabelSettings and set to the DataLabelSettings property.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfPolarChart>
    
           <chart:SfPolarChart.BindingContext>
               <local:ViewModel/>
           </chart:SfPolarChart.BindingContext>
    
           <chart:SfPolarChart.Series>
               <chart:PolarAreaSeries ShowDataLabels = "True" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"/>
           </chart:SfPolarChart.Series>
    </chart:SfPolarChart>
    SfPolarChart chart = new SfPolarChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    PolarAreaSeries series = new PolarAreaSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue",
        ShowDataLabels = true
    };
    chart.Series.Add(series);

    Constructors

    SfPolarChart()

    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 GridLineType dependency property.

    PaletteBrushesProperty

    Identifies the PaletteBrushes dependency property.

    Declaration
    public static readonly DependencyProperty PaletteBrushesProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    The identifier for PaletteBrushes dependency property.

    PrimaryAxisProperty

    Identifies the PrimaryAxis dependency property.

    Declaration
    public static readonly DependencyProperty PrimaryAxisProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    The identifier for PrimaryAxis dependency property.

    SecondaryAxisProperty

    Identifies the SecondaryAxis dependency property.

    Declaration
    public static readonly DependencyProperty SecondaryAxisProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    The identifier for SecondaryAxis dependency property.

    SeriesProperty

    Identifies the Series dependency property.

    Declaration
    public static readonly DependencyProperty SeriesProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    The identifier for Series dependency property.

    StartAngleProperty

    Identifies the StartAngle dependency property.

    Declaration
    public static readonly DependencyProperty StartAngleProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    The identifier for StartAngle dependency property.

    Properties

    GridLineType

    Declaration
    public PolarChartGridLineType GridLineType { get; set; }
    Property Value
    Type Description
    PolarChartGridLineType

    PaletteBrushes

    Declaration
    public IList<Brush> PaletteBrushes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<Microsoft.UI.Xaml.Media.Brush>

    PrimaryAxis

    Declaration
    public ChartAxisBase2D PrimaryAxis { get; set; }
    Property Value
    Type Description
    ChartAxisBase2D

    SecondaryAxis

    Declaration
    public RangeAxisBase SecondaryAxis { get; set; }
    Property Value
    Type Description
    RangeAxisBase

    Series

    Declaration
    public PolarSeriesCollection Series { get; set; }
    Property Value
    Type Description
    PolarSeriesCollection

    StartAngle

    Declaration
    public ChartPolarAngle StartAngle { get; set; }
    Property Value
    Type Description
    ChartPolarAngle

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved