简体   繁体   English

在通过aspx加载的Tableau仪表板上使用Tableau Javascript API

[英]Using Tableau Javascript API on Tableau Dashboard Loaded through aspx

I have a non-public Tableau Dashboard that I load through aspx file, which supplies the required authentication, username and password, and allows the site visitor to view the tableau on the website, with the ticket it receives. 我有一个非公开的Tableau仪表板,可以通过aspx文件加载该仪表板,该仪表板提供了所需的身份验证,用户名和密码,并允许网站访问者使用收到的票证查看网站上的Tableau。

So, now, I want the Tableau to load on the website with filters already applied through the Javascript API. 因此,现在,我希望Tableau可以使用已经通过Javascript API应用的过滤器加载到网站上。

Or, how can I use the "onFirstInteractive" option of the Javascript? 或者,如何使用Javascript的“ onFirstInteractive”选项? The problem is I don't need to use the Javascript API to load the Tableau but just need it to apply filters on the Dashboard. 问题是我不需要使用Javascript API来加载Tableau,而只需要它在仪表板上应用过滤器。

function tableauFilter (){
var placeholderDiv = document.getElementById("viz2"); // Don't need this
var url = "https://public.tableau.com/views/Test_1228/Dashboard1" // Don't need this either
var options = {
onFirstInteractive : function(FilterName,Value){   //This is what I want to be able to use  
    activesheet = viz.getWorkbook().getActiveSheet(); 

Any help is highly appreciated. 非常感谢您的帮助。

我必须自己进行测试,以确保信心,但是我很确定Javascript API仅可用于将过滤器应用于已使用Javascript API加载的仪表板。

Can't you just modify the URL itself to include the parameter values as per your need? 您能否仅根据需要修改URL本身以包含参数值?

This and this may be of help. 可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM