We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add space between multiple columns in WPF Chart (SfChart) segment?

Platform: WPF |
Control: SfChart

You can add the spacing between multiple series segments by using the SegmentSpacing property of WPF Chart (SfChart).

XAML

<syncfusion:ColumnSeries Label="ColumnSeries1"
                         ItemsSource="{Binding Computers}"
                         XBindingPath="Computer"
                         YBindingPath="Year2013"
                         <!—Sets the SegmentSpacing-->
                         SegmentSpacing="0.5"/>
<syncfusion:ColumnSeries Label="ColumnSeries2"
                         ItemsSource="{Binding Computers}"
                         XBindingPath="Computer"
                         YBindingPath="Year2014"
                         SegmentSpacing="0.5" />       

C#

(sampleChart.Series[0] as ColumnSeries).SegmentSpacing = 0.5;
(sampleChart.Series[1] as ColumnSeries).SegmentSpacing = 0.5;

The following screenshot illustrates the spacing applied between the segments of the same data point.

WPF Chart with Column Spacing

 

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile