Loading...
Loading...
Implement Syncfusion WinUI Funnel Chart (SfFunnelChart) for visualizing data across stages in a process or workflow. Use this when working with funnel charts, conversion funnels, sales pipelines, or process stage analysis in WinUI applications. This skill covers stage-based metrics, hierarchical data representation with decreasing values, and visual representation of progressive reduction in data values across sequential stages.
npx skill4agent add syncfusion/winui-ui-components-skills syncfusion-winui-funnel-chartSfFunnelChartSfFunnelChartSyncfusion.Chart.WinUIItemsSourceXBindingPathYBindingPathSyncfusion.UI.Xaml.ChartsXBindingPathYBindingPathHeaderShowDataLabelsEnableTooltipChartTooltipBehaviorDataPointSelectionBehaviorSelectionBrushSelectedIndexSelectedIndexesSelectionChangingSelectionChangedExplodeIndexExplodeOffsetExplodeOnTapGapRatioMinimumWidthValueIsHeightValueIsWidth<Window
x:Class="FunnelChartDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:chart="using:Syncfusion.UI.Xaml.Charts"
xmlns:model="using:FunnelChartDemo.ViewModel">
<chart:SfFunnelChart x:Name="chart"
Header="SALES PIPELINE"
EnableTooltip="True"
ShowDataLabels="True"
Height="400" Width="600"
ItemsSource="{Binding Data}"
XBindingPath="Stage"
YBindingPath="Value">
<chart:SfFunnelChart.DataContext>
<model:ChartViewModel />
</chart:SfFunnelChart.DataContext>
<chart:SfFunnelChart.Legend>
<chart:ChartLegend />
</chart:SfFunnelChart.Legend>
</chart:SfFunnelChart>
</Window>using Syncfusion.UI.Xaml.Charts;
public sealed partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
SfFunnelChart chart = new SfFunnelChart();
ChartViewModel viewModel = new ChartViewModel();
chart.DataContext = viewModel;
chart.SetBinding(
SfFunnelChart.ItemsSourceProperty,
new Binding() { Path = new PropertyPath("Data") });
chart.XBindingPath = "Stage";
chart.YBindingPath = "Value";
chart.Header = "SALES PIPELINE";
chart.Height = 400;
chart.Width = 600;
chart.Legend = new ChartLegend();
chart.EnableTooltip = true;
chart.ShowDataLabels = true;
this.Content = chart;
}
}public class Model
{
public string Stage { get; set; }
public double Value { get; set; }
}
public class ChartViewModel
{
public List<Model> Data { get; set; }
public ChartViewModel()
{
Data = new List<Model>()
{
new Model() { Stage = "Leads", Value = 1000 },
new Model() { Stage = "Qualified", Value = 750 },
new Model() { Stage = "Proposal", Value = 500 },
new Model() { Stage = "Negotiation", Value = 300 },
new Model() { Stage = "Closed Won", Value = 150 }
};
}
}<Grid>
<Grid.Resources>
<BrushCollection x:Key="salesColors">
<SolidColorBrush Color="#4dd0e1"/>
<SolidColorBrush Color="#26c6da"/>
<SolidColorBrush Color="#00bcd4"/>
<SolidColorBrush Color="#0097a7"/>
<SolidColorBrush Color="#00838f"/>
</BrushCollection>
</Grid.Resources>
<chart:SfFunnelChart ItemsSource="{Binding Data}"
XBindingPath="Stage"
YBindingPath="Value"
PaletteBrushes="{StaticResource salesColors}"
ShowDataLabels="True">
<chart:SfFunnelChart.DataLabelSettings>
<chart:FunnelDataLabelSettings Context="Percentage"
Foreground="White" />
</chart:SfFunnelChart.DataLabelSettings>
</chart:SfFunnelChart>
</Grid><chart:SfFunnelChart ItemsSource="{Binding Data}"
XBindingPath="Stage"
YBindingPath="Value"
EnableTooltip="True">
<chart:SfFunnelChart.SelectionBehavior>
<chart:DataPointSelectionBehavior SelectionBrush="Orange"
Type="Single"/>
</chart:SfFunnelChart.SelectionBehavior>
<chart:SfFunnelChart.TooltipBehavior>
<chart:ChartTooltipBehavior />
</chart:SfFunnelChart.TooltipBehavior>
</chart:SfFunnelChart><chart:SfFunnelChart ItemsSource="{Binding Data}"
XBindingPath="Stage"
YBindingPath="Value"
ExplodeIndex="2"
ExplodeOffset="40"
ExplodeOnTap="True"
GapRatio="0.1">
</chart:SfFunnelChart>ItemsSourceXBindingPathYBindingPathHeaderLegendShowDataLabelsEnableTooltipPaletteBrushesGapRatioMinimumWidthModeValueIsHeightValueIsWidthHeightWidthSelectionBehaviorExplodeIndexExplodeOffsetExplodeOnTapDataLabelSettingsTooltipBehavior