Add units to axis labels

master
Dan Howe 5 years ago
parent c0e8fe1bb4
commit 7471d9fa63

@ -136,7 +136,15 @@ def update_objects(json_data):
trace = go.Scatter(x=df.index, y=df[col], name=col, opacity=0.8) trace = go.Scatter(x=df.index, y=df[col], name=col, opacity=0.8)
ts.append(trace) 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', graph_timeseries = dcc.Graph(id='time-series',
figure={ figure={
'data': ts, 'data': ts,
@ -163,7 +171,9 @@ def update_objects(json_data):
'title': 'Frequency (Hz)', 'title': 'Frequency (Hz)',
}, },
'yaxis': { 'yaxis': {
'title': 'Energy (mm^2.s)', 'title':
'Energy ({}^2.s)'.format(
info['units']),
} }
} }
}) })

Loading…
Cancel
Save