From ef070f18d3cd2ec60eff5a9ad3921cdf65b5bb9f Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 21 Feb 2024 17:20:07 -0500 Subject: [PATCH] fix: actually do the filtering for scalar graphs --- static/lib.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/lib.js b/static/lib.js index ce478ad..969b16f 100644 --- a/static/lib.js +++ b/static/lib.js @@ -290,8 +290,14 @@ class TimeseriesGraph extends HTMLElement { layout["yaxis"] = { tickformat: this.#d3TickFormat }; - for (const triple of subplot.Scalar) { + loopScalar: for (const triple of subplot.Scalar) { const labels = triple[0]; + for (var label in labels) { + var show = this.#filteredLabelSets[label]; + if (show && !show.includes(labels[label])) { + continue loopScalar; + } + } const meta = triple[1]; const series = triple[2]; var trace = {