Skip to Main Content
Spotfire Ideas Portal
Status Already exists
Product Spotfire
Categories Visualization
Created by Guest
Created on Jan 22, 2019

Multi Tab Presentation Mode in WebPlayer

My coworker and I have posted, read, and asked several places across the internet if anyone has created a clever, seamless, easy way of automatically switching tabs in the WebPlayer.  So far we have been met with a resounding no.  This seems like a very beneficial, missed function of the product and something we have had requested of us several times.  If a department has built a dashboard with a call stats tab, ticket count allocation tab, and open action KPI tab, it should be very easy to display all three of these in a 20 second rotation on a large screen so a manager and department know how things are going. 

Could a menu be added that would enable/disable tab rotation, have drop downs for tabs that should be included and then rotated, and finally a per tab duration?  This way if one tab has more detail it could be set 5-10 seconds longer than the other 1, 2, or however many tabs are in the rotation. 

 

Thank you!

  • ADMIN RESPONSE
    Jan 24, 2019

    There are no current plans to add this functionality as a menu item. However it should be possible to achieve exactly what you ask for with the JavaScript API.

    The example below will display an analysis, and automatically switch tab every 5 seconds.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>MashupTest</title>
            <script src="http://op1020.spotfire-internal.com/spotfire/js-api/loader.js"></script>
    </head>
    <body>
        <div id="carousel" style="height:800px;width:1000px"></div>
    </body>
        <script>
            function onReadyCallback(response, app)
            {
                if (response.status !== "OK")
                {
                    alert("Could not load API");
                    return;
                }
            
                var page = 0;
                app.openDocument("carousel", page);
                app.onOpened(function(doc) {
                    var pageIndex = 0;
                    doc.getPages(function (pages) {
                        window.setInterval(function () { doc.setActivePage(++pageIndex % pages.length); }, 5000);
                    });
                });
            }

            var serverUrl = <Your server URL>;
            var analysisPath = <Path to your Spotfire analysis>;

            spotfire.webPlayer.createApplication(
                serverUrl,
                null,
                analysisPath,
                "",
                false,
                "7.14",
                onReadyCallback
                );
        </script>
    </html>
  • Attach files