Have built a custom R script for the requirement mentioned below
Our client wants their data to be displayed in Pie-chart, but the dimension we are using in pie-chart has 16 values. The requirement is to display the top 9 separately and the remaining values(16-9=7) to be grouped into one value(As Others), so that it will display all the values.
For the above req i have used
suppressPackageStartupMessages(library(googleVis))
library(dplyr)
df=data.frame(Function=(Current_Model_Salary_All_Dimensions$'Grouped Function'),Amount=c(Current_Model_Salary_All_Dimensions$Amount))
df <- df %>% group_by(Function) %>% summarise(Amount = sum(Amount)) %>% arrange(desc(Amount))
df <- rbind(top_n(df,9), slice(df,10:n()) %>% summarise(Function="Others",Amount=sum(Amount)))
plot(gvisPieChart(df,options=list(width=500, height=500)))
Screenshot:
But now the small change in this, if we select Others in the pie chart , can it display what are all included in the others and their percentages.