# Why Pivot chart is comig as a straight line when using Plotly.Expected is a Zig Zag chart

**URL:** <https://community.plotly.com/t/why-pivot-chart-is-comig-as-a-straight-line-when-using-plotly-expected-is-a-zig-zag-chart/52657>\
**Category:** Dash Python\
**Created:** [May 4, 2021, 6:51am UTC](https://community.plotly.com/t/why-pivot-chart-is-comig-as-a-straight-line-when-using-plotly-expected-is-a-zig-zag-chart/52657 "2021-05-04T06:51:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoyyoth](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@hoyyoth](https://community.plotly.com/u/hoyyoth)\
**Post date:** [May 4, 2021, 6:51am UTC](https://community.plotly.com/t/why-pivot-chart-is-comig-as-a-straight-line-when-using-plotly-expected-is-a-zig-zag-chart/52657/1 "2021-05-04T06:51:04Z")

</div>

I need to plot a pivot chart from a multi-indexed pivot table. This is my pivot table description " **multi\_index = pd.pivot\_table(df\_new, index = [‘Device\_ID’, ‘Temp’ ,‘Supply’],columns = ‘Frequency’, values = ‘NoiseLevel’,)"**

I used Plotly at that time it is coming as a single straight line. I am expecting two zig-zag lines one for frequency 0.8 and the other for 1.6 as shown in the first figure. could you please tell me where I went wrong? please see my code below. I don’t know where I need to put the **“columns = ‘Frequency’”** I think it needs to come at Y axis. Please see my dta frame below(Pivot Table)

```auto
Frequency 0.8 1.6
Device_ID Temp Supply                
FF_2649 -40.0 1.65 -100.72 -101.35
                1.71 -100.61 -101.74
                1.80 -100.74 -101.64
                1.89 -100.63 -101.69
                3.60 -100.60 -101.46
... ... ...
TT_2441 85.0 1.65 -94.99 -94.97
                1.71 -94.85 -95.24
                1.80 -95.02 -94.97
                1.89 -94.69 -96.20
                3.60 -94.90 -94.91

```

My code is given below.

```auto
data=[go.Scatter(
x=multi_index.index,
y=multi_index.values,
mode='lines',
name='Noise Level'
)]
layout=go.Layout(title='Noise Level')
figure=go.Figure(data=data,layout=layout)
pyo.plot(figure)

```

I am expecting two line charts one for Frequency 0.8 and other for frequency 1.6 .
