We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c15367 commit 9d2273eCopy full SHA for 9d2273e
R/geneviewer.R
@@ -590,6 +590,18 @@ GC_grid <- function(
590
591
if(direction == "row"){
592
GC_chart$x$graphContainer$direction <- "row"
593
+ # compute the % width for each cluster
594
+ num_clusters <- length(update_clusters)
595
+ if (num_clusters > 0) {
596
+ # Round to 3 decimals
597
+ cluster_width_pct <- round(100 / num_clusters, 3)
598
+ for (cluster_name in update_clusters) {
599
+ # Convert numeric to character and append '%'
600
+ pct_str <- paste0(cluster_width_pct, "%")
601
+ GC_chart$x$series[[cluster_name]]$container$style$width <- pct_str
602
+ GC_chart$x$series[[cluster_name]]$container$width <- pct_str
603
+ }
604
605
}
606
607
# Update margins
0 commit comments