Forum Discussion
R visual and custom visual to interact with other visuals
I have used both R visual and custom visual. But they are not interactive with other visuals on the canvas. For example, when I click on a dot on my custom visual, the other normal visuals on the canvas are not filtered. Is there anything I am missing?
1 Reply
- dm-p
Super User
Hi Anonymous,
For conventional custom visuals (written using TypeScript), interactivity doesn't "just work". This has to be coded manually using the selection API or similar, as you need to define which elements represent data points, and what actual values in your data view they represent so that Power BI knows what to do with them. You also need to code in the correct visual effects for any elements in your visual that are selected vs. those that are not.
MS only provide APIs to support these operations for TypeScript visuals, and not for R. So, unfortunately if you want your R visual to be interactive with others, you'll need to develop a TypeScript version. A lot of the limitations with using the inbuilt R visual still exist with R custom visuals coded using the SDK.
It may be possible to hook into an R visual if it uses HTMLwidgets, but I don't think that this would be supported; anything would still need to be done with the TypeScript APIs and possibly some other libraries to process and bind the generated HTML after it comes back - R visuals still use the regular TypeScript SDK and send the R code off for delegation to either a local R interpreter (if using Desktop) or a MS-hosted one (if using the Service).
Regards,
Daniel