Tableau Public may mean a couple of things:
- A free desktop software for visual data analysis.
- A website for hosting Tableau Public vizzes (dashboards/charts/storyboards).
Here we are going to summarize a number of ways by which one can embed a Tableau Public viz in a web page.
1.Pop-up
This is my favorite way to embed a viz.
For example, click this link. You will see a viz popping up. Close the viz, and you see this post again.
How to embed a Tableau Public viz like that?
- Go to the viz's Tableau Public page. Copy link by clicking the share button.
Use that URL link anywhere in your web page, such as hyperlinking some text or an image.
Then go the viz's home page and edit its details. Fill the URL link of your web page, as the Permalink of the viz. And save the change! Then you are done.
2.Embed code
In blogger.com/blogpost.com editor, turn on the HTML mode. Copy the embed code and paste it into your html source. Place it carefully where you intend it to be.
There are two options for getting the embed code.
Option 1
Go to and viz and you see the embed code by clicking the share button. The code is a bit long and messy. But you don't need to care about it.
Here is a glance of the embed code for your curiosity.
You can insert this cleaner code into the html source. Note that the URL is from the share button. The height and width are from your Tableau dashboard canvas.
<iframe
frameborder="0"
height="400"
width="575"
scrolling="no" src="https://public.tableau.com/views/Tableau10TorchRelay_Embed/Tab10TorchRelay?:embed=yes">
</iframe>
Check out this for embed in Weebly and this for Wordpress. You may notice that the share button and the embed code format changed in the latest version of Tableau Public.
There are a few parameters in the Tableau Public URL you can use to control the appearance of the viz. I don't know all of them. But this one could be very useful if you want to hide the extra control buttons of the viz, such as download, share etc. Just attach "&:showVizHome=no" to the previous URL.
frameborder="0"
height="400"
width="575"
scrolling="no" src="https://public.tableau.com/views/Tableau10TorchRelay_Embed/Tab10TorchRelay?:embed=yes&:showVizHome=no">
</iframe>
Here is the result where the lower part is hidden.
Do you have any idea after removing to tool bar how to give the option to create a PDF, download the data to CDC/excel etc. I need these features but cannot allow the "share" option to be visable
ReplyDeleteIn your case, the simple solution is still to show the tool bar. There is another solution based on Javascript API. Check it out http://russellchristopher.me/htdocs2/htdocs/index.html
DeleteHi Alexander, Thank-you for your response. I have managed to remove the toolbar and then created some javascript to do a range of different things (pdf/filters etc) my new problem lies in the fact that I'm publishing through WordPress which strips out the javascript.
DeleteCould you try another blog platform? Would like to see your js in action.
DeleteI've put the code I am using on drop box in a text file. https://www.dropbox.com/s/ypmbriu8ozr9p4z/Tableau%20Javascript.txt?dl=0
DeleteI am stuck with WordPress at present for the platform and the material contained is commercially sensitive, however I have changed the code to a point at a Tableau Public file - just imagine that the ToolBar is not there the buttons do the work (Toolbar cannot be hidden on Public Dashboards)
Tried your code. It works! I also tried download workbook button. It also works. Blogspot doesn't allow js either.
DeleteIf you wish, I may ask someone to host the page for you.
DeleteHi.. How can we embed tableau public in our lms (wordpress) so that students can learn to use it.. The challenge also is we dont want the students redirected or to open a new tab but work within the website.. Thank you
ReplyDeletethank you SO MUCH!! I was beyond frustrated until I found this.
ReplyDeletethank you so much. this is really helpful in showcasing my vizzes in my blogsite.
ReplyDelete