New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotate Labels #2
Comments
What you mean? Group labels are rotated already perpendicular to the group arcs, just like in the SO question. |
I was just wondering whether I have control over the rotation. I´d like to have them horizontal to the arcs like in the left graph. |
I see. I'm sorry that's not possible at the moment. |
Thanks for the info! I have one more and final question: Have you experienced that the tooltips seem to be getting misplaced in shiny apps if you need to scroll down to reach the plot. I added a minimal example and a screenshot. Any Ideas? ui.r: require(shiny)
require(shinydashboard)
require(shinythemes)
require(chorddiag)
if (interactive()) {
header <- dashboardHeader()
sidebar <- dashboardSidebar(
sidebarMenu(
# Setting id makes input$tabs give the tabName of currently-selected tab
id = "tabs",
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard"))
)
)
body <- dashboardBody(
tabItems(
tabItem("dashboard",
div(p("Dashboard tab content"),
fluidRow(
box(height = "600px",
"bla")
),
fluidRow(
column(3,
sliderInput("margin", "Margin", min = 0, max = 200, value = 100),
sliderInput("groupnamePadding", "Group Name Padding", min = 0, max = 100, value = 30),
checkboxInput("showTicks", "Show Ticks", value = TRUE)
),
box(
title = "Plot",
chorddiagOutput('chorddiag', height = '600px')
)
))
)
)
)
dashboardPage(header, sidebar, body)
} Server.r: require(shiny)
require(shinydashboard)
require(shinythemes)
require(chorddiag)
m <- matrix(c(11975, 5871, 8916, 2868,
1951, 10048, 2060, 6171,
8010, 16145, 8090, 8045,
1013, 990, 940, 6907),
byrow = TRUE,
nrow = 4, ncol = 4)
groupNames <- c("black", "blonde", "brown", "red")
groupColors <- c("#000000", "#FFDD89", "#957244", "#F26223")
row.names(m) <- groupNames
colnames(m) <- groupNames
server<-function(input, output) {
output$chorddiag <- renderChorddiag(
chorddiag(m
#groupColors = groupColors,
#groupnamePadding = input$groupnamePadding,
#showTicks = input$showTicks,
#margin = input$margin
)
)
} |
I just commited a fix for the placement issue, so just install the latest version. Let me know if it works for you. |
Works like a charm!! Thanks a lot! |
I am also hoping to be able to make the label to be horizontal; it is really hard to read perpendicular text. |
is this option still not available? i want to rotate the labels, but they are automatic going to perpendicular position. |
Hi!
Short question regarding group labels: is it possible to rotate them?
See: http://stackoverflow.com/questions/31943102/rotate-labels-in-a-chorddiagram-r-circlize
Awesome work, by the way!!!
Best
The text was updated successfully, but these errors were encountered: