genes_data <- data.frame(
start = c(10, 90, 130, 170, 210),
end = c(40, 120, 160, 200, 240),
name = c('Gene 1', 'Gene 3', 'Gene 4', 'Gene 5', 'Gene 6'),
group = c('A', 'B', 'B', 'A', 'C'),
cluster = c(1, 1, 2, 2, 2)
)
# Add a simple footer with subtitle to all clusters
GC_chart(genes_data, cluster = "cluster", group = "group") %>%
GC_clusterFooter(
title = "Cluster Footer",
subtitle = "Cluster subtitle"
)
# Add styling to the title and subtitle
GC_chart(genes_data, cluster = "cluster", group = "group") %>%
GC_clusterFooter(
title = "This is a footer",
subtitle = "Subtitle for the footer",
spacing = 15,
show = TRUE,
cluster = 1,
x = 6,
y = -20,
align = "center", # left / right
spacing = 12,
titleFont = list(
fontSize = "12px",
fontWeight = "bold",
fontFamily = "sans-serif",
fill = "black",
cursor = "default"
),
subtitleFont = list(
fill = "grey",
fontSize = "10px",
fontStyle = "normal",
fontFamily = "sans-serif",
cursor = "default"
)
)
Run the code above in your browser using DataLab