Pivot Table 1: Center The Pivot Inside The Dashboard Widget
Updated 03-02-2023
SiftHealthcare hi!
Please note that this script was designed for Pivot running on Windows based version. I've checked it form our side and it seems to be working:
For the Sisense application running on Linux, please try to use a script below:
widget.on('ready', function(widget) {
var widgetContainer = $('[widgetid="'+ widget.oid + '"]')
if (prism.$ngscope.appstate === "dashboard") {
$('[widgetid="'+ widget.oid + '"]').find(document.getElementsByClassName('pivot-container')).css('margin-left', '25%') .css('margin-top', '10%')
} else if (prism.$ngscope.appstate === "widget") {
$(document.getElementsByClassName('p-container')).css('margin-left', '25%').css('margin-top', '10%')
}
})
widget.on('domready', function(widget) {
var widgetContainer = $('[widgetid="'+ widget.oid + '"]')
if (prism.$ngscope.appstate === "dashboard") {
$('[widgetid="'+ widget.oid + '"]').find(document.getElementsByClassName('phantom')).remove()
} else if (prism.$ngscope.appstate === "widget") {
$(document.getElementsByClassName('phantom')).remove()
}
})
Hope that helps to achieve your goal!