Code Monkey home page Code Monkey logo

embedding-api-v3-samples's Introduction

embedding-api-v3-samples

Tableau Supported

This repository contains samples for the Tableau Embedding API V3. Official developer documentation can be found here.

Getting Started

  • Clone this repository
  • Try the samples
  • Use 'Issues' to note any bugs or to request new samples
  • Let us know if you have samples of your own you'd like to share
  • Check out the Tableau Developer Portal at http://developers.tableau.com to get a free Developer Sandbox and for tutorials, official docs, and the community forum

Embedding API V3 Samples

These are created and maintained by Tableau.

Demo Source Code Description
Basic Embed via Web Component basicEmbeddingWebComponent.html Embed a visualization using <tableau-viz> web component. For more information about using the web component, see Basic Embedding.
Basic Embed via JS Initialization basicEmbeddingJSInitialization.html Embed a visualization using TableauViz object. For more information about using the TableauViz object, see Basic Embedding.
Dynamic Load dynamicLoad.html Dynamically load and remove visualizations. Click the Previous and Next buttons to display other visualizations in a predefined list.
Custom Context Menu customContextMenu.html Rename and add items in a context menu. For more information, see Add Custom Context Menus.
Filter filter.html Apply a filter to a visualization using controls on the page. For more information about using filters, see Filter the View.
Get Data getData.html Get the underlying data for the currently displayed viz.
Get Logical Data getDataTableReader.html Get the logical data for the currently displayed viz using the DataTableReader.
Resize resize.html Resize a visualization to a size that you specify.
Respond to Events respondToEvents.html Display information about marks as you select them. For more information about responding to events, see Add Event Listeners.
Select Marks selectMarks.html Select a set of marks in a visualization.

embedding-api-v3-samples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

embedding-api-v3-samples's Issues

annotateMarkAsync, 403

Hello, I tried to use annotateMarkAsync in example respondToEvents.html, but it told me that it Failed to load resource: the server responded with a status of 403 (), as shown in the figure. Is there any way to solve this problem?
WX20230613-201933

[BUG] Unable to retrieve all data selected in a categorical filter with all selected values in a multiple Data Source Workbook on Tableau Cloud

Hello,

We're trying to retrieve the data from a filter.
We have a Viz that uses two Data Sources. One is used to show data on the Viz and the other is used to filter.

In the Tableau UI it works perfectly, but, with the embedding API we are facing an issue:

Error ! Cannot get filters: internal-error: get-categorical-domain: {"timeStamp":"2024-04-23 09:38:52.513","errorResponseType":"Generic","errorType":"LogicException 2024-04-23 09:38:52.513 (ZieBrNluy6temZX7O9kN_wAAAFU,0:0):","errorExtras":"(ZieBrNluy6temZX7O9kN_wAAAFU,0:0)","details":["Internal Error - An unexpected error occurred and the operation could not be completed."],"message":"LogicException: Internal Error - An unexpected error occurred and the operation could not be completed.","type":"exception","communityLink":"https:\/\/public.tableau.com"}, status: 500, textStatus: error - internal-error

This problem doesn't occur when we de-select one element in the filter.

You can recreate this problem with this glitch.
You can find the workbook used in the Glitch here: TrueStar.twbx.zip

Keeping the filters on dashboard's page refresh

Hi,
We have a projects with embedded Tableau dashboards and our client is expecting that state of filters, selecte tab, parameters, etc. will be kept after page refresh in a browser. Such functionality is present when you access Tableau dashboard directly on Tableau server, but not while embedding dashboard through web component / JS initialisation.

Is such scenario currently supported?
If yes, then how to achieve it?

[ENHANCEMENT REQUEST] Downloading images directly from the code

Our company Wiiisdom creating an application that uses the embedding API to retrieve data from Vizzes in automation.

Unfortunately, when we are downloading the image we need to click on the "Download" button in the embedded Viz. This download is in the user directory. But, when the user enables the "Save as" capability in its browser configuration we are unable to retrieve the image.

Enhancement

Would be it possible to have a function directly in the embedding API to download the image?

Add sandbox attribute to the iframe element

We would like to use your embed component within our application. The problem is that the iframe created internally by the Viz webcomponent doesn't have the sandbox attribute restriction. More info https://web.dev/sandboxed-iframes/

We would like to have sandbox attribute with allow-scripts allow-same-origin. It shouldn't break the reporting functionality, but it should be safer for use in other applications.

It should only be a one line change in your library:

this._iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin')

Dashboard width dynamically changes but not height

Hi,

We're trying to have our automatic sized dashboard dynamically resize when the user's window size changes. I'm using your simple code in basicEmbeddingWebComponent.html (minus the definition of the div container where the style is set) and have noticed that the width of the dashboard changes when I make the window narrower but the height does not change when I make the window shorter/taller. In fact, the height seems to be stuck at 600px. The height of the dashboard itself is definitely automatic.

Would it be possible to add the same dynamic functionality to height that is currently applied to width?

Thanks

Prefetch with Embedding API

Hi Team,

I would like to know whether we can use the Prefetch functionality with Tableau Embedding API.

If yes, please help me understand how we can do it.

Regards
Srinivas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.