How to display the chart area alone in WPF Chart (SfChart)?
The WPF Chart (SfChart) area represents the entire chart along with all its elements. This area is a virtual rectangular space that includes chart components like axes, legends, and series. To display only the chart area without these elements, you need to set the visibility of the 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;
Output:
Conclusion
I hope you enjoyed learning how to display the chart area alone in WPF Chart.
You can refer to our WPF Chart feature tour page know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WPF Chart Examples 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!