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
mjohnsen
Frequent Visitor

blank custom visuals

Greetings,

 

I'm having some trouble with my custom rhtml visual. When i upload it to PowerBI and add in the data, it loads for a second, then turns out blank.

 

This is my first time constructing custom visuals, where i simply followed a guide on medium (Create Dynamic Custom Visual in Power BI using R, ggplot2 and plotly | by Shalabh Thakur | Medium).

 

output from pbiviz package (pbiviz file is compiled in dist folder), but I get a certificate warning (have installed the certificate, but this is not my strong side):

mjohnsen_0-1669900195435.png

pbiviz output:

mjohnsen_1-1669900307464.png

 

My procedure to construct a custom pbiviz:

--> go to designated folder

--> Run code: pbiviz new my_visual -t rhtml

--> Add info in pbiviz.json file

--> Alter script.r file (scriptis tested and works)

--> Run code: pbiviz package

--> Import .pbiviz from dist to Power BI

--> Add the column I want to be displayed

 

The R script looks like this: simple script made for testing. Should work for any numeric column

source('./r_files/flatten_HTML.r')

############### Library Declarations ###############
libraryRequireInstall("ggplot2");
libraryRequireInstall("plotly")
####################################################

################### Actual code ####################
names(Values) = "X"
g = ggplot(data = Values, mapping = aes(X)) + geom_histogram();
####################################################

############# Create and save widget ###############
p = ggplotly(g);
internalSaveWidget(p, 'out.html');
####################################################

################ Reduce paddings ###################
ReadFullFileReplaceString('out.html', 'out.html', ',"padding":[0-9]*,', ',"padding":0,')
####################################################

 

The only error I can observe is the certificate warning. However, the .pbiviz file is compiled (I assumed everything was okay then). I have imported the certificate by running:

--> pbiviz --install-cert

--> choose current user

--> Trusted Root Certification Authorities

* I was never prompted for any password, as the guide mentions?

 

Does any one have any idea what my problem may be?

 

I'm also running the latest version of pbi desktop.

 

Thanks!

 

 

1 ACCEPTED SOLUTION
j-murray
Frequent Visitor

Hi,

 

Your issue here is due to the certification not being set up properly. However, even if you resolved that you will still run into the blank visual problem. See my post here: https://community.powerbi.com/t5/Developer/Issue-with-R-plotly-in-pbiviz-versions-4-0-6/m-p/2940046#...

 

You have the most recent version of powerbi-visuals-tools installed (v4.0.7). You need to rollback to version 4.0.5 and go through the certificate install again. Then, you should be able to sucessfully set up a new rhtml template folder, package, and import. 

 

Hope this helps!

View solution in original post

4 REPLIES 4
Germanfigueroa
Frequent Visitor

thanks a lot... really has the same trouble.

j-murray
Frequent Visitor

Hi,

 

Your issue here is due to the certification not being set up properly. However, even if you resolved that you will still run into the blank visual problem. See my post here: https://community.powerbi.com/t5/Developer/Issue-with-R-plotly-in-pbiviz-versions-4-0-6/m-p/2940046#...

 

You have the most recent version of powerbi-visuals-tools installed (v4.0.7). You need to rollback to version 4.0.5 and go through the certificate install again. Then, you should be able to sucessfully set up a new rhtml template folder, package, and import. 

 

Hope this helps!

Thanks a lot, saved my monday!

 

Here is the procedure i followed:

Followed all steps in this link:
Setting up an environment for developing a Power BI visual - Power BI | Microsoft Learn

1. Replaced "npm i -g powerbi-visuals-tools@latest" with "npm i -g powerbi-visuals-tools@4.0.5"

2. Replaced "@version" for all development libraries with latest stable version

 

I was now prompted with the correct certificate install aswell!

Hello,

 

I'm havign the same issue but I'm not sure exactly what I need to do to correct it. My coding skills are not great, is there a step-by-step process for

- rolling back to version 4.0.5 and going through the certificate install again.

- seting up a new rhtml template folder, package, and import ?

 

Thanks!

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.