# tableau-js

> Unofficial Tableau javascript api.

Latest version **1.0.4** (published 2022-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install tableau-js
pnpm add tableau-js
yarn add tableau-js
bun add tableau-js
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-08-15 |
| First published | 2022-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 941.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | spraus_lau |
| Maintainers | spraus_lau |
| Keywords | tableau, tableau js, tableau ts |

## Links

- npm: https://www.npmjs.com/package/tableau-js
- Repository: https://github.com/noverliu/tableau-api
- Homepage: https://github.com/noverliu/tableau-api.git
- Issues: https://github.com/noverliu/tableau-api/issues
- npm.io page: https://npm.io/package/tableau-js

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-08-15
- 1.0.3 — 2022-08-13
- 1.0.2 — 2022-08-13
- 1.0.1 — 2022-08-12

## README

# Tableau JavaScript API & Type declaration

[![Node.js CI](https://github.com/noverliu/tableau-api/actions/workflows/node.js.yml/badge.svg)](https://github.com/noverliu/tableau-api/actions/workflows/node.js.yml)

[中文版本](README_zh.md)

Tableau provide an official JS API to embed dashboard into webpage [link](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api.htm). But the only way to use it is add external reference. The type support for TypeScript wasn't provided as well.

````html
<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.

* [More detail of Tableau JS API](https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_ref.htm)

### Install

```bash
npm install tableau-js
```

### Usage

```js
// 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
// 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);
```

---
_Source: https://npm.io/package/tableau-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
