Align column widths across multiple Pivots in a dashboard
Hi All,
We are working on developing a program level dashboard which has multiple pivot tables with same columns. The only item that varies across multiple pivot tables is Row dimension.
The requirement is to place the pivots one below another and align all the columns across pivots. Unfortunately, when we place the pivots one below the another, the alignment doesn't work. I have seen many requests similar in nature but no concrete solution.
Can someone help us understand how can we achieve it in Sisense using JS.
Thanks,
Gyanprakash
-
I have found this useful in setting column widths at a widget level. Can be repeated on multiple pivot table widgets. If they are the same metrics, you may just need to set the row/category column width.
widget.on("ready", function(widget, args) {
var cat_column = "[fidx=0]";
var metric1 = "[fidx=1]";
var metric2 = "[fidx=2]";
var metric3 = "[fidx=3]";//hide current column and set new width for the pivots
$('[id="' + widget.oid+ '"]').find(cat_column).css("width", "200px");
$('[id="' + widget.oid+ '"]').find(metric1).css("width", "100px");
$('[id="' + widget.oid+ '"]').find(metric2).css("width", "90px");
$('[id="' + widget.oid+ '"]').find(metric3).css("width", "105px");})
Please sign in to leave a comment.
Comments
2 comments