How to display the zooming scrollbar initially in Angular Charts?
Description
This article explains how to display the zooming scrollbar initially in Angular Charts.
Solution
The zooming scrollbar allows you to zoom in and zoom out of the chart. This scrollbar is displayed only when a zooming operation is performed on the chart.
You can display the zooming scrollbar during the initial render of the chart by setting the zoomFactor property to 0.3 in the primaryXAxis, enabling the enableScrollbar property to true in the zoomSettings property, and activating the isZoomed property in the load event of the chart.
Code Snippet:
The following code shows how to display the zooming scrollbar on the first load:
zoomSettings = {
enableSelectionZooming: true,
mode: "X",
enableScrollbar: true
};
primaryXAxis = {
zoomFactor: 0.3
};
public load(args: ILoadedEventArgs): void {
args.chart.zoomModule.isZoomed = true;
};
The following image illustrates the output of the above code:
Refer to the working sample for additional details and implementation: View Sample in Stackblitz
Conslusion
We hope you enjoyed learning how to display the zooming scrollbar initially in Angular Charts.
You can refer to our Angular Charts feature tour page to learn about its other features and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Charts example to understand how to create and visualize 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 comment section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!