-
Notifications
You must be signed in to change notification settings - Fork 634
HTML entities in hover text #733
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
Comments
Thanks for writing in Frank! So cool to know you're using plotly :) I don't think the update should have broke HTML markup in hover text. Do you have an example? These works as expected for me: plot_ly(mtcars, x = ~wt, y = ~mpg, text = ~paste0(cyl, "<br>", disp))
plot_ly(mtcars, x = ~wt, y = ~mpg, text = ~paste0('<span style="color:black">', cyl, '</span>')) |
Thanks for the quick reply. Those worked for me. This one did not:
|
Ah, it looks like the For now, you'll have to use a literal |
Thanks for figuring this out. Would hex character codes also fail? I use many more characters than listed in the table you linked to so I really hope this can be addressed. I would also like to include HTML ...Also is there detailed documentation for add_lines, add_markers, add_polygons, etc? Thanks |
I think we fully support unicode, so you could use unicode in the meantime. This is still in progress, but it will be the official reference for the |
Thanks. I tried the following, which attempts to render, but it does not render correctly:
By the way I really like the change to using the R formula language for specifying variables to plotly, plus all the new add_ functions. |
I could easily be way off on this, but If I copy the actual character
To get this to work in
|
Yes the ordinary literal slash works but I was trying to get the factional slash to work. Also trying this because there are several other HTML characters I want to use in hover text. I did verify that the hex code for ≤ works (<= symbol). |
hard to tell but the slash in my example is the fractional slash and not the literal slash. |
Uh oh!
There was an error while loading. Please reload this page.
I am glad to see plotly 4.5.2 on CRAN, which I've installed. I am re-writing several functions to use the new argument structure - so far so good on that. I have a potential major problem though. I routinely put HTML markup inside hover text, including
<span>
<br>
etc. and so far the hover text is showing the markup and not the formatted output as it did before the new version. Any help greatly appreciated.The text was updated successfully, but these errors were encountered: