From 0bbf2dfe95ea3bf4c60d695051eb1e2cbc48a73f Mon Sep 17 00:00:00 2001 From: ktx-abhay <141122205+ktx-abhay@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:15:06 +0530 Subject: [PATCH] fix: timeseries issue for area stacked chart (#2390) - #2383 - table sorting issue --- web/src/utils/dashboard/convertSQLData.ts | 2 +- web/src/utils/dashboard/convertTableData.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/utils/dashboard/convertSQLData.ts b/web/src/utils/dashboard/convertSQLData.ts index ed1082cb77..aafb9d6aa5 100644 --- a/web/src/utils/dashboard/convertSQLData.ts +++ b/web/src/utils/dashboard/convertSQLData.ts @@ -446,7 +446,7 @@ export const convertSQLData = ( // get the unique value of the first xAxis's key options.xAxis[0].data = Array.from( - new Set(searchQueryData[0].map((it: any) => it[xAxisKeys[0]])) + new Set(getAxisDataFromKey(xAxisKeys[0])) ); // options.xAxis[0].data = Array.from(new Set(options.xAxis[0].data)); diff --git a/web/src/utils/dashboard/convertTableData.ts b/web/src/utils/dashboard/convertTableData.ts index 2224f9220d..476a7473b2 100644 --- a/web/src/utils/dashboard/convertTableData.ts +++ b/web/src/utils/dashboard/convertTableData.ts @@ -51,7 +51,7 @@ export const convertTableData = (panelSchema: any, searchQueryData: any) => { if (col.align === "right") { const oldField = col["field"]; col["field"] = (row: any) => - row[oldField].toFixed(panelSchema.config.decimals ?? 2); + +row[oldField].toFixed(panelSchema.config.decimals ?? 2); } });