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: TypeError from from unpin callback when chart not connected (#61824)

Luke Belton891cc313b0bf
diff --git a/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx b/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx
index 14913a4ead42..06b9518defdd 100644
--- a/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx
+++ b/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx
@@ -630,6 +630,10 @@ const LegacyLineGraph = ({
showTooltip()
pinTooltip(() => {
+ if (!chart.canvas?.isConnected) {
+ return
+ }
+
// Hide crosshair on tooltip unpin
if ((chart as any).crosshair) {
;(chart as any).crosshair.enabled = false