Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: x axis label when the time stamp is not parsed

Pranshu Chittoraa95656b3a0e3
diff --git a/frontend/src/components/Graph/xAxisConfig.ts b/frontend/src/components/Graph/xAxisConfig.ts
index 493c36e5b7..ae99a49a23 100644
--- a/frontend/src/components/Graph/xAxisConfig.ts
+++ b/frontend/src/components/Graph/xAxisConfig.ts
@@ -77,8 +77,8 @@ export const useXAxisTimeUnit = (data: Chart['data']): IAxisTimeConfig => {
try {
let minTime = Number.POSITIVE_INFINITY;
let maxTime = Number.NEGATIVE_INFINITY;
- data?.labels?.forEach((timeStamp: any) => {
- timeStamp = Date.parse(timeStamp);
+ data?.labels?.forEach((timeStamp: string | number): void => {
+ if (typeof timeStamp === 'string') timeStamp = Date.parse(timeStamp);
minTime = Math.min(timeStamp, minTime);
maxTime = Math.max(timeStamp, maxTime);
});