# Problems with area chart

**URL:** https://community.plotly.com/t/problems-with-area-chart/72604
**Category:** 📊 Plotly Python
**Tags:** question
**Created:** [February 11, 2023, 10:26pm UTC](https://community.plotly.com/t/problems-with-area-chart/72604 "2023-02-11T22:26:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tex.y](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/tex.y/32/22700_2.png) [@tex.y](https://community.plotly.com/u/tex.y)
#### Post date: [February 11, 2023, 10:26pm UTC](https://community.plotly.com/t/problems-with-area-chart/72604/1 "2023-02-11T22:26:20Z")

</div>

Hello!

So, I have a problem that seems to be very basic.

I have this very basic dataframe:

![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/7/e/7eeabe904d16be0271be5079e6af48838893a413.png)

And I’m tryng to generate this chart: ([that can be found here](https://plotly.com/python/filled-area-plots/))

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/f/2/f2041b5201b76a5edf498ff0f71cd38cc6c18ef8.png)

But this is the chart that I get:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/5/f/5f46dfca2072c5cb60fa8a7f6f4cdbb3db0565ba.png)

Why I’m not getting simple lines with a simple area ? I don’t understand this figure.

This is the code:

```auto
fig = px.area(df,
        x="data_entrada",
        y=["conf_hc_core","codigo"],
        )

```

I also tryed this example that can be found in the same link:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/4/c/4c60cfa22e08ddd309bbbf475d7fc9eaee1d785e.png)

I copy paste the example code and just changed to my df:

```auto
fig= go.Figure()

fig.add_trace(go.Scatter(
    x=['data_entrada'], 
    y=['conf_hc_core'],
    hoverinfo='x+y',
    mode='lines',
    line=dict(width=0.5, color='rgb(131, 90, 241)'),
    stackgroup='one' # define stack group
))

fig.add_trace(go.Scatter(
    x=['data_entrada'], 
    y=['codigo'],
    hoverinfo='x+y',
    mode='lines',
    line=dict(width=0.5, color='rgb(111, 231, 219)'),
    stackgroup='one'
))

```

but this is the result:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/3/9/39efedf0de4d1f8e02a20f1b25b7c789128bcc5c.png)

What I’m missing here?

---

<div class="post-metadata">

### Author: ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)
#### Post date: [February 11, 2023, 10:43pm UTC](https://community.plotly.com/t/problems-with-area-chart/72604/2 "2023-02-11T22:43:47Z")

</div>

HI @tex.y , check the dtype of your DataFrame.
