R ggplotly geom_area (area chart) tooltip issue - showing same tooltip value in all x-axis.
I am facing tooltip issue in my projects while creating area charts using geom_area from ggplot package in R (for the tooltip, converted into plotly object using ggplotly() function from plotly package). for all x-axis, it is showing same tooltip value.
Please see the reproducible example code (this code is from R Graph Gallery)
Packages
library(ggplot2)
library(dplyr)
library(plotly)
create data
time <- as.numeric(rep(seq(1,7),each=7)) # x Axis
value <- runif(49, 10, 100) # y Axis
group <- rep(LETTERS[1:7],times=7) # group, one shape per group
data <- data.frame(time, value, group)
stacked area chart
ggplotly(
ggplot(data, aes(x=time, y=value, fill=group)) +
geom_area()
)
Please see below images, I am getting same tooltip value all x-axis.
Could someone please help me to resolve this? I have same issue in my two projects.
[image]
[image]
package versions: "ggplot2" - "3.4.0" "plotly" - "4.10.1"