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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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!

Anonymous
Not applicable

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[email protected]"

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors