How to enable the zooming option in OLAP Chart?
This article explains how to enable the zooming feature in a Syncfusion WPF OLAP Chart. By turning on scroll-based zooming for the chart area, users can interactively zoom in and out to analyze data more closely.
Zooming is especially useful when working with dense datasets or when users need to focus on specific data ranges.
Follow these steps to enable zooming in the WPF OLAP Chart:
Step 1: Initialize the Chart and Attach the Loaded Event
Configure the OLAP Chart and attach the Loaded event to apply zooming settings after the chart is rendered. For more information, refer this getting started documentation.
public MainWindow()
{
InitializeComponent();
this.olapChart.Loaded += OlapChart_Loaded;
}
Public Sub New()
InitializeComponent()
AddHandler Me.olapChart.Loaded, AddressOf olapchart1_Loaded
End Sub
Step 2: Enable Zoom on Scroll
In the Loaded event, enable zooming by setting the EnableZoomOnScroll property of the chart area to true. This allows users to zoom using the mouse scroll wheel.
void OlapChart_Loaded(object sender, RoutedEventArgs e)
{
this.olapChart.Series[0].Area.EnableZoomOnScroll = true;
}
Private Sub OlapChart_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Me.olapChart.Series(0).Area.EnableZoomOnScroll = True
End Sub
Output
Conclusion
I hope you enjoyed learning how to enable zooming in the WPF OLAP Chart.
You can refer to our WPF OlapChart featuretour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WPF OLAP Chart demo 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!