1. Tag Results
segment_spacing (3)
1 - 3 of 3
How to add space between multiple columns in a Chart segment?
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   C#   The following screenshot illustrates the spacing applied between the segments of the same data point. Figure 1: SfChart with multiple ColumnSeries segments spaced at the same point
How to add space between multiple columns in WPF Chart segment?
Description This article demonstrates how to add spacing between multiple column segments in a WPF Chart (SfChart) when multiple series share the same data source. Solution You can add the spacing between multiple series segments by using the SegmentSpacing property of WPF Chart (SfChart). In this example, setting SegmentSpacing to 0.5 creates a spacing between adjacent segments within the same category. Refer the code below to define segment spacing in a WPF Chart: 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; OutputThe following screenshot illustrates the spacing applied between the segments of the same data point.  Conclusion I hope you enjoyed learning about how to add space between multiple columns in WPF Chart segment.You can refer to our WPF Chart feature tour page to know about its other groundbreaking feature representations. You can also explore our WPF Chart documentation to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
How to set spacing between each columns in WPF Chart (SfChart)?
You can set the spacing of chart series by using Spacing property in WPF Chart (SfChart). You need to assign the values for spacing in double. The value can be given between 0 and 1. In the following example spacing is assigned to 0.5, i.e., 50% is set to width of the column series. XAML <Syncfusion:ColumnSeries  ItemsSource="{Binding CompanyDetails}" XBindingPath="CompanyName" YBindingPath="CompanyTurnOver" Syncfusion:ChartSeriesBase.Spacing="0.5"> </Syncfusion:ColumnSeries> C# private void MyChart() {   SfChart chart = new SfChart();   ColumnSeries columnSeries = new ColumnSeries();   ChartSeriesBase.SetSpacing(columnSeries, 0.5); }   ConclusionI hope you enjoyed learning about how to set spacing between each columns in WPF Chart (SfChart).You can refer to our  WPF Chart feature tour page to know about its other groundbreaking feature representations. You can also explore our WPF Chart documentation to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
No articles found
No articles found
1 of 1 pages (3 items)