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...
v-evelk
Microsoft Employee
6 years agoThe thread has been continued in e-mail...
I am just publishing here the answer to see a full picture.
"There is a file pbiviz.json inside the project folder.
You should edit it and change 5th string where you can see visual GUID.
You should just put here a set of chars and digits, actually, it doesn’t matter what exactly, but would be better if it was corresponding to the visual name.
For instance, it may be something as following
RHTML_FUNNEL_CUSTOM_578345975
Regarding ETA, unfortunately I cannot provide a better one."
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]
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-evelk6 years ago
Microsoft Employee
Hi 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]