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

toWebGL: 'scattergl' objects don't have these attributes: 'hoveron' #1582

Open
alebot opened this issue Jul 19, 2019 · 2 comments · May be fixed by #2302
Open

toWebGL: 'scattergl' objects don't have these attributes: 'hoveron' #1582

alebot opened this issue Jul 19, 2019 · 2 comments · May be fixed by #2302

Comments

@alebot
Copy link

alebot commented Jul 19, 2019

When trying to just go through plotly manual (see here), the toWebGL function has warnings and doesn't print the data. The warnings are all the same:

45: 'scattergl' objects don't have these attributes: 'hoveron'
Valid attributes include:
'type', 'visible', 'showlegend', 'legendgroup', 'name', 'uid', 'ids', 'customdata', 'meta', 'selectedpoints', 'hoverinfo', 'hoverlabel', 'stream', 'transforms', 'uirevision', 'x', 'x0', 'dx', 'y', 'y0', 'dy', 'text', 'hovertext', 'textposition', 'textfont', 'mode', 'line', 'marker', 'connectgaps', 'fill', 'fillcolor', 'selected', 'unselected', 'opacity', 'hovertemplate', 'error_x', 'error_y', 'xcalendar', 'ycalendar', 'xaxis', 'yaxis', 'idssrc', 'customdatasrc', 'metasrc', 'hoverinfosrc', 'xsrc', 'ysrc', 'textsrc', 'hovertextsrc', 'textpositionsrc', 'hovertemplatesrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox'

Code run in R, form the tutorial:

library(plotly)
m <- lm(log(price) ~ log(carat), data = diamonds)
diamonds <- modelr::add_residuals(diamonds, m)
p <- ggplot(diamonds, aes(x = clarity, y = resid, color = clarity)) +
    ggforce::geom_sina(alpha = 0.1) + 
    stat_summary(fun.data = "mean_cl_boot", color = "black") +
    facet_wrap(~cut)
toWebGL(ggplotly(p))

The same error arrises when trying to run this simple example.

@cpsievert
Copy link
Collaborator

The same error arrises when trying to run this simple example.

These are warnings, not errors, and I think they're irrelevant for this issue.

If the plot doesn't render for you, it's likely due to a different problem. Does your JS console show any errors?

@ppm1337
Copy link

ppm1337 commented Oct 5, 2022

I would like to reopen that issue. This is super annoying and all these warnings pollute the Shiny logs if used in a Shiny app. I am aware that there are workarounds out there to circumvent these warnings, but they are all quite cumbersome. Why not provide a plotly-native way of disabling these warnings?

zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 6, 2023
When converting a ggplot object to webgl, invalid 'hoveron' warnings appear.

If the toWebGL() function receives the ggplot object then it is possible for us to remove those warnings.

Closes: plotly#2296
Closes: plotly#1582
@zeehio zeehio linked a pull request Oct 7, 2023 that will close this issue
zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 8, 2023
When converting a ggplot object to webgl, invalid 'hoveron' warnings appear.

If the toWebGL() function receives the ggplot object then it is possible for us to remove those warnings.

Closes: plotly#2296
Closes: plotly#1582
zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 19, 2023
When converting a ggplot object to webgl, invalid 'hoveron' warnings appear.

If the toWebGL() function receives the ggplot object then it is possible for us to remove those warnings.

Closes: plotly#2296
Closes: plotly#1582
zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 23, 2023
When converting a ggplot object to webgl, invalid 'hoveron' warnings appear.

If the toWebGL() function receives the ggplot object then it is possible for us to remove those warnings.

Closes: plotly#2296
Closes: plotly#1582
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

Successfully merging a pull request may close this issue.

3 participants