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.

3 REPLIES 3

Sijo1995
9 - Travel Pro
9 - Travel Pro

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
[email protected]
www.qbeeq.pl

apurva
7 - Data Storage
7 - Data Storage

Hi @Harry ,

Is there a way to define min & max limits for x axis in similar way?

I tried xAxis.min, but it did not work.

apurva_0-1709127669478.png