Dataframe, Dropdown, Scatter Plot not pulling correct data

I’ve been beating my head against the wall trying to sort out an issue I’m having with Python Dash. I’m trying to do a simple operation: import a CSV file, create a scatter plot with the data, and use dropdown menus to select the X and Y data (via dataframe column names). Everything is working well but the graph output only displays the data associated with the first index in the dataframe. Any help would be very much appreciated. I’ve included the code below. The dataframe has four columns (Rand1, Rand2, Rand3, Rand4) and 168 rows with random number values. . I’ve tried multiple different configurations and cannot get it to display all the data. If I plot the dataframe outside of the dash app in a separate script it plots correctly. Any help would be appreciated.

edit - The code below has the correct indentation but it is not showing up correctly on the forum.

app = dash.Dash()

app = dash.Dash(name, external_stylesheets=external_stylesheets)

app.layout= html.Div(children=[

    html.H1(children='Data Table Charter',style={'textAlign': 'center'}),
    html.Div(children='Data Charting Tool for CSV Files',style={'textAlign': 'center'}),

    html.Div([
        html.Label("Select X Series Data"),                    
        dcc.Dropdown(id='x-data',
                     options=[{'label': i, 'value': i} for i in list(df)],
                     multi=False
        )
        ],
        style={'display':'inline-block','padding-left': '0px'}
        ), 
    html.Div([
        html.Label("Select Y Series Data"),                    
        dcc.Dropdown(id='y-data',
                     options=[{'label': i, 'value': i} for i in list(df)],
                     multi=True
        )
        ],
        style={'display':'inline-block','padding-left': '100px'}
    ),

    html.Div(id='graph-data')          

])

@app.callback(
Output(component_id=‘graph-data’,component_property=‘children’),
[Input(component_id=‘x-data’,component_property=‘value’),
Input(component_id=‘y-data’,component_property=‘value’)
]
)

def update_graph(xdata,ydata):
return dcc.Graph(
figure=go.Figure(
data=go.Scatter(x=df[xdata],y=df[ydata],mode=‘lines+markers’)
)
)

if name == ‘main’:
app.run_server(port=3337)