Skip to content
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

Title feature #8

Open
tpeterson993 opened this issue Apr 19, 2017 · 2 comments
Open

Title feature #8

tpeterson993 opened this issue Apr 19, 2017 · 2 comments

Comments

@tpeterson993
Copy link

Hello,

This is a great package! Thanks for making it. Is it possible for you to either create a feature for a title or a legend? If not, could you provide me with means to how add a title or a legend?

Thanks!
-Tom

@timelyportfolio
Copy link

I can think of two ways to accomplish this.

htmltools::tagList

library(htmltools)

browsable(
 tagList(
  tags$h3("Title"),
  ... chord diagram ...
 )
)

htmlwidgets::onRender

htmlwidgets::onRender(
  ... chord diagram ...,
"
function(el,x) {
  var title = d3.select(el).insert('h3','.html-widget');
  title.text('Title');
}
"
)

@tpeterson993
Copy link
Author

The first way was successful. Thanks for this! Again, really beautiful package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants