Below script allow you to add a button in Sisense widget and specified URL will be opened when you click on it
widget.on("ready", function(w, args){
w.chart[0][Object.keys(w.chart[0])[0]].hc.renderer.button('Open', 10, 10)
.attr({
zIndex : 10,
height: 15,
width: 50,
'text-align': 'center'
})
.on('click', function() {
window.open('https://www.clickdimensions.com/links/TestPDFfile.pdf') //url of website or document
})
.add();
});
Comments