tableau-js

Unofficial Tableau javascript api.


Keywords
tableau, tableau js, tableau ts
License
MIT
Install
npm install tableau-js@1.0.2

Documentation

Tableau JavaScript API & Type declaration

Node.js CI

中文版本

Tableau provide an official JS API to embed dashboard into webpage link. But the only way to use it is add external reference. The type support for TypeScript wasn't provided as well.

<script src="https://YOUR-SERVER/javascripts/api/tableau-2.min.js"></script>

This project was modified base on Tableau official api. Type support was included.

Install

npm install tableau-js

Usage

// JavaScript
import { Viz } from 'tableau-js'

const url='http://YOUR_DASHBOARD/';

// create container
const div=document.createElement('div');

const viz=new Viz(div, url);

document.body.append(div);
// TypeScript
import { Viz, VizCreateOptions } from 'tableau';

const url='http://YOUR_DASHBOARD/';

// create container
const div=document.createElement('div');

const option: VizCreateOptions = {
	height: '800',
	width: '600'
};

const viz=new Viz(div, url, option);

document.body.append(div);