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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
blep
Regular Visitor

Custom visual "scriptResult" dataview mapping: "scriptOutputType" values other than png and html?

Are "png" and "html" the only valid values for "scriptOutputType"? The capabilities.json schema just says a string, and when I tried changing this to "json" or "xml" I got errors from the developer visual saying that the script is not returning an image, even when visual.ts doesn't actually refer to the dataview at all (e.g. if the visual is only supposed to display "hello world" text or something like that). I'm not sure whether this is because of a problem with my R/TS code, or because the behaviour is different when the visual is expecting an output from R, or something else entirely. I've been through the docs and the repos of several other R-powered custom visuals, but have only been able to find code examples where the result of the R script is returned in html or png format.

 

Ideally I'd like the R portion of the code to handle the calculations but not the plotting, so that I can use the existing powerbi-visuals-utils to handle all the stuff relating to display, interactivity, etc. I want to maintain as much consistency of appearance and functionality with the native visuals as possible.

 

Has anyone come across R-powered custom visuals where the R code doesn't do the plotting? Am I missing something vital, or is what I want to do just not supported?

1 REPLY 1
Anonymous
Not applicable

Hi @blep,

I don't think you can do custom with the custom visual return type. Most of them have been defined in the package function structure. 

If you want to do more integration with R scripts, I'd like to suggest you switch to r visual and it will share more permission to use R script library operations.

Notice: custom visuals are different from R visual, it obviously contains limits to use different functions and interfaces processing backend functions.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.