rbokeh icon indicating copy to clipboard operation
rbokeh copied to clipboard

Hover doesn't work when x and y is flipped

Open mwijaya3 opened this issue 6 years ago • 5 comments

Hi,

Thanks for the awesome package. The hover doesn't work when I flip the x and y variable.

For this example, the hover works and I can see 3 value showed up (variable, value, color):

diamonds <- ggplot2::diamonds %>% top_n(n = 10)
figure() %>%
  ly_bar(x = cut, y = carat, color = color,
         data = diamonds, position="dodge", hover=TRUE) %>%
         x_axis(label = "Cut") %>%
         y_axis(label = "Carat")

However, when I flipped the x and y-axis, the hover doesn't work anymore. See example below:

diamonds <- ggplot2::diamonds %>% top_n(n = 10)
figure() %>%
  ly_bar(y = cut, x = carat, color = color,
         data = diamonds, position="dodge", hover=TRUE) %>%
         x_axis(label = "Carat") %>%
         y_axis(label = "Cut")

I tried using the version via devtools and from CRAN. Both have same output.

Thanks!

mwijaya3 avatar Jan 13 '19 21:01 mwijaya3

@mwijaya3 We cannot investigate a problem we cannot reproduce. If you cannot share work data, you should create a minimal example with fake data. Otherwise, this issue will be closed with norepro resolution.

bryevdv avatar Jan 13 '19 22:01 bryevdv

@bryevdv good point. I will create an example with fake data and update my question. Thanks!

mwijaya3 avatar Jan 14 '19 03:01 mwijaya3

updated the question with an example.

mwijaya3 avatar Jan 15 '19 00:01 mwijaya3

@mwijaya3 thanks, though I should now say that when I was replying on my phone I missed that this was in the RBokeh repo, not the main one. RBokeh is maintained by @hafen so we will have to wait for him to chime in (I don't know anything about R). It's possible that this issue will be fixed when he releases a newer version of RBokeh based on current core Bokeh.

bryevdv avatar Jan 15 '19 02:01 bryevdv

@bryevdv, thanks for the clarification. I will wait for @hafen to get back.

mwijaya3 avatar Jan 27 '19 19:01 mwijaya3