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

Possible to add url links for columns? #11

Open
reinholdsson opened this issue Feb 16, 2019 · 0 comments
Open

Possible to add url links for columns? #11

reinholdsson opened this issue Feb 16, 2019 · 0 comments

Comments

@reinholdsson
Copy link

To begin with, great work! I find this package very useful.

I would like to render a graph as a table of contents in RMarkdown, where each column links to a section within the document. Is there a simple way to solve this?

I thought of two possible solutions, but haven't figured out how to get it to work:

  1. Modify the column title, e.g. speed => <a href="www.example.com">speed<a>, but then it says Error: in label of node Master.
  2. Make use of the graphviz URL attribute, not sure though if it's possible to specify it column-wise? See example below (but with the same link for all columns):
require(datamodelr)
x <- dm_from_data_frames(cars)
x <- dm_create_graph(x, node_attrs = "URL = '#title-1'")
dm_render_graph(x)

Then it would refer to the section # My title {#title-1} in the document.

All suggestions are welcome.

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

1 participant