Set range for x axis

master
Dan Howe 5 years ago
parent 9143dfa134
commit c0024c0abd

@ -87,7 +87,7 @@ def parse_contents(contents, filename):
Input('upload-data', 'contents'),
Input('upload-data', 'filename'),
])
def update_output(contents, name):
def csv_to_json(contents, name):
if contents is not None:
return parse_contents(contents, name)
@ -136,7 +136,15 @@ def read_json_data(json_data):
trace = go.Scatter(x=S.args, y=S.data, name=col, opacity=0.8)
spec.append(trace)
graph_energy = dcc.Graph(id='energy-spectrum', figure={'data': spec})
graph_energy = dcc.Graph(id='energy-spectrum',
figure={
'data': spec,
'layout': {
'xaxis': {
'range': [0, 3]
}
}
})
# Add location column
dfs['location'] = dfs.index

Loading…
Cancel
Save