npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tableau/embedding-api

v3.12.0

Published

Implementation for Tableau Embedding Api

Downloads

22,324

Readme

How to use the Tableau Embedding API

The Tableau Embedding API enables you to integrate Tableau visualizations into your own web applications. Add custom controls, and take advantage of modern, secure methods of authentication to interact with the visualization from your web application.

  1. The Embedding API library is available in multiple versions, and each version of the library corresponds to a specific version of Tableau Server. For compatibility, you should use the version of the library that matches the version of Tableau you are using. Using the table found at Versions of the Tableau Embedding API, determine the version of the NPM package to install. For example, if your embedded vizzes are hosted on Tableau version 2023.2, you should install version 3.6.x of @tableau/embedding-api.

  2. Install the version of Tableau Embedding API library that is compatible with the version of Tableau . For example, the following command installs the v3.9.0 of @tableau/embedding-api library in the node_modules folder of the current directory.

    npm install @tableau/[email protected]
  3. In your JavaScript or TypeScript code, import the TableauViz object from the Embedding API v3 library. You can then create a new instance of the object and configure the object with the path to the view and other properties and methods supported by the object (See Configure Embedding Objects and Components). To simplify your code and improve load times, import just the classes you need, for example TableauViz to create the JavaScript object and TableauEventType to set an event listener. To import TableauViz and TableauEventType, you would use the following:

    import { TableauViz, TableauEventType } from '@tableau/embedding-api';
  4. Here is an example to initialize TableauViz :

    HTML Code

    <div id="tableauViz"></div>

    JavaScript/TypeScript Code

    const viz = new TableauViz();
    
    viz.src = 'https://my-server/views/my-workbook/my-view';
    viz.toolbar = 'hidden';
    
    document.getElementById('tableauViz').appendChild(viz);

    It’s important to note that creating the object (new TableauViz()) does not render the view. To do that, you must add it to the DOM that is, add it to document using appendChild(), as in the example above.

For more information

Refer to Official Tableau Embedding API Documentation