rhtml
3 Topicsr HTML visual widget - Plotly elements have suddenly stopped working across multiple visuals
I have created several custom r HTML visuals that use the Plotly library to output an html file, as per this tutorial from Microsoft: Build a funnel plot from R script to R visual - Power BI | Microsoft Learn At 4pm GMT 2023-06-20, all of these visuals were working fine in PowerBI Desktop (July 2022 and May 2023 versions across two machines), as well as in multiple reports published to the PowerBI service. However, at 9am GMT today (2023-06-21), all r HTML plotly visuals just display a blank output on all of the platforms mentioned above. Within one of the visuals, I have created an option to instead display the output as a HTML datatable using the R DT library. This output still displays correctly, so all of the underlying R calculations seem to be working, as well as the ability to output an HTML visual - just not one that is using Plotly. Is anyone else experiencing this, or is anyone aware of any changes that may have suddenly caused this to occur? The visuals have been created using pbiviz v4.0.5 due to known issues with later versions of the rhtml template. Re: Issue with R plotly in pbiviz versions 4.0.6+ - Microsoft Fabric Community679Views0likes1CommentCannot import multiple r-script sources in RHTML visual
I'm unable to import multiple r-script source files in RHTML visuals. Power BI and R seem to import the first file referenced, but any subsequent source(./r_files/foo.r) calls appear to be ignored. This behavior is not getting repeated in RStudio using the same instance of R. Any guidance would be appreciated. Steps to reproduce: 1) Create new visual using the RHTML template and create a new .r file in the r_files directory: > pbiviz new sampleRHTMLVisual -t rhtml > cd sampleRHTMLVisual > echo $null >> .\r_files\test.r 2) Flesh out required information in pbiviz.json: visual:description visual:supportUrl visual:author:name visual:author:email 3) Insert the following code as the first line in script.r: source('./r_files/test.r') 4) Compile and load the visual: > pbiviz package 5) Observe the error message: Can't display this visual. R script error. Error in libraryRequiredInstall("ggplot2"): could not find function "libraryRequireInstall" Execution haltedSolved5.8KViews0likes7CommentsUpdated rhtml template?
Can anyone provide some guidance on building a basic rhtml visual? I'm trying to upgrade one of my custom visuals from the 1.12.0 api to 2.2.2. I'm ultimately trying to make the jump to v3.0, but am hoping that understanding how to adapt to v2.2 will make the jump to v3.0 easier. Due to the ugly state of the custom visuals tutorials, I'm in over my head with trying to modify my existing files, so I'm trying to start again from scratch. I've tried creating a barebones visual following https://github.com/Microsoft/PowerBI-visuals/blob/master/RVisualTutorial/CreateRHTML.md by running: pbiviz new sampleRHTMLVisual -t rhtml cd sampleRHTMLVisual pbiviz package This then bombs out with: PS C:\Users\foo\sampleRHTMLVisual> pbiviz package info Building visual... info Start preparing plugin template (node:22948) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead info Finish preparing plugin template ERROR Failed to compile with 1 errors 3:54:44 PM error in C:\Users\foo\sampleRHTMLVisual\.tmp\precompile\visualPlugin.ts [tsl] ERROR in C:\Users\foo\sampleRHTMLVisual\.tmp\precompile\visualPlugin.ts(1,10) TS2305: Module '"C:/Users/foo/sampleRHTMLVisual/src/visual"' has no exported member 'Visual'. info Package created PS C:\Users\foo\sampleRHTMLVisual> pbiviz info info visual.name.................. sampleRHTMLVisual info visual.displayName........... sampleRHTMLVisual info visual.guid.................. sampleRHTMLVisualFD5DB360EB6347DAB2B06990D9A98AE1 info visual.visualClassName....... Visual info visual.version............... 1.0.0 info visual.description........... info visual.supportUrl............ info visual.gitHubUrl............. info apiVersion................... 2.2.0 info author.name.................. info author.email................. info assets.icon.................. assets/icon.png info style........................ style/visual.less info capabilities................. capabilities.json info dependencies................. dependencies.json info stringResources.............. []4KViews0likes3Comments