Skip to content

A version of the JS API for Tableau wrapped as an NPM module.

License

Notifications You must be signed in to change notification settings

justinmiller61/tableau-api-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tableau API JS

A version of the JS API for Tableau wrapped as an NPM module.

Node.js (Install)

Requirements:

  • Node.js
  • npm (Node.js package manager)
npm install tableau-api-js

Usage

To use this package:

app.component.ts:

  import { Component, OnInit } from '@angular/core';
  import * as Tableau from 'tableau-api-js';

  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
  })
  export class AppComponent implements OnInit {
    constructor() {}

    public initViz(): void {
      const containerDiv = document.getElementById('vizContainer');
      const vizUrl = 'https://public.tableau.com/views/WorldIndicators/GDPpercapita';
      const options = {
        width: containerDiv.offsetWidth,
        height: 700
      };

      const viz = new Tableau.Viz(containerDiv, vizUrl, options);
    }

    public ngOnInit(): void {
      this.initViz();
    }
  }

app.component.html:

<div id="vizContainer"></div>

This will provide you with the most up-to-date functionality in the API.

More details in the API documentation

About

A version of the JS API for Tableau wrapped as an NPM module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published