title: Multiple line charts using Dash and Plotly
body: <p>I am trying to create a multiple line charts where I have one line for each 'Machine' and 'Time' on X axis. However I tried a lot of combinations to generate X and Y label. The closest I got from expected result is the chart below.</p>
  
  <ul>
  <li>All advises are welcome.</li>
  </ul>
  
  <p>This is the dataframe:</p>
  
  <pre><code>df3:
  Machine Units Pruduced  Time
  K2K02   1900            15
  K2K03   311             15
  K2K01   5230            17
  K2K02   1096            12
  K2K03   1082            11
  K2K07   587             17...
  
  </code></pre>
  
  <p>So I am grouping and unstacking to prepare df to plot the graph.</p>
  
  <pre><code>fdr = dff3.groupby(['Time', 'Machine']).sum()
  fdr2 = fdr.unstack('Time')
  fdr2
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>import dash_table_experiments
  import dash
  import dash_core_components as dcc
  import dash_html_components as html
  import pandas as pd
  import plotly.graph_objects as go
  import numpy as np
  import dash_table_experiments as dash_table
  import dash
  from dash.dependencies import Input, Output
  import dash_table
  import pandas as pd
  import plotly_express as px
  import plotly.offline as pyo
  
  dff3 = pd.read_csv('df3.csv', encoding='latin-1', low_memory=False)
  dff3
  fdr = dff3.groupby(['Time', 'Machine']).sum()
  fdr2 = fdr.unstack('Time')
  fdr2
  
  app = dash.Dash()
  
  app.layout = html.Div([ 
  
  dcc.Graph(
          id = 'GrapGo',
          figure = {
              'data' : [
                  go.Scatter(
  
                  x = fdr2.index,
                  y = fdr2.loc[rowname],
                  mode = "markers+lines",
                  name = rowname
                  )for rowname in fdr2.index
  
  
              ],
              'layout' : go.Layout(
                  title = "Grafico com go",
                  xaxis = {'title': 'X Label'},
                  yaxis = {'title': 'y Label'}
  
              )
          }
      )
  
  ])
  
  if __name__ == '__main__':
      app.run_server()
  
  </code></pre>
  
  <p>This is the graph I'm getting:</p>
  
  <p><a href="https://i.stack.imgur.com/Q6VgK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q6VgK.png" alt=""></a></p>
  
  <p>The expected result is:</p>
  
  <p><a href="https://i.stack.imgur.com/kGbh8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kGbh8.png" alt="enter image description here"></a></p>