Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix 12 hours and 24 hours labels

kruzhambuscf692d3e9a54
diff --git a/src/pages/Project/View/ViewProject.helpers.tsx b/src/pages/Project/View/ViewProject.helpers.tsx
index c0317e3fd..cb8b62c18 100644
--- a/src/pages/Project/View/ViewProject.helpers.tsx
+++ b/src/pages/Project/View/ViewProject.helpers.tsx
@@ -555,7 +555,7 @@ const getSettings = (
<span>${getStringFromTime(getTimeFromSeconds(value))}</span>
</p>
<p>
- <span>${d3.timeFormat(tbsFormatMapper[timeBucket])(dayjs(compareChart?.x[index]).toDate())}</span> -
+ <span>${timeFormat === TimeFormat['24-hour'] ? d3.timeFormat(tbsFormatMapperTooltip24h[timeBucket])(dayjs(compareChart?.x[index]).toDate()) : d3.timeFormat(tbsFormatMapperTooltip[timeBucket])(dayjs(compareChart?.x[index]).toDate())}</span> -
<span>${getStringFromTime(getTimeFromSeconds(compareChart[typesOptionsToTypesCompare[id]][index]))}</span>
</p>
</li>
@@ -575,7 +575,7 @@ const getSettings = (
<span>${timeFormat === TimeFormat['24-hour'] ? d3.timeFormat(tbsFormatMapperTooltip24h[timeBucket])(x) : d3.timeFormat(tbsFormatMapperTooltip[timeBucket])(x)}</span> - <span>${value}</span>
</p>
<p>
- <span>${d3.timeFormat(tbsFormatMapper[timeBucket])(dayjs(compareChart?.x[index]).toDate())}</span> - <span>${compareChart[typesOptionsToTypesCompare[id]][index]}</span>
+ <span>${timeFormat === TimeFormat['24-hour'] ? d3.timeFormat(tbsFormatMapperTooltip24h[timeBucket])(dayjs(compareChart?.x[index]).toDate()) : d3.timeFormat(tbsFormatMapperTooltip[timeBucket])(dayjs(compareChart?.x[index]).toDate())}</span> - <span>${compareChart[typesOptionsToTypesCompare[id]][index]}</span>
</p>
</li>
`