Install the Tableau Viz Lightning Web Component and Customize the View
Launch Your Trailhead Playground and Install Tableau Viz
If your Trailhead Playground isn’t open, go ahead and open it. Scroll to the bottom of this page and click Launch. If you see a tab in your org labeled Install a Package, great! Follow the steps below.
If not, from the App Launcher (), find and open Playground Starter and follow the steps. If you don’t see the Playground Starter app, copy this AppExchange link and check out Install a Package or App to Complete a Trailhead Challenge on Trailhead Help.
- Click the Install a Package tab.
04t5w000005diA4AAIinto the field.
- Click Install.
- Select Install for Admins Only, then click Install.
When the app is finished installing, you see a confirmation page and receive an email sent to the address associated with your playground. Go ahead and click Done.
Now, go ahead and embed the Tableau Viz Lightning web component into the home page of your playground.
Add a Tableau View to the Home Page
- Click , then find and select Sales.
- Click and select Edit Page.
- Drag the Tableau Visualization component from the Custom - Managed list to the top of the Page Canvas.
Change the URL
By default, the Tableau Viz Lightning web component loads a Tableau view from Tableau Public. You can change the view by entering a different URL. It supports embedding views from Tableau Public, Tableau Online, and Tableau Server.
For this project, use a Tableau view from Tableau Public.
- Open the following URL in a separate tab.
- Scroll to the bottom of the visualization. In the toolbar, click the Share icon. You might need to maximize the browser window or switch to fullscreen to view the toolbar.
- In the Share dialog box, copy the URL from the Link text box.
Note: do not use the Embed Code, as this contains extra HTML code for embedding the view in a standard HTML page. Make sure not to modify the view before copying the URL. If you happen to modify the view, you should see a tab in the Share dialog box indicating what view you're on. Click Original View in this case, before you copy the URL from the Link text box.
- In your Trailhead Playground, paste the link into The URL for the Tableau view text box.
When you click away, the new Tableau view shows up in the Lightning page preview.
Customize the View
Use the options on this page to control the size of the view and whether you want to show the Tableau toolbar or any tabs. Note that you can’t hide the toolbar on views from Tableau Public, as Tableau Public is available for free.
By default, the height is 550 pixels. This view contains a lot of information and you don’t want your users to have to scroll too much to see it, or worse, have content that is cut off from view.
- In the Height text box, change the height to
850. When you click away, the preview refreshes and more information is displayed.
- Click Save.
- Then click Activate.
- Choose Assign as Org Default, and then click Save again.
- Click Back in the Lightning toolbar to go back to the page you were on.
- Examine the Tableau view to see the amount of information displayed on the page. Notice how you can use the scroll bars in the view to see the data that is hidden from view.
You can also control when the Tableau Viz Lightning web component appears on a page by selecting component visibility filters. For more information about the Set Component Visibility options, see Dynamic Lightning Pages in Salesforce Help.
Voilà! You’ve just embedded a Tableau view in Salesforce. Now you can add a Tableau view to a Lightning record page and see how you can filter the view based upon the page or fields.