Skip to content

Legend Scroll issues. #525

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

Closed
batra2 opened this issue Mar 18, 2016 · 10 comments
Closed

Legend Scroll issues. #525

batra2 opened this issue Mar 18, 2016 · 10 comments

Comments

@batra2
Copy link

batra2 commented Mar 18, 2016

I have a Shiny dashboard where I am rendering events on y axis. The scroll for the legend works fine when I render the UI for the first time.

But if I resize the UI or refresh the Page the scroll disappears.

scroll issue

@timelyportfolio
Copy link
Collaborator

Ok thanks for additional info. I think this makes more sense. I should be able to try to replicate Sunday.

@cpsievert
Copy link
Collaborator

This seems like a plotly.js problem. @timelyportfolio I know the plotly.js folks like reproducible example(s) using codepen, if possible.

@timelyportfolio
Copy link
Collaborator

Looking at this, I have not yet replicated it on just the JavaScript side (see codepen). I'll try to add some lines to see if that reproduces the issue. @batra2, if you can recreate with a minimal reproducible example, I would really appreciate it.

@timelyportfolio
Copy link
Collaborator

@batra2, I have been able to reproduce in R, so an example is no longer necessary. I'll let you know what I can find out.

@timelyportfolio
Copy link
Collaborator

@cpsievert, I replicated with the following code and noticed another sort-of-related problem. The legend scroll rect appears but has no impact in RStudio/Windows, but works as expected in Chrome and Firefox. Does the legend rect respond to drag in your RStudio?

#issue 525
#  Legend Scroll issues
#  issue states happens on resize with shiny
#  but I can replicate without shiny
#  as shown below

library(ggplot2)
library(plotly)
library(dplyr)

ggplotly(
  ggplot(
    mtcars%>%add_rownames(),
    aes(mpg,hp,color=rowname)
  ) +
    geom_point() +
    geom_smooth(
      aes(mpg,hp),
      inherit.aes=FALSE
    )
)

@cpsievert
Copy link
Collaborator

Everything works as expected for me in Chrome/Firefox, but I can't seem to click and drag the scroll bar in RStudio (mouse scroll is working, though).

@timelyportfolio
Copy link
Collaborator

Ok, same with me. Do you think I should file an issue on plotly.js or just accept that this is a limitation of RStudio Viewer (perhaps webkit) similar to #322?

I'll switch focus now back to the issue with legend scrolling on resize.

@timelyportfolio
Copy link
Collaborator

I think this gets fixed in v.1.7.0 (see plotly/plotly.js@7b393d4#diff-f48c57dae9095e916f13f364ae740f69).

@timelyportfolio
Copy link
Collaborator

Unfortunately, problem still there even though the scrolling legend behaves much better. I'll research a little more and file issue over on plotly.js.

@timelyportfolio
Copy link
Collaborator

This should now be fixed. Please reopen if you are still having trouble after updating to the newest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants