Articles in this section
Category / Section

How to display the zooming scrollbar initially in Angular Charts?

2 mins read

Description

This article shows 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 the zooming operation is made in the chart.

You can display the zooming scrollbar on the first render of the chart by setting the zoomFactor property to 0.3 in the primaryXAxis, set the enableScrollbar property to true in the zoomSettings property, and enable 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.

image.png

View Sample in Stackblitz

Conslusion

I 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, support portal, or feedback portal. We are always happy to assist you!

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