Articles in this section
Category / Section

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

1 min read

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 through the SegmentSpacing property of the series.

The following code example demonstrates the same.

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.

F:\Issue Files Chart\Issue File -10 Knowledge Base\WP_ScreenShot\New Second TIme\wp_ss_20150210_0010.png

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

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