I want to disable scrollbar, but I also want to display toolbar items ('Zoom', 'ZoomIn', 'ZoomOut', 'Pan', 'Reset')

Hi, please help with pivot table.

This is the previous configuration:

chartSettings: {
enableMultipleAxis: true,
chartSeries: { type: 'StackingColumn' }
}

And this is the UI:


You can see, there are icon which are clickable at the right top corner. They are toolbar items: zoom, zoom in, zoom out, pan, and reset. But when I change the code to this:

chartSettings: {
enableMultipleAxis: true,
chartSeries: { type: 'StackingColumn' },
zoomSettings: {
enableScrollbar: false,
toolbarItems: ['Zoom', 'ZoomIn', 'ZoomOut', 'Pan', 'Reset']
}
},

Then the UI doesn't display the toolbar items anymore.


I suspect it is because I set enableScrollbar to false. How can I display the toolbar items with the enableScrollbar set to false?

Thanks for any help.


1 Reply

MM Manikandan Murugesan Syncfusion Team November 11, 2021 12:22 PM UTC

Hi Meidika, 
 
While the chart is zoomed out, the zooming icons will not be appeared in the Pivot Chart. To display the zooming icons, zoom the chart using mouse selection (or) by setting the zoomFactor in primaryXAxis by default. Please refer the following screenshot and code example. 
 
Chart Selection: 
 
 
Code Example: 
 
chartSettings: { 
        title: "Sales Analysis", 
        enableMultipleAxis: true, 
        chartSeries: { type: "StackingColumn" }, 
        zoomSettings: { 
          enableScrollbar: false, 
          toolbarItems: ['Zoom', 'ZoomIn', 'ZoomOut', 'Pan', 'Reset'] 
        }, 
        load: (args) => { 
          args.chart.primaryXAxis.zoomFactor = 0.7; 
        } 
      }, 
 
 
 
Meanwhile, we have prepared a sample for your reference. Please find it from below link. 

Also, please refer to the following UG document to know more details about the zooming option. 

Please let us know if you have any concerns. 
 
Regards, 
Manikandan 


Loader.
Up arrow icon