# How to create stacked area chart not filled area chart?

**URL:** <https://community.plotly.com/t/how-to-create-stacked-area-chart-not-filled-area-chart/2092>\
**Category:** Plotly R\
**Created:** [September 13, 2016, 5:44am UTC](https://community.plotly.com/t/how-to-create-stacked-area-chart-not-filled-area-chart/2092 "2016-09-13T05:44:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hueanh](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@hueanh](https://community.plotly.com/u/hueanh)\
**Post date:** [September 13, 2016, 5:44am UTC](https://community.plotly.com/t/how-to-create-stacked-area-chart-not-filled-area-chart/2092/1 "2016-09-13T05:44:05Z")

</div>

Hi all,

Please help me to create stacked area chart with R in Plotly. So far, Plotly just supports filled area chart look like this code:

```auto
library(plotly)
plot_ly(x = c(1, 2, 3, 4),
        y = c(0, 2, 3, 5),
        fill = "tozeroy") %>%
  add_trace(x = c(1, 2, 3, 4),
            y = c(3, 5, 1, 7),
            fill = "tonexty")

```

Thanks in advance!
