Segment Spacing in WinUI Chart (SfFunnelChart)

9 Jul 20261 minute to read

The gap between each segment in the funnel chart can be set using the GapRatio property. The default value of the GapRatio property is 0, and its value ranges from 0 to 1.

<chart:SfFunnelChart 
    x:Name="chart"
    ItemsSource="{Binding Data}" 
    XBindingPath="Category" 
    YBindingPath="Value" 
    GapRatio="0.5">
</chart:SfFunnelChart>
SfFunnelChart chart = new SfFunnelChart();

chart.SetBinding(SfFunnelChart.ItemsSourceProperty, new Binding() 
{ 
    Path = new PropertyPath("Data")
});

chart.XBindingPath = "Category";
chart.YBindingPath = "Value";
chart.GapRatio = 0.5;

// Configure additional chart elements
this.Content = chart;

Segment spacing in WinUI Chart