Forum Discussion
Anonymous
7 years agoNot applicable
Help Changing Funnel Plot Colors and Shapes of Specific Data Points
I just starting creating Funnel Plots for Medical Center data where I plot Regions or Facilities. I use a count as 'Occurrence' and PBI create the Ratios. Can someone help with these issues? 1) H...
Anonymous
6 years agoNot applicable
Thanks for the reply.
We were able to extract out the R script that can be manually editted to split the plots into 3 colors - that code is here. However, I would like ot change the color for the 3rd criteria (Inside) to YELLOW instead of the default Blue. Do you know how?
Also, we would like your team to still develop a Visual to change these colors in the Visual package.
#Outlier + Colors
outlier = ifelse(((p-p.fem)/p.se)> 2.807, 1, #above upper (RED)
ifelse(((p-p.fem)/p.se)< -2.807, 2, #below upper (GREEN)
3)) #inside (BLUE > change to YELLOW)
outlier = factor(outlier, levels=1:3)
#Shapes
fp <- ggplot(aes(x = countValue[drawPoints], y = yAxis[drawPoints], colour=outlier), data = df[drawPoints,],) + geom_point(aes(dataset[3,1], (dataset[3,2]/dataset[3,1])), shape=17, size=pointCex*2.5, show.legend = FALSE, colour=outlier)
fp <- fp + geom_point(shape = 16, size = pointCex*2, show.legend = FALSE)
Thanks!
Craig
v-evelk
Microsoft Employee
6 years agoHi Craig,
I'm glad that your team figured out how to build conditions to split colours.
However, I'm unsure that I completely understand the issue.
Here you can see that a color can be set as a string, also, I suppose, it accepts color codes as "#445566".
To be honest, it will be better to set these colors as input parameters that come from format pane.
To make visual more customable regarding colors settings, you should add two additional params at the same level in capabilities.json file and read them from the code.
I completeley support your desire to make these features a part of MS Funnel Plot visual and I'm ready assist you in this because the changes are reasonable.
You could create a pull request with your suggested changes for the visual and I will review it and provide comments or approve (depends on the situation).
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]