Open missuse opened 7 months ago
Hi and thanks for developing a great package!
I am trying to customize the breadcrumbs within sunburstR::sund2b and it seems the text is always in upper case. Could you please show an example how to change this behavior:
sunburstR::sund2b
library(sunburstR) df <- data.frame(seq = c("A","B","C"), size = c(13.4, 9.22, 7.111)) js_bread <- "function(nodedata, size, percent) { var roundedSize = Math.round(size * 100) / 100; var roundedPercent = Math.round(percent * 100 * 10) / 10 ; var sizeText = roundedSize + ' h'; var breadcrumb = '<div style=\"text-align: center; font-weight: bold; \">' + nodedata.name + '</div>'; breadcrumb += '<div style=\"display: flex; justify-content: space-between;\">'; breadcrumb += '<div style=\"flex-grow: 1; font-size: 14px;\">' + sizeText + '</div>'; breadcrumb += '<div style=\"text-align: right; font-size: 14px; \">' + roundedPercent + '%' + '</div>'; breadcrumb += '</div>'; return breadcrumb; } " sunburstR::sund2b( df, showLabels = TRUE, breadcrumbs = sunburstR::sund2bBreadcrumb( html = htmlwidgets::JS(js_bread)) )
output is and "H" is in uppercase.
Thank you!
您好,信件我已收到,将会尽快回复。 王鹏超
Hi and thanks for developing a great package!
I am trying to customize the breadcrumbs within
sunburstR::sund2b
and it seems the text is always in upper case. Could you please show an example how to change this behavior:output is and "H" is in uppercase.
Thank you!