From 81dfaead20e997f0cf183998f90b840b1b70c2a4 Mon Sep 17 00:00:00 2001 From: "Maxim.Kolmakov" Date: Tue, 14 Nov 2023 16:03:13 +0100 Subject: [PATCH] Fix series name for series that are ints --- .../new-dashboard/src/configurators/MeasureConfigurator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard/new-dashboard/src/configurators/MeasureConfigurator.ts b/dashboard/new-dashboard/src/configurators/MeasureConfigurator.ts index 4c30cf4e..927e4cbe 100644 --- a/dashboard/new-dashboard/src/configurators/MeasureConfigurator.ts +++ b/dashboard/new-dashboard/src/configurators/MeasureConfigurator.ts @@ -386,7 +386,8 @@ function configureChart( } if (isNotEmpty) { - const name = seriesName.startsWith("metrics.") ? seriesName.slice("metrics.".length) : seriesName + // noinspection SuspiciousTypeOfGuard + const name = typeof seriesName === "string" ? (seriesName.startsWith("metrics.") ? seriesName.slice("metrics.".length) : seriesName) : seriesName const id = measureName === seriesName ? seriesName : `${measureName}@${seriesName}` const seriesLayoutBy = "row" const datasetIndex = dataIndex