Skip to content

Support for ggplot stacked geom_area plots? #2320

Open
@mot12341234

Description

@mot12341234

I have a stacked geom_area plot in ggplot which looks fine, but somehow the ggplotly version shows empty. Below is the toy example. (the issue seems to do with position_fill(), if getting rid of it, the plot can run normally)..

R version: 4.3.2, plotly version: 4.10.3

library(tidyverse)
library(plotly)

df <- expand_grid(tibble(x = seq(10), y = seq(10)), g = letters[1:5])
pl <- df %>%
  ggplot() +
  geom_area(aes(x = x, y = y, fill = g), position = 'fill')
 
ggplotly(pl)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions