Category / Section
How can I display the chart area alone?
1 min read
Description
This article describes how to display the Chart area in the SfChart.
Solution
The chart area alone can be displayed by changing the Visibility property as Collapsed in the axes.
XAML
<syncfusion:SfChart x:Name="areaChart" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"> <syncfusion:SfChart.PrimaryAxis > <syncfusion:CategoryAxis Header="Computer sales" Visibility="Collapsed"/> </syncfusion:SfChart.PrimaryAxis> <syncfusion:SfChart.SecondaryAxis> <syncfusion:NumericalAxis Header="Quantity Sold" Visibility="Collapsed"/> </syncfusion:SfChart.SecondaryAxis> <syncfusion:ColumnSeries Label="2014" ItemsSource="{Binding Computers}" XBindingPath="Computer" YBindingPath="Year2014" /> </syncfusion:SfChart>
C#
this.areaChart.PrimaryAxis.Visibility = Visibility.Collapsed; this.areaChart.SecondaryAxis.Visibility = Visibility.Collapsed;
Output
The following screenshot illustrates the output for the chart displayed with its area alone.