-
Notifications
You must be signed in to change notification settings - Fork 74
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
Responsive sizing of text elements #297
Comments
hello, sorry for the delay.
I am not sure how it should be done, let's keep this issue open for now
That point will not be possible. 'ggiraph' produce a real R graphic (R device) and fonts metrics are calculated when the plot is created by R. |
Hey David, no problem and thanks for getting back to this. I feared that it will not be possible to fix the font sizes, too bad. For the tooltips, I assume that specifying the font sizes as em or rem and not as pt or px is the way to go? You are the expert here, but at least that's my usual approach outside of ggiraph. |
The size of text (and point size) is managed by R itself. But the tooltip is managed with simple CSS independently. Using 1rem (for example), will be understood as 1rem relative to the web page, I think you'd like to have 1rem relative to:
Is that right? I think I'm in the process of formalizing the need by trying to formulate it :) |
Hm, good question :) Not sure what works best here but sometimes the tooltip text just becomes too large when decreasing the plot size. In general I think both behaviors might be helpful: tooltip text with a fixed size or relative to the "original" text size. As the text of the plot itself shrinks, I personally would expect the same to happen for the tooltip text by default. No time to play around with it right now but I'll give it a few more trials. |
Hi David,
Thanks for this wonderful package, I am enjoying it a lot!
Currently, when setting
opts_sizing(rescale = TRUE)
, the font size in the tooltips stays the same, but the text elements of ggplot2 get smaller when decreasing the width of the chart.I’m not sure if it’s possible, but it would be great to keep the font sizes of ggplot2 text elements consistent when the plot gets resized.
Thanks again!
The text was updated successfully, but these errors were encountered: