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
})

190 views0 comments

コメント

5つ星のうち0と評価されています。
まだ評価がありません

評価を追加
bottom of page