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:
Create a line/bar/column/area chart
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.
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
})
コメント