-
I have an HTML Graphics panel with several queries returning Real User Monitoring (RUM) data for a given portal URL which is specified using a variable (it changes based on user selection on the dashboard). In some cases, especially for the queries relating to HTTP errors, it is entirely possible for the query to return nothing (some pages don't have errors) and my data source doesn't have the capability in it's query language to specify to return a zero for no value; it just doesn't return anything for that query. Up to now, I have been declaring variables that allow me to iterate over the set of queries as follows:
However, if one of the queries doesn't return any data, the queries all shift up one index in the series array. If I have six queries and the query at index 3 doesn't return data, the queries that would normally be at indices 4 and 5 become 3 and 4. Is there a way to retrieve the query data using the query identifier (by default, A, B, C, etc.) rather than positionally in the series array, or to access the identifier when looping thru them to ensure the code is handling the expected data set at a given index? I did review the How to get metrics section in the documentation, but couldn't determine if there was a way to do this or not, and couldn't find a similar question searching the past discussions. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Each series should have a refId To get the series with the refId "A" const seriesA = data.series.find(series => series.refId == "A");
console.log(seriesA); |
Beta Was this translation helpful? Give feedback.
Each series should have a refId
To get the series with the refId "A"