top of page

Add Scrollbar to widget

If X-axis of a line chart, bar chart, column chart or area chart contains too many items, one option to view them is enable 'Auto Zoom' feature in widget design panel. Alternatively we can enable scrollbar using below script




Steps:


  1. Create a line/bar/column/area chart

  2. Add below script to widget. Change min and max value to update number of bars displayed at a time. For example, in below script min value is 0 and max value is 5. So 6 bars will be displayed at a time and we can scroll to view other items.

  3. Save the script and refresh widget



widget.on('processresult',function(se,ev){
	ev.result.xAxis.scrollbar= {
            				enabled: true
        				}
	ev.result.xAxis.min = 0
	ev.result.xAxis.max = 5
})

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
BI Next Level white logo

BI Next Level is your trusted resource for BI customization, data solutions, and expert insights. Explore practical tips, scripts, and tutorials for tools like Sisense, Python, and SQL. Let’s transform your data into impactful insights together.

Quick Links
Connect with us
Copyright © 2024. All Rights Reserved. Designed, Developed & Maintained  by Intertoons
bottom of page