Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to see the DOM of a custom R HTML visual?

Hello,

 

  In this question, the OP is able to see the DOM of a custom visual in an iframe. How can we do that? I'm doing custom R HTML visuals with pbiviz.

1 ACCEPTED SOLUTION
WZorn
Helper II
Helper II

@Anonymous ,

 

I am developing a custom visualization from scratch.  In order to run and view your visualization that's under development, there are quite a few steps you go through to "link" your local development environment to powerbi.com.  The viewing of the custom visualization is done by editing a powerbi file that has been uploaded and adding the "developer visual".

 

To see the DOM of your R visual, I don't see a reason why you couldn't upload your Power BI analysis file to your workspace on powerbi.com.   Viewing your visualization there, will allow you to use the browsers developer tools to inspect the DOM and even see possible errors in the console.

 

Hope this helps.  I know that's a lot of work to see the DOM, but there is no way of viewing it that I know of in the desktop software.

 

William

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Ah ok, I can open the report on app.power.bi.com, and here I have "Inspect element".

WZorn
Helper II
Helper II

@Anonymous ,

 

I am developing a custom visualization from scratch.  In order to run and view your visualization that's under development, there are quite a few steps you go through to "link" your local development environment to powerbi.com.  The viewing of the custom visualization is done by editing a powerbi file that has been uploaded and adding the "developer visual".

 

To see the DOM of your R visual, I don't see a reason why you couldn't upload your Power BI analysis file to your workspace on powerbi.com.   Viewing your visualization there, will allow you to use the browsers developer tools to inspect the DOM and even see possible errors in the console.

 

Hope this helps.  I know that's a lot of work to see the DOM, but there is no way of viewing it that I know of in the desktop software.

 

William

To add to this, R visuals are a little different to regular (TypeScript) visuals. There is boilerplate TypeScript code that hosts the visual, just like a regular one, but the R code is delegated elsewhere (local R on your machine, or a MS-hosted version of R in the Service).

With the visual DOM, you can indeed inspect the visual in the Service using your browser tools.

For a standard R visual, this is a static image that is base64 encoded, e.g.:

dmp_0-1628538420275.png

For an RHTML visual, Power BI will convert the resulting respons from the R interpreter and add the generated HTML to the DOM, e.g.:

dmp_1-1628538679779.png

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.