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: add if condition for timeline interval

Pranshu Chittorac04c0284dcb2
diff --git a/frontend/src/container/Timeline/index.tsx b/frontend/src/container/Timeline/index.tsx
index 0c20e35a60..8f25f5c290 100644
--- a/frontend/src/container/Timeline/index.tsx
+++ b/frontend/src/container/Timeline/index.tsx
@@ -33,7 +33,7 @@ const Timeline = ({
for (const idx in INTERVAL_UNITS) {
const standard_interval = INTERVAL_UNITS[idx];
if (baseSpread * standard_interval.multiplier < 1) {
- intervalUnit = INTERVAL_UNITS[idx];
+ if (idx > 1) intervalUnit = INTERVAL_UNITS[idx - 1];
break;
}
}
@@ -68,10 +68,9 @@ const Timeline = ({
{intervals &&
intervals.map((interval, index) => (
<g
- transform={`translate(${
- Timeline_H_Spacing +
+ transform={`translate(${Timeline_H_Spacing +
(interval.percentage * (width - 2 * Timeline_H_Spacing)) / 100
- },0)`}
+ },0)`}
className={styles['timeline-tick']}
key={interval.label + interval.percentage + index}
>