Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(trends): display annotations for current period in bar charts (#57635)

Thomas Obermüller6e07df01cc06
diff --git a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx
index cca27e0fa28a..afd52ec836d9 100644
--- a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx
+++ b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx
@@ -1304,7 +1304,7 @@ export function LineGraph_({
{showAnnotations && chartRef.current && chartWidth && chartHeight ? (
<AnnotationsOverlay
chart={chartRef.current}
- dates={datasets[0]?.days || EMPTY_DATES}
+ dates={currentPeriodResult?.days || datasets[0]?.days || EMPTY_DATES}
chartWidth={chartWidth}
chartHeight={chartHeight}
insightNumericId={insight.id || 'new'}