We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WPF |
Control: SfChart

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

 

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile