Pivot Table 1: Center The Pivot Inside The Dashboard Widget
This Script Is Created To Center The Pivot Table Inside The Dashboard Widget.
Instead of Pivot Table being anchored to the top left, you can use this script to make the pivot centered both vertically and horizontally.
Please note, this working only for "Pivot Table widget" with version 1.
STEP-BY-STEP GUIDE:
- Open a pivot widget in Sisense dashboard and go to 'Edit Script'
- Copypaste the below script and press save button
- Test the results, see how a Pivot table is centered in your screen
- Feel free to modify values in the script "margin-left" and "margin-top" to make the Pivot in the right position
Script:
widget.on('ready', function(widget) {
var widgetContainer = $('[widgetid="'+ widget.oid + '"]')
if (prism.$ngscope.appstate === "dashboard") {
$('[widgetid="'+ widget.oid + '"]').find(document.getElementsByClassName('p-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()
}
})
THIS IS HOW IT LOOKS LIKE:
Updated 03-02-2023
intapiuser
Admin
Joined December 15, 2022