Question

Auto-scrolling and auto-changing dashboard

  • 3 October 2017
  • 2 replies
  • 355 views

Hello, Lookers!


Is auto-scrolling and/or auto-changing dashboards in your Product Team roadmap?

(like Klipfolio’s tv mode, where selected dashboards are loaded every x minutes)


If not, anyone recommends a working plugin that can, at least, auto-scroll up and down the dashboards?

We are trying to implement some monitoring screens and this feature would be really helpful!


2 replies

Userlevel 2

Hi @Luis,


Auto-changing dashboards is actually a functionality currently possible in Looker, using the private embed dashboard functionality and a Google chrome plugin called Revolver. Here are the steps to set this up. Auto-scrolling is not currently on our product roadmap, but I will pass your feedback along to the product team!


Hope this helps.


Quinn

That’s great @quinn.morrison !!


I actually worked out how to make an scroller jquery script to run on the dashboard page.

We calculate page height inside the scroll function.

To modify the speed of scrolling, change the speed variable.

To make it run, just paste it on the browser console (F12) and hit Enter.

Here is the code:


function scroll(speed) {
$('.borderless').animate({ scrollTop: (function() {
var pageHeight = 0;

function findHighestNode(nodesList) {
for (var i = nodesList.length - 1; i >= 0; i--) {
if (nodesList[i].scrollHeight && nodesList[i].clientHeight) {
var elHeight = Math.max(nodesList[i].scrollHeight, nodesList[i].clientHeight);
pageHeight = Math.max(elHeight, pageHeight);
}
if (nodesList[i].childNodes.length) findHighestNode(nodesList[i].childNodes);
}
}

findHighestNode(document.documentElement.childNodes);

// The entire page height is found
return pageHeight

})() - $(window).height() }, speed, function() {
$(this).animate({ scrollTop: 0 }, speed);
});
}

speed = 50000;

scroll(speed)
setInterval(function(){scroll(speed)}, speed * 2);

Hope it help others!


Luis Gustavo

Reply