mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 00:39:00 +08:00
Merge pull request #1 from pranshuchittora/pc/fix/pr-828
fix: add if condition for timeline interval
This commit is contained in:
commit
09fd877b2a
@ -33,7 +33,7 @@ const Timeline = ({
|
|||||||
for (const idx in INTERVAL_UNITS) {
|
for (const idx in INTERVAL_UNITS) {
|
||||||
const standard_interval = INTERVAL_UNITS[idx];
|
const standard_interval = INTERVAL_UNITS[idx];
|
||||||
if (baseSpread * standard_interval.multiplier < 1) {
|
if (baseSpread * standard_interval.multiplier < 1) {
|
||||||
intervalUnit = INTERVAL_UNITS[idx];
|
if (idx > 1) intervalUnit = INTERVAL_UNITS[idx - 1];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -68,8 +68,7 @@ const Timeline = ({
|
|||||||
{intervals &&
|
{intervals &&
|
||||||
intervals.map((interval, index) => (
|
intervals.map((interval, index) => (
|
||||||
<g
|
<g
|
||||||
transform={`translate(${
|
transform={`translate(${Timeline_H_Spacing +
|
||||||
Timeline_H_Spacing +
|
|
||||||
(interval.percentage * (width - 2 * Timeline_H_Spacing)) / 100
|
(interval.percentage * (width - 2 * Timeline_H_Spacing)) / 100
|
||||||
},0)`}
|
},0)`}
|
||||||
className={styles['timeline-tick']}
|
className={styles['timeline-tick']}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user