From 742c2e399e9db818eb80f7b735014970f03e6e53 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 26 Jul 2023 13:44:06 +0200 Subject: [PATCH] feat: Add uplot histogram, implemented in userview - For testing - add conversion function to utils --- web/frontend/src/User.root.svelte | 57 ++----- web/frontend/src/plots/Histogramuplot.svelte | 168 +++++++++++++++++++ web/frontend/src/plots/MetricPlot.svelte | 3 +- web/frontend/src/units.js | 12 +- web/frontend/src/utils.js | 10 ++ 5 files changed, 205 insertions(+), 45 deletions(-) create mode 100644 web/frontend/src/plots/Histogramuplot.svelte diff --git a/web/frontend/src/User.root.svelte b/web/frontend/src/User.root.svelte index 9c94eca..55aacc1 100644 --- a/web/frontend/src/User.root.svelte +++ b/web/frontend/src/User.root.svelte @@ -1,13 +1,13 @@ + +{#if data.length > 0} +
+
+
+{:else} + Cannot render histogram: No data! +{/if} + + diff --git a/web/frontend/src/plots/MetricPlot.svelte b/web/frontend/src/plots/MetricPlot.svelte index 6b45c70..a20b307 100644 --- a/web/frontend/src/plots/MetricPlot.svelte +++ b/web/frontend/src/plots/MetricPlot.svelte @@ -323,8 +323,9 @@ {#if series[0].data.length > 0}
{:else} - Cannot render plot: No series data returned for {metric} + Cannot render plot: No series data returned for {metric} {/if} +