Я знаю, что порядок по умолчанию - по ширине секции, но могу ли я переопределить это и указать порядок секций, каким-либо образом используя график в R?
library(plotly)
clin2 <- data.frame(
stringsAsFactors = FALSE,
ids = c("MGH","CU","MGH - WT",
"CU - WT","MGH - KDM","CU - KDM","MGH - G2032R",
"MGH - S1986F","MGH - D2033N","CU - L1951R/L2026M"),
labels = c("Gainor<br>et al. 2017",
"McCoach<br>et al. 2018","ROS1<br>Extrinsic",
"ROS1<br>Extrinsic","ROS1<br>Intrinsic","ROS<br>Intrinsic","G2032R",
"S1986F","D2033N","L1951R/<br>L2026M"),
parents = c(NA,NA,"MGH","CU","MGH",
"CU","MGH - KDM","MGH - KDM","MGH - KDM","CU - KDM"),
values = c(17L, 12L, 8L, 11L, 9L, 1L, 7L, 1L, 1L, 1L),
colors = c("#111111", "#e6550d", "#9ecae1", "#fdae6b", "#9ecae1",
"#fdae6b", "#deebf7", "#deebf7", "#deebf7", "#fee6ce")
)
clin2_plot <- plot_ly(clin2, ids = ~ids, labels = ~labels, parents =
~parents,
values = ~values, type = 'sunburst', branchvalues
= 'total'
) %>% layout(sunburstcolorway = ~colors)
clin2_plot
т.е. изменить уровень 2 быть внутренними c -экстринси c -интринси c -экстринси c