From a117deac2982bdce522f45af41973615409cb06c Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Mon, 2 Aug 2021 17:57:57 -0600 Subject: [PATCH] kpi_csv_sq.py, added ability to save the individual figures or images of the graphs. Signed-off-by: Chuck SmileyRekiere --- py-scripts/sandbox/kpi_csv_sq.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py-scripts/sandbox/kpi_csv_sq.py b/py-scripts/sandbox/kpi_csv_sq.py index fadb294b..bb52f66f 100755 --- a/py-scripts/sandbox/kpi_csv_sq.py +++ b/py-scripts/sandbox/kpi_csv_sq.py @@ -17,7 +17,8 @@ external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) # get a list of the kpi.csv files not the path needs to be bassed in -path = Path('./2021-07-31-03-00-01_lf_check') +#path = Path('./2021-07-31-03-00-01_lf_check') +path = Path('./test_data3') kpi_list = list(path.glob('**/kpi.csv')) #print(kpi_list) @@ -100,8 +101,11 @@ for test_tag in test_tag_list: yaxis_title="{}".format(units[0]), xaxis = {'type' : 'date'} ) + # save the figure - this may need to be re-written + # uncomment after testing append_fig.write_image("{}_{}_{}_{}.png".format(test_id[0], group, test_tag, test_rig[0]),scale=1,width=1200,height=350) plot_figure.append(append_fig) + # there may be more layout with html.Div # Maybe a be more OO