Access Keys:
Skip to content (Access Key - 0)

Embedding Tableau visualizations on a website

One of the features of Tableau Server is that it allows you to embed your visualizations on websites. However, if you simply use the embed code generated by Tableau Server, users of mobile devices or smaller (or larger) screens may not be able to view and interact fully with your visualization.

Below are some steps we've found to work with Tableau visualizations. If you've had success with other settings, please let us know!

  1. Before publishing the workbook to Tableau Server, go to the Dashboard in Tableau Desktop and set the Size to Automatic.
  2. After publishing the workbook to Tableau Server, set the width style to 100% in the <div> and <object> tabs of the embed code. For example:
    • Original code
      <script type='text/javascript' src='https://tableau.mit.edu/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 1143px; height: 527px;'><object class='tableauViz' width='1143' height='527' style='display:none;'><param name='host_url' value='https%3A%2F%2Ftableau.mit.edu%2F' /> <param name='site_root' value='' /><param name='name' value='Regional_responsive/Obesity' /><param name='tabs' value='yes' /><param name='toolbar' value='yes' /><param name='showVizHome' value='n' /></object></div>
      
    • Updated code
      <script type='text/javascript' src='https://tableau.mit.edu/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 100%; height: 527px;'><object class='tableauViz' width='100%' height='527' style='display:none;'><param name='host_url' value='https%3A%2F%2Ftableau.mit.edu%2F' /> <param name='site_root' value='' /><param name='name' value='Regional_responsive/Obesity' /><param name='tabs' value='yes' /><param name='toolbar' value='yes' /><param name='showVizHome' value='n' /></object></div>

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

August 04, 2016

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
c-tableau c-tableau Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki