-
Notifications
You must be signed in to change notification settings - Fork 633
multiple selectize/dynamic color brushes rendered in shiny #1584
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
multiple selectize/dynamic color brushes rendered in shiny #1584
Comments
Hi Carson, I've come across the same issue. I'd prefer to stick with the highlight approach vs. event_data if possible. I find that the plots appear fine in my app, unless I change the value of a dateRangeInput upstream, causing the app to filter the data and reload. My code is below: `all_cases_by_measure<- reactive({ by_measure_nested<- nested_data() %>% dplyr::mutate(data = purrr::map(data, ~ dplyr::mutate(., timepoint = 1:length(.x$date)))) by_measure<- tidyr::unnest(by_measure_nested) by_measure<- dplyr::mutate(by_measure, timepoint = paste("Time", timepoint)) by_measure<- by_measure %>% tidyr::unite("Client", first_name, last_name, birth_date, sep = " ") by_measure<- by_measure %>% dplyr::group_by(subscale, timepoint) %>% dplyr::mutate(mean_score = round(mean(score, na.rm = TRUE), 2)) %>% dplyr::ungroup() by_measure$subscale<- gsub("_", "-", by_measure$subscale) by_measure %>% }) output$plot_all_cases_by_measure<- plotly::renderPlotly({ req(all_cases_by_measure()) })` |
I am also having this issue with Plotly in R. When I "highlight" and set "selectize = TRUE" I get a second box with a vertical scroll bar. I would really like to remove this box. Any thoughts? Maybe it is because my data set is very large (scatter plot with >40,000 points). Sorry I can't share more than the image at this point as the data is proprietary. Thanks in advance! |
@AFoudree, I had the same problem -- the same vertical-scroll-bar artifact when I added a selectize dropdown menu to a scatterplot. Curiously, the problem appeared only when I used |
@jbullock35 Thanks for the comment. I cannot believe I missed the notification on this in my inbox. I will play with the scatter type and get back to you shortly. Thanks for the advice! |
@jbullock35 I was finally able to remove the second vertical-scroll-bar artifact! I found a solution in stack overflow (Mar 8th, 2020). It looks like the problem may be occurring because the highlight-selectize widget does not work well with shiny dashboards. The fix involves embedding java script to manually remove the scroll-bar-artifact. This solution was presented by StéphaneLaurent and can be found here: https://stackoverflow.com/questions/60583349/why-does-shiny-app-add-a-spurious-widget-to-a-plotly-graph-using-highlight-funct/62795535#62795535 Thanks again for your helpful ideas! |
See https://community.rstudio.com/t/r-shiny-reactive-selectize-highlight-input-in-a-plotly-plot/34480/3
The text was updated successfully, but these errors were encountered: