You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I must be missing something as this should be fairly simple. I have a ggplot for which I have multiple years of data. I needed the data across multiple years to "overlap" on the same plot. The fact that 2016 is a leap year causes issues on the X axis scaling. I looked to see if there was any package or solution but was unable to find anything. As such, I rescaled across LEAP and NON LEAP to have a DAY range of 366 (versus 365 for 2 years and 366 for 2016).
This is all working fine. Howwver, I now want to force PLOTLY to show the DATE value on the Hover over versus the X axis DayofYear. I assumed I can easily overwrite this using something like this which I found.
However, this applied to a specific trace (e.g. trace #2). Is there no way to automatically force all traces to have the custom HOVER over? Essentially, how do I force ALL traces to overwrite the custom HOVER text? Is there a simpler option that can allow me to overwrite the ggplot hover text?
@ahsanshah you've been asked a handful of times now to follow the guidelines for opening issues. If you continue to ignore the guidelines, we'll have to block you from the repo.
I must be missing something as this should be fairly simple. I have a ggplot for which I have multiple years of data. I needed the data across multiple years to "overlap" on the same plot. The fact that 2016 is a leap year causes issues on the X axis scaling. I looked to see if there was any package or solution but was unable to find anything. As such, I rescaled across LEAP and NON LEAP to have a DAY range of 366 (versus 365 for 2 years and 366 for 2016).
This is all working fine. Howwver, I now want to force PLOTLY to show the DATE value on the Hover over versus the X axis DayofYear. I assumed I can easily overwrite this using something like this which I found.
p_gg_build <- plotly_build(p1)
p_gg_build$data[[2]]$text <- paste("DATE = ", test_tmp$DT_STAY_DATE)
However, this applied to a specific trace (e.g. trace #2). Is there no way to automatically force all traces to have the custom HOVER over? Essentially, how do I force ALL traces to overwrite the custom HOVER text? Is there a simpler option that can allow me to overwrite the ggplot hover text?
Attached code and RDS files for reference.
Support.zip
The text was updated successfully, but these errors were encountered: