Articles in this section
Category / Section

How to display the chart area alone in WPF Chart (SfChart)?

1 min read

WPF Chart (SfChart) area represents the entire chart and all its elements. It’s a virtual rectangular area that includes all the chart elements like axis, legends, series, etc. If you want to display the chart area alone, you need to set the Visibility property of primary and secondary axes to Collapsed.

XAML

<syncfusion:SfChart x:Name="columnChart">
      <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.columnChart.PrimaryAxis.Visibility = Visibility.Collapsed;
this.columnChart.SecondaryAxis.Visibility = Visibility.Collapsed;     

 

WPF Chart displays only chart area

 

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