ggplotly

How can I make ggplotly show hover tooltips for a geom_rect series?

左心房为你撑大大i 提交于 2020-12-15 04:27:39
问题 I am trying to create an interactive visualisation of an individual's salary growth across multiple employers. I am using a geom_rect series to show pay periods and salary information. When I apply the ggplotly function, hover tooltips are not showing by default, and I cannot find a way to enable them. What can I do to enable tooltips over the geom_rect? data: df <- data.frame( "From" = seq(as.Date("2016-01-01"), as.Date("2026-01-01"), by = 14), "To" = seq(as.Date("2016-01-01"), as.Date("2026

How do I get ggplotly rangeslider to set a sensible initial range with a date axis?

别来无恙 提交于 2020-12-15 04:24:36
问题 I am trying to create an interactive visualisation of an individual's salary growth across multiple employers. When I add a rangeslider to the ggplotly function, the initial min and max values for the slider are set nowhere near the range of observations. How can I get reasonable initial values for the slider, either by having it set automatically based on the data range or set manually? data: df <- data.frame( "From" = seq(as.Date("2016-01-01"), as.Date("2026-01-01"), by = 14), "To" = seq(as

How can I make ggplotly show hover tooltips for a geom_rect series?

那年仲夏 提交于 2020-12-15 04:24:08
问题 I am trying to create an interactive visualisation of an individual's salary growth across multiple employers. I am using a geom_rect series to show pay periods and salary information. When I apply the ggplotly function, hover tooltips are not showing by default, and I cannot find a way to enable them. What can I do to enable tooltips over the geom_rect? data: df <- data.frame( "From" = seq(as.Date("2016-01-01"), as.Date("2026-01-01"), by = 14), "To" = seq(as.Date("2016-01-01"), as.Date("2026