Class SfPyramidChart
Renders the pyramid chart.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class SfPyramidChart : ChartBase, IDisposable
Remarks
Pyramid chart control is used to visualize the proportions of a total in hierarchies.
SfPyramidChart class allows to customize the chart elements such as legend, data label, and tooltip features.
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
To render a legend, create an instance of ChartLegend, and assign it to the Legend property.
<chart:SfPyramidChart ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue">
<chart:SfPyramidChart.BindingContext>
<local:ViewModel/>
</chart:SfPyramidChart.BindingContext>
<chart:SfPyramidChart.Legend>
<chart:ChartLegend/>
</chart:SfPyramidChart.Legend>
</chart:SfPyramidChart>
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.
<chart:SfPyramidChart ShowTooltip = "True" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue">
<chart:SfPyramidChart.BindingContext>
<local:ViewModel/>
</chart:SfPyramidChart.BindingContext>
<chart:SfPyramidChart.TooltipBehavior>
<chart:ChartTooltipBehavior/>
</chart:SfPyramidChart.TooltipBehavior>
</chart:SfPyramidChart>
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 SfPyramidChart class.
To customize the chart data labels alignment, placement and label styles, need to create an instance of PyramidDataLabelSettings and set to the DataLabelSettings property.
<chart:SfPyramidChart ShowDataLabels = "True" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue">
<chart:SfPyramidChart.BindingContext>
<local:ViewModel/>
</chart:SfPyramidChart.BindingContext>
</chart:SfPyramidChart>
Constructors
SfPyramidChart()
Declaration
public SfPyramidChart()
Fields
DataLabelSettingsProperty
Identifies the DataLabelSettings dependency property.
Declaration
public static readonly DependencyProperty DataLabelSettingsProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ExplodeIndexProperty
Identifies the ExplodeIndex
dependency property.
Declaration
public static readonly DependencyProperty ExplodeIndexProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ExplodeOffsetProperty
Identifies the ExplodeOffset
dependency property.
Declaration
public static readonly DependencyProperty ExplodeOffsetProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ExplodeOnTapProperty
Identifies the ExplodeOnTap
dependency property.
Declaration
public static readonly DependencyProperty ExplodeOnTapProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
GapRatioProperty
Identifies the GapRatio
dependency property.
Declaration
public static readonly DependencyProperty GapRatioProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ItemsSourceProperty
Identifies the ItemsSource
dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ModeProperty
Identifies the Mode
dependency property.
Declaration
public static readonly DependencyProperty ModeProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
PaletteBrushesProperty
Declaration
public static readonly DependencyProperty PaletteBrushesProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
SelectionBehaviorProperty
The DependencyProperty for SelectionBehavior property. .
Declaration
public static readonly DependencyProperty SelectionBehaviorProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
ShowDataLabelsProperty
Identifies the ShowDataLabels dependency property.
Declaration
public static readonly DependencyProperty ShowDataLabelsProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ShowTooltipProperty
Identifies the ShowTooltip
dependency property.
Declaration
public static readonly DependencyProperty ShowTooltipProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
TooltipTemplateProperty
Identifies the TooltipTemplate
dependency property.
Declaration
public static readonly DependencyProperty TooltipTemplateProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
XBindingPathProperty
Identifies the XBindingPath
dependency property.
Declaration
public static readonly DependencyProperty XBindingPathProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
YBindingPathProperty
Identifies the YBindingPath
dependency property.
Declaration
public static readonly DependencyProperty YBindingPathProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
Properties
DataLabelSettings
Declaration
public PyramidDataLabelSettings DataLabelSettings { get; set; }
Property Value
Type | Description |
---|---|
PyramidDataLabelSettings |
ExplodeIndex
Declaration
public int ExplodeIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ExplodeOffset
Declaration
public double ExplodeOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ExplodeOnTap
Declaration
public bool ExplodeOnTap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
GapRatio
Declaration
public double GapRatio { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ItemsSource
Declaration
public object ItemsSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Mode
Declaration
public ChartPyramidMode Mode { get; set; }
Property Value
Type | Description |
---|---|
ChartPyramidMode |
PaletteBrushes
Declaration
public IList<Brush> PaletteBrushes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<Microsoft.UI.Xaml.Media.Brush> |
SelectionBehavior
Declaration
public DataPointSelectionBehavior SelectionBehavior { get; set; }
Property Value
Type | Description |
---|---|
DataPointSelectionBehavior |
ShowDataLabels
Declaration
public bool ShowDataLabels { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowTooltip
Declaration
public bool ShowTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TooltipTemplate
Declaration
public DataTemplate TooltipTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DataTemplate |
XBindingPath
Declaration
public string XBindingPath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
YBindingPath
Declaration
public string YBindingPath { get; set; }
Property Value
Type | Description |
---|---|
System.String |