Getting Started with the Tableau Javascript API

Tableau offers an API that lets you embed visualizations on the web and then control them via javascript functions.  This handy utility can be used to do all kinds of cool things which I will share in the future.  First though, here’s how you can get started.

What you need

  • Web Server
    • The Javascript API is for Web only (sorry Desktop) and requires that the code be hosted outside of the Tableau environment, so you’ll need a web server to host your files on.  For experimentation, you can just run everything off of your local drive.  All you need is a web browser!
  • API Files
    • This is a single file that contains all of the API code.  You just have to include it.  A minified version can be found on public here, or you can grab your specific version from your Tableau Server installation at Program Files\Tableau\Tableau Server\8.2\wgserver\public\javascripts\api as well as the debug version which is cleanly formatted.
  • Tutorial
    • Tableau has some excellent resources to get you going, so check out the video, online interactive tutorial and detailed API Reference via the links below.

 

Resources:

Intro Video: http://www.tableausoftware.com/learn/tutorials/on-demand/javascript-api-intro-and-embed

Online Tutorial: http://onlinehelp.tableausoftware.com/samples/en-us/js_api/tutorial.htm

API ref: http://onlinehelp.tableausoftware.com/v0.0/server/en-us/help.htm#js_api_ref.htm

 

You may also like...