cancel
Showing results for 
Search instead for 
Did you mean: 

Interval on X-axis labels on Chart

gayatrishahane
8 - Cloud Apps
8 - Cloud Apps

How to set an interval on X-axis for a continuous timeline so that the labels don't look so crowded?

gayatrishahane_0-1666917597527.png

I want to show less labels on the X-axis and be able to control the interval.

2 REPLIES 2

Sijo1995
7 - Data Storage
7 - Data Storage

Hi @gayatrishahane ,

Please use this script and read this link-https://community.sisense.com/t5/embed-analytics/define-widget-navigator-scroll-position-left-or-rig... 

var displayBars = 10;

widget.on('beforeviewloaded', function ( ev, args ) {
  args.options.navigator.enabled = true;
        //args.options.xAxis.max=args.options.series[0].data.length;
    //args.options.xAxis.max=6;
        var maxBarCount = (args.options.series[0].data.length - 1);
        args.options.xAxis.min= maxBarCount - displayBars + 1;
        args.options.xAxis.max= maxBarCount
          
});

 Thanks

Sijo

Harry
9 - Travel Pro
9 - Travel Pro

Hello @gayatrishahane ,

You can limit the labels in X-axis using below script. This script shows every 10th label in X-axis. 

widget.on('processresult', function(se, ev){
	ev.result.xAxis.tickInterval  = 10
})

Harry_0-1666947350094.png

 

 

Please let me know if you have any questions

Always here to help,
Harry from QBeeQ
harry.km@qbeeq.pl
www.qbeeq.pl