Articles in this section
Category / Section

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

1 min read

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

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied