From edd5762010139a9b4011e8b6e26bf1f7038a6442 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 20 Mar 2024 21:55:06 +0100 Subject: [PATCH] trend flex v1 --- rowers/interactiveplots.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 4da4f96b..632af695 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -3761,6 +3761,24 @@ def interactive_multiflex(datadf, xparam, yparam, groupby, extratitle='', yaxmax = yaxmaxima[yparam] yaxmin = yaxminima[yparam] + data_dict = datadf.to_dict("records") + + metrics_list = [{'name': name, 'rowingmetrics':d } for name, d in metrics.rowingmetrics] + + chart_data = { + 'title': title, + 'x': xparam, + 'y': yparam, + 'data': data_dict, + 'metrics': metrics_list, + 'errorbars':ploterrorbars, + 'groupname': groupname, + } + + script, div = get_chart("/trendflex", chart_data) + + return script, div + x_axis_type = 'linear' y_axis_type = 'linear' if xparam == 'time': # pragma: no cover