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

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.

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
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.