1.0.4 • Published 2 years ago

tableau-js v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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);
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago