microsoft / PowerBI-visuals-tools

Contains tools for building/packaging Power BI visuals
https://www.powerbi.com
MIT License
330 stars 149 forks source link

RHTML template broken in pbiviz versions 4.0.6+ #449

Closed j-murray1 closed 11 months ago

j-murray1 commented 1 year ago

The RHTML template is broken in later versions of pbiviz. Any custom visual packaged from a RHTML template created with pbiviz v4.0.6+ does not render/renders blank when imported into Power BI. It appears there is some broken interaction with the plotly package in R because a custom visual will render correctly when using an alternative R plot object to create the HTML widget (e.g. ggiraph package). However, this isn't a reasonable solution because plotly is the only R package supported on Power BI Service that can add interactive capabilities to R plots.

j-murray1 commented 1 year ago

Just want to follow up on this to mention that I've tested "pbiviz new [folder name] -t rhtml" for pbiviz versions 4.0.6 - 4.3.2 and the template remains broken through all these updates. You can create and package the custom visual, but when imported into PBI (and adding an arbitrary data element to get it to load), it simply doesn't render.

There is no mention of this in the help documentation for developing custom visuals. So, if a user were to follow the Microsoft-provided documentation to develop an RHTML visual, they will download the latest version of powerbi-visuals-tools and end up with something that doesn't work, contrary to what the help documentation is telling them.

Integrating R plotting developed outside of PBI allows users fine control over their visualizations as well as providing an avenue to generate visuals beyond the stock plotting capabilities inside PBI. I hope PBI will continue to support R custom visuals; I don't want to see this functionality left behind.

AleksSavelev commented 11 months ago

Hello @j-murray1,

Thank you for the issue, we'll fix it in the upcoming version. For now, you can add these lines to your privileges within capabilities.json:

"privileges": [
    {
      "name": "WebAccess",
      "parameters": ["*"]
    }
  ]

Let me know, if it doesn't work for you.