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(customer-analytics): show the value next to account sparklines (#74686)

Arthur Moreira de Deusefa5f6f7cd41
diff --git a/products/customer_analytics/frontend/components/Accounts/AccountsHogQLTable.tsx b/products/customer_analytics/frontend/components/Accounts/AccountsHogQLTable.tsx
index 64487f466cc4..34ad90738fd6 100644
--- a/products/customer_analytics/frontend/components/Accounts/AccountsHogQLTable.tsx
+++ b/products/customer_analytics/frontend/components/Accounts/AccountsHogQLTable.tsx
@@ -282,11 +282,16 @@ function CustomPropertyHistoryCell({
}
if (display.mode === 'sparkline') {
+ // Each sparkline auto-scales to its own range, so the line shows the trend but not the
+ // magnitude — every row looks alike without the latest value spelled out next to it.
return (
- <div className="w-32">
+ // `min-w-min` lets the cell outgrow w-40 instead of spilling a long value into the next
+ // column, and the chart keeps a floor so it degrades rather than vanishing.
+ <div className="flex items-center gap-2 w-40 min-w-min">
+ <span className="tabular-nums whitespace-nowrap">{formatValue(latest[1])}</span>
<Sparkline
type="line"
- className="h-8"
+ className="h-8 min-w-8"
data={chartPoints.map(([, value]) => value)}
labels={chartPoints.map(([timestamp]) => dayjs.unix(timestamp).format('MMM D, YYYY HH:mm'))}
renderTooltipValue={formatValue}