cancel
Showing results for 
Search instead for 
Did you mean: 

Window Autosizing

Rkile
8 - Cloud Apps
8 - Cloud Apps

Hello,

I am curious if there is functionality for Sisense to auto-fit PivotTables/Tables with Aggregation dependent on the user's window size.  If dashboards are built out on larger screens, how can we scale those table widgets to appear similar on a smaller window without the user needing to scroll to see all columns?

 

Thanks

1 ACCEPTED SOLUTION

Harry
9 - Travel Pro
9 - Travel Pro

Hello @Rkile ,

In Table With Aggregation, there is an option to set automatic width

Harry_0-1665685869005.png

But I think this option is not available in Pivot.

Try below widget script in Pivot2 to make column with automatic fit.


//Percentage of each column. Sum should be equal to 1
var columnWidth = {
	0: 0.3,
	1: 0.3,
	2: 0.4
}

widget.on('processresult', function(widget, args) {
	widgetWidth = element.closest('pivot2').width() - 25
		args.result.metadata.forEach(function(e, index) {

				if (typeof(columnWidth[index]) !== "undefined") {
					if (!('format' in e)) {
						e['format'] = {
							'width': columnWidth[index] * widgetWidth
						};
					} else {
						e['format']['width'] = columnWidth[index] * widgetWidth;
					}
				}
		})
})

Always here to help,
Harry from QBeeQ
[email protected]
www.qbeeq.pl

 

View solution in original post

1 REPLY 1

Harry
9 - Travel Pro
9 - Travel Pro

Hello @Rkile ,

In Table With Aggregation, there is an option to set automatic width

Harry_0-1665685869005.png

But I think this option is not available in Pivot.

Try below widget script in Pivot2 to make column with automatic fit.


//Percentage of each column. Sum should be equal to 1
var columnWidth = {
	0: 0.3,
	1: 0.3,
	2: 0.4
}

widget.on('processresult', function(widget, args) {
	widgetWidth = element.closest('pivot2').width() - 25
		args.result.metadata.forEach(function(e, index) {

				if (typeof(columnWidth[index]) !== "undefined") {
					if (!('format' in e)) {
						e['format'] = {
							'width': columnWidth[index] * widgetWidth
						};
					} else {
						e['format']['width'] = columnWidth[index] * widgetWidth;
					}
				}
		})
})

Always here to help,
Harry from QBeeQ
[email protected]
www.qbeeq.pl