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

Can't set height of a flourish visualization in Quarto html #10

Open
maartenzam opened this issue Nov 25, 2024 · 3 comments
Open

Can't set height of a flourish visualization in Quarto html #10

maartenzam opened this issue Nov 25, 2024 · 3 comments

Comments

@maartenzam
Copy link

I tried to set the height of an embedded viz with set_line_bar_pie_details(height_mode = "aspect") but that is not working.

The docs say This setting is ignored when embedded in a fixed-height context, such as a simple iframe embed, so does this mean there is no way to set the height when outputting to Quarto html?

Thanks!

@zmeers
Copy link
Contributor

zmeers commented Nov 25, 2024

For reasons that now escape me, we hard-coded the height of the widget when knitting to HTML (see here:

if (isTRUE(knitr::is_html_output())) {
)
But I think this can likely vary according to the user-defined fig.width and fig.height for the document/code chunk. @maxious Would you mind noting this in the internal channel please?

@zmeers
Copy link
Contributor

zmeers commented Nov 25, 2024

@maartenzam Just to confirm, are you using the R package? I'm working in a Quarto file right now with the Python package open and this isn't an issue for Python -- at least I can't replicate it.

It's a bit odd but a workaround could be to set the engine to the R kernel in jupyter instead of knitr.

@maartenzam
Copy link
Author

Yes, I am using the R 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