This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hey there guys.
I'm trying to make my own R Script to use with Power BI, and I am able to import the data and even generate the basic graph. I am using the iGraph library and am attempting to create a network. The issue is that I am not able to pass a column of edge (link) colors as a parameter; in R Studio I could do this and it worked just fine. For some reason, although I can pass the edge widths as a parameter, when I try to do the same with edge colors specifically in the Power BI editor it does not work. It just assigns arbitrary colors to the links. I would really appreciate help or guidance on this issue. Here is my code:
library(igraph) test.edges <- data.frame(dataset$Source, dataset$Destination) set.seed(12) graph.2 <- graph_from_data_frame(d = test.edges, directed = TRUE) par(mar=c(0,0,0,0)+.1) plot(graph.2, edge.curved = .2, edge.width = (dataset$Count/(.4*mean(dataset$Count))), vertex.label.color = "Black", edge.color = dataset$EColor, vertex.color = "#82ff90")
The issue is with the line "edge.color = dataset$EColor". Again, this line works exactly as intended in R Studio, but not in Power BI. No idea what's going on. Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.