)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add space between multiple columns in a Chart segment?

Platform: UWP |
Control: SfChart |
Published Date: January 27, 2016 |
Last Revised Date: June 27, 2019

Description:

This article describes how to add space between multiple series segments that share the same data point and the same x-axis.

Solution:

The spacing between multiple series segments can be achieved using the SegmentSpacing property of the series.

The following code example demonstrates this.

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.

Output

Chart with spacing applied between the segments of the same data point in WPF

Figure 1: SfChart with multiple ColumnSeries segments spaced at the same point.

2X faster development

The ultimate UWP 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
Live Chat Icon