genes_data <- data.frame(
start = c(10, 50, 90, 130, 170, 210),
end = c(40, 80, 120, 160, 200, 240),
name = c('Gene 1', 'Gene 2', 'Gene 3', 'Gene 4', 'Gene 5', 'Gene 6'),
group = c('A', 'A', 'B', 'B', 'A', 'C'),
cluster = c(1, 1, 1, 2, 2, 2)
)
# Basic usage
GC_chart(genes_data, cluster ="cluster", group = "group", height = "400px") %>%
GC_labels("name") %>%
GC_title(
title = "Cluster 1 Data",
subtitle = "Detailed View",
show = TRUE
)
# Customizing title style
GC_chart(genes_data, cluster = "cluster", group = "group", height = "500px") %>%
GC_labels("name") %>%
GC_title(
title = "Cluster 1 Data",
subtitle = "Detailed View",
show = TRUE,
height = "50px",
cluster = 1,
x = 0,
y = 25, # height / 2
align = "center",
spacing = 20,
style = list(
backgroundColor = "#0000"
# Any other CSS styles
),
titleFont = list(
fontSize = "16px",
fontStyle = "normal",
fontWeight = "bold",
textDecoration = "normal",
fontFamily = "sans-serif",
cursor = "default",
fill = "black"
# Any other CSS styles
),
subtitleFont = list(
fontSize = "14px",
fontStyle = "normal",
fontWeight = "bold",
textDecoration = "normal",
fontFamily = "sans-serif",
cursor = "default",
fill = "black"
# Any other CSS styles
)
)
Run the code above in your browser using DataLab