JavaScript API

The Tableau JavaScript API is awesome, but it’s definitely got its quirks. Here are resources to make working with it as easy as possible.

Your first stop should be the Official Tutorial.

Then I would suggest looking at the Samples. The samples do a better job than the reference guide in showing how things should work.

After that, I’ve written an overview and set of examples for working with some of the concepts. One that is very useful to understand, and not always obvious, is setting filters and parameters prior to load. The code for most of these examples exists on GitHub as various files.

The Official Reference is useful, but make sure you test things out using the JavaScript console of your favorite browser just to confirm everything is working like you expect. It’s all complex and definitely should be checked.

Specific Solutions

Getting the values of all marks in a sheet

Using Tableau JavaScript API to Fill Parameter from a Selection

Embedding Multiple Tableau Views in a Single Page

Detecting all of the data sources in a dashboard