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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Interactive R custom visuals with manipulatedwidget

Hi , 

We would like to combine the use template RHTML (ggplot2) and manipulatedwidget (but manipulatedwidget package R is not included in list of package in powerBI) for create an internal custom visual R

 

Requierements

Change the dimensions/attributs in the visual R and keep the interactive part.

Is there another way ? 

library(manipulateWidget)
library(plotly)

plotTest <- function(xvar, yvar, zvar){
  
  plot_ly(x = ~dataset[[xvar]], y = ~dataset[[yvar]], color = ~dataset[[zvar]],
          type = "scatter", mode = "markers") %>% 
    layout(xaxis = list(title=xvar), yaxis = list(title=yvar))
}

plotTest("Dim1", "Dim2", "Cluster")

varNames <- names(dataset)[2:6]
variables <- names (dataset)[7:10]

manipulateWidget(
  plotTest(xvar, yvar, zvar),
  xvar = mwSelect(varNames),
  yvar = mwSelect(varNames, value = "Dim1"),
  zvar = mwSelect (variables, value = "Cluster")

)
  
Thanks for your help, 
Fanny
0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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