Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to develop several custom power bi visuals using R and Plotly. Previously I have not had any problem in developing ‘basic’ visuals, but would like to extend the visuals to include
1 Basic custom R/Plotly visual
I start a custom visual with the following steps
The visual is then compiled, I can add it to the Power BI report and it works fine.
2 Custom R/Plotly visual with data assignments
I start off with test custom visual as noted above and modify the capabilities.json file. I update the dataRoles and dataviewmappings sections to include 3 parameters: Xvalues, YValues and ColourValues.
The visual is then compiled (using pbiviz package in the command prompt)., I can add it to the Power BI report and it works fine.
3 Custom R/Plotly visual with data assignments and parameters
I am struggling to implement parameters within the customised visual. I have looked at Microsoft’s tutorial located at the following link.
According to the tutorial, I just have to change the capabilities.json file, the settings.ts file and the R script to identify whether a parameter value exists and assign a default value if required.
I have attempted to do that but can’t get the parameters working probably. Has anyone succeeded in getting the parameters working for a dynamic R custom visual? Or can share a link to a detailed tutorial that works?
Thanks.
Thanks for the links Amitchandak.
Unfortunately the links don't help with my problem.
Cheers,
Hi @Anthony_W ,
Please find the following links, hope they can help you.
https://radacad.com/create-custom-visual-with-r-and-json-part3
https://www.youtube.com/watch?v=NMXlWu_oeyA
Best Regards
Rena
Thanks for the links yinginr,
I am working through the Radacad example. I downloaded the example visual data and managed to compile the custom.
I did receive an initial error during compilation stating a 'Globalize' package was not available. The error gave instructions for how to install the package - npm install --save globalize. Once the package is installed, the custom visual compiled OK.
I added the visual to a power bi report, but now receive the following R related error:
Error in strsplit(names(values), "\\.") : non-character argument
Calls: %>% -> eval -> eval -> style -> strsplit
Execution halted
I tried to find to find the strsplit function in the R code in the custom visual files, but haven't found. I suspect it is in one of the packages. I am still investigating the location of the error...
Hi @Anthony_W ,
Which sample you are using? Please try the solution in the following link and check if it works after you find the related "package".
https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/strsplit
Best Regards
Rena
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |