diff --git a/daqviewer/daqviewer.py b/daqviewer/daqviewer.py index 3ec5714..9f3442c 100644 --- a/daqviewer/daqviewer.py +++ b/daqviewer/daqviewer.py @@ -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