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

Render non-scrollable graph #471

Open
matiasandina opened this issue Jul 11, 2022 · 0 comments
Open

Render non-scrollable graph #471

matiasandina opened this issue Jul 11, 2022 · 0 comments

Comments

@matiasandina
Copy link

matiasandina commented Jul 11, 2022

I am trying to render a graph in a quarto presentation as follows:

DiagrammeR::grViz(diagram = "
digraph boxes_and_circles {

  # a 'graph' statement
  graph [overlap = true, 
  fontsize = 10,
  rankdir='LR',
  bgcolor='transparent']

  # several 'node' statements
  node [shape = plaintext,
        fontname = Helvetica,
  fontcolor='antiquewhite3']
  S; W; H;
  # several 'edge' statements
  S->W [color='antiquewhite3']
  W->S [color='antiquewhite3']
  W->H [color='antiquewhite3']
}
", width=800, height = 400, options = "overflow-y: hidden;")

This is creating the graph I need, however I cannot find a way to prevent the htmlwidget from rendering the scrollbar. The graph is way smaller than the content and the scrollbar should not be needed (in fact, it shows even if I select height = 200).

What is the way to prevent this behavior?

I know I could save the images, but it seems like an overkill for this situation

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