Test project running Tableau in Blazor, to help answer https://stackoverflow.com/questions/58519173/how-to-embed-tableau-into-asp-net-core-blazor
I used the basic sample at https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_sample_basic_embed.htm and made the following changes to make it work in Blazor:
- use a Blazor
@ref
to get an element reference - created
tableauInterop.js
in thewwwroot
folder - add the Tableau library to
_Host.cshtml
and imported thetableauInterop
as well - modified
Index.razor
to add adiv
and anOnAfterRenderAsync
override to invoke the interop lib