diff --git a/daqviewer/daqviewer.py b/daqviewer/daqviewer.py index a2b4b70..b2877be 100644 --- a/daqviewer/daqviewer.py +++ b/daqviewer/daqviewer.py @@ -136,7 +136,15 @@ def update_objects(json_data): trace = go.Scatter(x=df.index, y=df[col], name=col, opacity=0.8) ts.append(trace) - layout = {'title': info['filename'], 'xaxis': {'rangeslider': {}}} + layout = { + 'title': info['filename'], + 'xaxis': { + 'rangeslider': {} + }, + 'yaxis': { + 'title': 'Amplitude ({})'.format(info['units']) + } + } graph_timeseries = dcc.Graph(id='time-series', figure={ 'data': ts, @@ -163,7 +171,9 @@ def update_objects(json_data): 'title': 'Frequency (Hz)', }, 'yaxis': { - 'title': 'Energy (mm^2.s)', + 'title': + 'Energy ({}^2.s)'.format( + info['units']), } } })