From 6bed94f63e29ad3993a68aa9418e4a1405e1f759 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 21 Feb 2024 16:22:02 -0500 Subject: [PATCH] ui: show the labels for scalar graphs as well --- static/lib.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/static/lib.js b/static/lib.js index 5c9d4ec..ce478ad 100644 --- a/static/lib.js +++ b/static/lib.js @@ -221,6 +221,12 @@ class TimeseriesGraph extends HTMLElement { this.populateFilterData(labels); } } + if (subplot.Scalar) { + for (const triple of subplot.Scalar) { + const labels = triple[0]; + this.populateFilterData(labels); + } + } } } @@ -281,6 +287,9 @@ class TimeseriesGraph extends HTMLElement { } } else if (subplot.Scalar) { // https://plotly.com/javascript/reference/bar/ + layout["yaxis"] = { + tickformat: this.#d3TickFormat + }; for (const triple of subplot.Scalar) { const labels = triple[0]; const meta = triple[1];