: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(marketing-analytics): add standalone metric chart (#105613)
Javier Bahamondese774f609076e
diff --git a/docs/internal/web-analytics-query-serving.md b/docs/internal/web-analytics-query-serving.mdindex ca944ac8ecf0..999be96f773f 100644--- a/docs/internal/web-analytics-query-serving.md+++ b/docs/internal/web-analytics-query-serving.md@@ -186,3 +186,14 @@ Marketing Analytics query errors show a query ID when the request has one.Use that ID to find the failed request in the query log.The error's query ID takes precedence over the current request ID; a previous successful response is not a source for the error ID.Errors outside the query path, such as configuration failures, may have no query ID.++## Marketing metric chart++The standalone metric chart receives prepared series, ISO date labels, a selected breakdown key, and callbacks.+The query-owning caller switches between total and breakdown data and supplies error content, including the failed query ID and retry action.+Chart clicks select the nearest line and return the raw breakdown identity so selections can match table rows even when display labels differ.+An empty string is a selectable breakdown key; `null` clears selection.+Percentage series contain fractions: a value of `0.42` displays as `42.0%` in the axis and tooltip.+The chart keeps existing data visible while refreshing and replaces it with the supplied error if the refresh fails.+Storybook covers loading, refreshing, empty results, errors, and a 520 px scene.+The component does not activate the five-section dashboard or change its queries.diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 84ca720ebd9e..61297328dfb0 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -5576,6 +5576,42 @@ snapshots:hash: v1.k794b7964.892b971ab555f6d1ca2e0fa85f9a9866e3e5b8fd2843db239963ee69d0557810.JMoDrmwxxF3X_fUQL4s76kPCprGp3yU0oyOPqLf8Smwmarketing-analytics-dashboard-metric-cards--narrow--light:hash: v1.k794b7964.19970bb1bed82447960aefd0360d530aacf7953ad0aed733f9e3cbb2136dd4c8.qWkLBIG4xUN4Qp39pJnDkjC8z0-DunhMLPxYC-o5KZA+ marketing-analytics-dashboard-metric-chart--empty--dark:+ hash: v1.k794b7964.7b6020b3d1d18ce093240b91f693ea2c2c26fbf3c013ebffaa4e3f2166da25e5.TjRc-gGEpBCZP3Ite7qHlDW6JcZce1gJIHH1BGuWieI+ marketing-analytics-dashboard-metric-chart--empty--light:+ hash: v1.k794b7964.689218e3c187ef67f2cac86867da5df5c74c49c4448f0b530c949d9005499c23.egxucJAOTaVMEwYkNmtJQJJrA6ci-2H_qHVsMCndcT4+ marketing-analytics-dashboard-metric-chart--error--dark:+ hash: v1.k794b7964.e809ea038ca7c8a676941744aa8b828d583bcec82c8e4c13d8c9aa2e617fe81b.JPk5U6T9QqNAsvpIipO0tmNX73qRqlEe2uVr4ac41nI+ marketing-analytics-dashboard-metric-chart--error--light:+ hash: v1.k794b7964.62715b403c1f9cf81295fffcfc17f428f4f8a5f67b2a650f5f01098f28500b52.qbBoEKB7pcYmr-n4M7-zMhwTBAk9l4Xnc6TMU8hIbvY+ marketing-analytics-dashboard-metric-chart--interactive--dark:+ hash: v1.k794b7964.1171481aac8e380c23b35ed7201df782d2e6c8320c37dcef046a344c3607bed9._SCYVG0_Yn3FeknY8CUBX45M9_lkkWMXSWAEDuMlz94+ marketing-analytics-dashboard-metric-chart--interactive--light:+ hash: v1.k794b7964.052a39648417d77f897ef2ba52c53dbe07e44e07dd0ba83f7fea3b4a36dcb70d.FEcw-a3jVZx-DwrFh5_XvytVpWJYTxi_5nj5w1CxITo+ marketing-analytics-dashboard-metric-chart--loading--dark:+ hash: v1.k794b7964.82a9b4e0a2f369d89ee7161b4537b3e97e5c461a157fc1803a5f5c2dcb063dce.PxIAHr4mRzPTF-iVmryTjLtm_00h7CGmOm5za0rmy4E+ marketing-analytics-dashboard-metric-chart--loading--light:+ hash: v1.k794b7964.9372cf54ba7c2309858e4e2f649c4fc589ceda9bb6118629a0ad4f5ea2c71d40.xZvN9hfVD7NxhecYQqOfjKgTPEFhYb9hBFu8nVntduw+ marketing-analytics-dashboard-metric-chart--narrow--dark:+ hash: v1.k794b7964.ca8dd72bb4556f2452c8d88b6fdd878f153a1a228f0f2d24f5d2cc7cb383448a.mCPDTBOzBKsDDRGXVRc0LMdGJ7smRTNBls8nqCjNX60+ marketing-analytics-dashboard-metric-chart--narrow--light:+ hash: v1.k794b7964.4892e85e55ec70c9406fcc562761b8a6496ae857af380bc2709958e7e82b4f67.QxiuaCdQdagzXPNXwmNsdBL19e286pDHiZpUyOBuXD0+ marketing-analytics-dashboard-metric-chart--narrow-error--dark:+ hash: v1.k794b7964.a56a21ce4c7d5c492b9cb7c8b6291a1347a99ed7e8e14f2adca9c1a2613d499b.rSLMTKIeWVoinQ_Pvf5hpM6vcHQzXI8hh_zwZ7JYgfk+ marketing-analytics-dashboard-metric-chart--narrow-error--light:+ hash: v1.k794b7964.476d3187f9bcf929140f6b5169584bee7985c5a9fd692d152ce711ef2711f932.TL33eGlCu1UyWiYc8UQuopK4F91ttLIWlWUplEQfJy8+ marketing-analytics-dashboard-metric-chart--percentage--dark:+ hash: v1.k794b7964.6fb50145654e53e748fe132435c760a8624d512d455daffb4fac1beee43b9f26.W9IYyo2xYX7QTa4Lxi2S2Mch4jtOAFeaXx4CzHf9C1U+ marketing-analytics-dashboard-metric-chart--percentage--light:+ hash: v1.k794b7964.7f355743c54a5d245b96469658060692079f2bba19a4dafc9e56bd4cf772e5b6.sQTvJVJVPV-1VZSJiBpjlOzHUkpHh2D9CG77rUblwTY+ marketing-analytics-dashboard-metric-chart--refreshing--dark:+ hash: v1.k794b7964.10de1f1ee3cabcd375230e26384b61ef01e0587ce6927c68fd5db1ff76aee496.i1r8fbZwXkwZ-fvg7bW1YelQKnskxIw7WhQvvMkTLEg+ marketing-analytics-dashboard-metric-chart--refreshing--light:+ hash: v1.k794b7964.38afa435aa16e9a38e6513446d2d2876f8fbba5fa9bf5bc6178135598d9f1a8b.-pUeEvoZxSPMjlsReWUE-IDYliHwcGXilv_CbN-S0LY+ marketing-analytics-dashboard-metric-chart--total--dark:+ hash: v1.k794b7964.b534f4ca547e10b9fae117c7ad42100972cb5863d76592c5a2db74351020b4bb.K5pm_IZiAgcMUETOyn4mPrPPscHPLJtvj-UX97XC_ic+ marketing-analytics-dashboard-metric-chart--total--light:+ hash: v1.k794b7964.b2249c43b08031cff84d2333c09b1dfafda2bbb321249afc6cfce04af1966028.C7JFm6S2QcyHxJZu1Pebh7Idaevdqlbn0gFdukxHGVImarketing-analytics-dashboard-section-switcher--interactive-navigation--dark:hash: v1.k794b7964.2fe3cc126cedcb557e16085f3ded5054e98c699e5f0ba98435273de51ddcf248.fDtABuH6P0Lp-EO3fMPs5xxxtU7g6kzS_eWIAlr4Yrwmarketing-analytics-dashboard-section-switcher--interactive-navigation--light:diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a20dc1d4ae35..ef34ca0c4b35 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -3976,6 +3976,9 @@ importers:'@posthog/icons':specifier: 'catalog:'+ '@posthog/quill-charts':+ specifier: workspace:*+ version: link:../../packages/quill/packages/charts'@types/react':specifier: 18.3.27version: 18.3.27diff --git a/products/marketing_analytics/frontend/dashboard/charts/MetricChart.stories.tsx b/products/marketing_analytics/frontend/dashboard/charts/MetricChart.stories.tsxnew file mode 100644index 000000000000..b3105037699b--- /dev/null+++ b/products/marketing_analytics/frontend/dashboard/charts/MetricChart.stories.tsx@@ -0,0 +1,41 @@+import { Meta, StoryObj } from '@storybook/react'++import { MetricChartPreview } from './MetricChartPreview'++const meta: Meta<typeof MetricChartPreview> = {+ title: 'Marketing Analytics/Dashboard/Metric chart',+ component: MetricChartPreview,+ args: {+ state: 'loaded',+ chartMode: 'breakdown',+ focusedBreakdownValue: null,+ format: 'number',+ queryId: '00000000-0000-4000-8000-000000000001',+ },+ render: (args) => <MetricChartPreview key={JSON.stringify(args)} {...args} />,+}+export default meta+type Story = StoryObj<typeof meta>++export const Interactive: Story = {}+export const Total: Story = { args: { chartMode: 'total' } }+export const Percentage: Story = { args: { format: 'percentage' } }+export const Loading: Story = {+ args: { state: 'loading' },+ parameters: { testOptions: { waitForLoadersToDisappear: false } },+}+export const Refreshing: Story = { ...Loading, args: { state: 'refreshing' } }+export const Empty: Story = { args: { state: 'empty' } }+export const Error: Story = { args: { state: 'error' } }+export const Narrow: Story = {+ args: { focusedBreakdownValue: '' },+ decorators: [+ (Story) => (+ // A 520 px scene models the space beside an open side panel.+ <div className="w-[32.5rem] max-w-full">+ <Story />+ </div>+ ),+ ],+}+export const NarrowError: Story = { args: Error.args, decorators: Narrow.decorators }diff --git a/products/marketing_analytics/frontend/dashboard/charts/MetricChart.test.tsx b/products/marketing_analytics/frontend/dashboard/charts/MetricChart.test.tsxnew file mode 100644index 000000000000..35933775e115--- /dev/null+++ b/products/marketing_analytics/frontend/dashboard/charts/MetricChart.test.tsx@@ -0,0 +1,85 @@+import {+ clickAtIndex,+ createDefaultTooltipAccessor,+ hoverUntilTooltip,+ renderHogChart,+} from '@posthog/quill-charts/testing'++import { MetricChart, MetricChartProps } from './MetricChart'++const props: MetricChartProps = {+ label: 'Visitors',+ breakdownLabel: 'Channel',+ format: 'number',+ timezone: 'UTC',+ labels: ['2026-01-01', '2026-01-02', '2026-01-03'],+ series: [],+ chartMode: 'breakdown',+ focusedBreakdownValue: null,+ loading: false,+ error: null,+ onChartModeChange: jest.fn(),+ onFocus: jest.fn(),+}++describe('MetricChart', () => {+ it.each([+ { key: 'email', label: 'Email newsletter' },+ { key: '', label: 'No channel' },+ ])('selects the closest of several lines using the raw key "$key"', async ({ key, label }) => {+ const onFocus = jest.fn()+ const { chart } = renderHogChart(+ <MetricChart+ {...props}+ series={[+ { key: 'lower', label: 'Lower line', data: [0, 0, 0] },+ { key, label, data: [100, 100, 100] },+ { key: 'upper', label: 'Upper line', data: [200, 200, 200] },+ ]}+ onFocus={onFocus}+ />,+ { nativeTooltip: true }+ )++ await clickAtIndex(chart.element, 1, props.labels.length)++ expect(onFocus).toHaveBeenCalledWith(key)+ })++ it('formats fractional rates as percentages in the axis and tooltip', async () => {+ const { chart, container } = renderHogChart(+ <MetricChart+ {...props}+ format="percentage"+ series={[{ key: 'email', label: 'Email', data: [0, 0.42, 1] }]}+ />,+ { nativeTooltip: true }+ )+ const tooltip = createDefaultTooltipAccessor(await hoverUntilTooltip(chart.element, 1, props.labels.length))++ expect(tooltip.value('Email')).toBe('42.0%')+ expect(container.textContent).toContain('100.0%')+ })++ it('shows the supplied error instead of stale data and hides it during retry', () => {+ const { container, rerender, getByText, queryByText } = renderHogChart(+ <MetricChart {...props} series={[{ key: 'email', label: 'Email', data: [0, 12, 8] }]} />,+ { nativeTooltip: true }+ )+ rerender(+ <MetricChart+ {...props}+ series={[{ key: 'email', label: 'Email', data: [0, 12, 8] }]}+ error={<span>Query ID: synthetic-query-id</span>}+ />+ )++ expect(getByText('Query ID: synthetic-query-id')).not.toBeNull()+ expect(container.querySelector('canvas')).toBeNull()++ rerender(<MetricChart {...props} loading error={<span>Query ID: synthetic-query-id</span>} />)++ expect(queryByText('Query ID: synthetic-query-id')).toBeNull()+ expect(container.querySelector('[aria-label="Loading chart"]')).not.toBeNull()+ })+})diff --git a/products/marketing_analytics/frontend/dashboard/charts/MetricChart.tsx b/products/marketing_analytics/frontend/dashboard/charts/MetricChart.tsxnew file mode 100644index 000000000000..82ffb46c20c0--- /dev/null+++ b/products/marketing_analytics/frontend/dashboard/charts/MetricChart.tsx@@ -0,0 +1,152 @@+import { ReactNode, useMemo } from 'react'++import { LemonButton, LemonSegmentedButton, LemonSkeleton } from '@posthog/lemon-ui'+import { Series, TimeSeriesLineChart, TimeSeriesLineChartConfig } from '@posthog/quill-charts'++import { useChartConfig, useChartTheme } from 'lib/charts/hooks'+import { humanFriendlyDuration } from 'lib/utils/durations'+import { humanFriendlyNumber } from 'lib/utils/numbers'++import { focusedSeries } from './seriesFocus'++export interface MetricChartProps {+ label: string+ breakdownLabel: string+ format: 'number' | 'percentage' | 'duration' | 'decimal'+ timezone: string+ labels: string[]+ series: (Series & { key: string })[]+ chartMode: 'total' | 'breakdown'+ focusedBreakdownValue: string | null+ loading: boolean+ error: ReactNode+ onChartModeChange: (mode: 'total' | 'breakdown') => void+ onFocus: (value: string | null) => void+}++export function MetricChart({+ label,+ breakdownLabel,+ format,+ timezone,+ labels,+ series,+ chartMode,+ focusedBreakdownValue,+ loading,+ error,+ onChartModeChange,+ onFocus,+}: MetricChartProps): JSX.Element {+ const theme = useChartTheme()+ const focused =+ chartMode === 'breakdown' && series.some((row) => row.key === focusedBreakdownValue)+ ? focusedBreakdownValue+ : null+ const chartSeries = useMemo(+ () =>+ series.map((row, index) => ({+ ...row,+ // Chart hit-testing needs a nonempty key; selection keeps the raw breakdown value.+ key: JSON.stringify(row.key),+ ...focusedSeries(focused, row.key, index, theme),+ })),+ [series, focused, theme]+ )+ const config = useChartConfig<TimeSeriesLineChartConfig>(() => {+ const formatValue = (value: number): string => {+ switch (format) {+ case 'percentage':+ return `${(value * 100).toFixed(1)}%`+ case 'duration':+ return humanFriendlyDuration(value) ?? String(value)+ case 'decimal':+ return value.toFixed(2)+ default:+ return humanFriendlyNumber(value)+ }+ }+ return {+ xAxis: { timezone },+ yAxis: { tickFormatter: formatValue },+ legend: { show: chartMode === 'breakdown', interactive: true, position: 'bottom' },+ tooltip: {+ placement: 'cursor',+ sortedByValue: true,+ valueFormatter: formatValue,+ pinnable: chartMode === 'breakdown',+ resolveClickToNearestSeries: true,+ },+ }+ }, [format, chartMode, timezone])+ const hasData = series.some((row) => row.data.some(Number.isFinite)) && labels.length > 0++ // Keep the canvas inside the rounded panel without changing its measured height.+ return (+ <div className="border rounded overflow-hidden bg-surface-primary flex flex-col" aria-busy={loading}>+ <div className="flex flex-wrap items-center justify-between gap-2 px-3 py-2">+ <h3 className="m-0 text-base font-semibold break-words min-w-0">{`${label} over time`}</h3>+ <div className="flex flex-wrap items-center gap-2">+ {focused !== null && (+ <LemonButton+ size="xsmall"+ onClick={() => onFocus(null)}+ disabledReason={loading ? 'Wait for the chart to finish loading' : undefined}+ data-attr="marketing-dashboard-chart-clear-focus"+ >+ Clear selection+ </LemonButton>+ )}+ <LemonSegmentedButton+ size="xsmall"+ value={chartMode}+ onChange={onChartModeChange}+ disabledReason={loading ? 'Wait for the chart to finish loading' : undefined}+ options={[+ {+ value: 'breakdown',+ label: `By ${breakdownLabel.toLowerCase()}`,+ 'data-attr': 'marketing-dashboard-chart-mode-breakdown',+ },+ { value: 'total', label: 'Total', 'data-attr': 'marketing-dashboard-chart-mode-total' },+ ]}+ />+ </div>+ </div>+ {loading && !hasData ? (+ <div className="h-64 px-3 pb-3" aria-label="Loading chart">+ <LemonSkeleton className="h-full w-full" />+ </div>+ ) : error && !loading ? (+ <div className="p-3">{error}</div>+ ) : !hasData ? (+ <div className="px-3 pb-6 text-secondary text-sm">+ No data for this metric. Try another date range or change your filters.+ </div>+ ) : (+ <div className="px-3 pb-3 relative">+ {/* The canvas needs a flex column with a real height or only the legend renders. */}+ <div className="flex flex-col h-64">+ <TimeSeriesLineChart+ key={chartMode}+ series={chartSeries}+ labels={labels}+ theme={theme}+ config={config}+ dataAttr="marketing-dashboard-metric-chart"+ onPointClick={+ chartMode === 'breakdown' && !loading+ ? ({ series: clicked }) =>+ onFocus(+ series.find((row) => JSON.stringify(row.key) === clicked.key)?.key ?? null+ )+ : undefined+ }+ />+ </div>+ {loading && <div className="absolute inset-0 bg-primary/40" aria-hidden />}+ </div>+ )}+ </div>+ )+}diff --git a/products/marketing_analytics/frontend/dashboard/charts/MetricChartPreview.tsx b/products/marketing_analytics/frontend/dashboard/charts/MetricChartPreview.tsxnew file mode 100644index 000000000000..e44c0c6cd355--- /dev/null+++ b/products/marketing_analytics/frontend/dashboard/charts/MetricChartPreview.tsx@@ -0,0 +1,95 @@+import { useState } from 'react'++import { LemonBanner, LemonButton, LemonSelect } from '@posthog/lemon-ui'++import { MetricChart, MetricChartProps } from './MetricChart'++const LABELS = ['2026-01-01', '2026-01-02', '2026-01-03', '2026-01-04', '2026-01-05']+const BREAKDOWN_SERIES = [+ { key: 'organic', label: 'Organic search', data: [48, 64, 52, 76, 60] },+ { key: 'email', label: 'Email newsletter for returning visitors', data: [20, 28, NaN, 30, 36] },+ { key: '', label: 'No channel', data: [0, 12, 8, 16, 20] },+]+const TOTAL_SERIES = [{ key: 'total', label: 'Visitors', data: [68, 104, 60, 122, 116] }]+const RATE_SERIES = BREAKDOWN_SERIES.map((row) => ({ ...row, data: row.data.map((value) => value / 100) }))+const TOTAL_RATE_SERIES = [{ key: 'total', label: 'Bounce rate', data: [0.4, 0.42, 0.3, 0.5, 0.45] }]++interface MetricChartPreviewProps {+ state: 'loaded' | 'loading' | 'refreshing' | 'empty' | 'error'+ chartMode: MetricChartProps['chartMode']+ focusedBreakdownValue: string | null+ format: MetricChartProps['format']+ queryId: string | null+}++export function MetricChartPreview({+ state: initialState,+ chartMode: initialChartMode,+ focusedBreakdownValue: initialFocusedBreakdownValue,+ format,+ queryId,+}: MetricChartPreviewProps): JSX.Element {+ const [state, setState] = useState(initialState)+ const [chartMode, setChartMode] = useState(initialChartMode)+ const [focusedBreakdownValue, setFocusedBreakdownValue] = useState(initialFocusedBreakdownValue)+ const total = format === 'percentage' ? TOTAL_RATE_SERIES : TOTAL_SERIES+ const breakdown = format === 'percentage' ? RATE_SERIES : BREAKDOWN_SERIES+ const series = state === 'empty' || state === 'loading' ? [] : chartMode === 'total' ? total : breakdown++ // Pin the scene width so visual snapshots cannot shrink to the controls.+ return (+ <div className="flex w-[60rem] max-w-full flex-col gap-4">+ <MetricChart+ label={format === 'percentage' ? 'Bounce rate' : 'Visitors'}+ breakdownLabel="Channel"+ format={format}+ timezone="UTC"+ labels={LABELS}+ series={series}+ chartMode={chartMode}+ focusedBreakdownValue={focusedBreakdownValue}+ onChartModeChange={(mode) => {+ setChartMode(mode)+ setFocusedBreakdownValue(null)+ }}+ onFocus={setFocusedBreakdownValue}+ loading={state === 'loading' || state === 'refreshing'}+ error={+ state === 'error' && (+ <LemonBanner type="error" action={{ children: 'Retry', onClick: () => setState('loaded') }}>+ <span>Couldn't load this chart. Try again.</span>+ {queryId && (+ <div className="text-muted text-xs break-all">+ <span>Query ID: </span>+ <span className="font-mono" translate="no">+ {queryId}+ </span>+ </div>+ )}+ </LemonBanner>+ )+ }+ />+ <div className="flex flex-wrap gap-2 items-center">+ <LemonSelect+ value={state}+ onChange={setState}+ options={[+ { value: 'loaded', label: 'Show data' },+ { value: 'loading', label: 'Show loading' },+ { value: 'refreshing', label: 'Show refreshing' },+ { value: 'empty', label: 'Show empty' },+ { value: 'error', label: 'Show error' },+ ]}+ />+ <LemonButton+ onClick={() => setFocusedBreakdownValue('')}+ disabledReason={chartMode === 'total' ? 'Switch to By channel' : undefined}+ >+ Select no channel+ </LemonButton>+ <span>{`Selected channel: ${focusedBreakdownValue === null ? 'None' : focusedBreakdownValue || 'No channel'}`}</span>+ </div>+ </div>+ )+}diff --git a/products/marketing_analytics/frontend/dashboard/charts/seriesFocus.test.ts b/products/marketing_analytics/frontend/dashboard/charts/seriesFocus.test.tsnew file mode 100644index 000000000000..bf9e98b96ba2--- /dev/null+++ b/products/marketing_analytics/frontend/dashboard/charts/seriesFocus.test.ts@@ -0,0 +1,11 @@+import { focusedSeries } from './seriesFocus'++describe('focusedSeries', () => {+ it('can focus an empty breakdown key without treating it as no selection', () => {+ const theme = { colors: ['#123456', '#654321'] }++ expect(focusedSeries('', '', 0, theme)).toEqual({ color: '#123456' })+ expect(focusedSeries('', 'organic', 1, theme)).toEqual({ color: 'rgba(101, 67, 33, 0.18)' })+ expect(focusedSeries(null, 'organic', 1, theme)).toBeNull()+ })+})diff --git a/products/marketing_analytics/frontend/dashboard/charts/seriesFocus.ts b/products/marketing_analytics/frontend/dashboard/charts/seriesFocus.tsindex 52f013e25c39..11fb5b28d1fe 100644--- a/products/marketing_analytics/frontend/dashboard/charts/seriesFocus.ts+++ b/products/marketing_analytics/frontend/dashboard/charts/seriesFocus.ts@@ -27,7 +27,7 @@ export function focusedSeries(index: number,theme: ChartTheme): { color: string } | null {- if (!focused) {+ if (focused === null) {return null}const palette = theme.colors ?? []diff --git a/products/marketing_analytics/package.json b/products/marketing_analytics/package.jsonindex b49cf96a5d8c..22d13e290a2d 100644--- a/products/marketing_analytics/package.json+++ b/products/marketing_analytics/package.json@@ -4,6 +4,7 @@"backend:test": "pytest -c ../../pytest.ini --rootdir ../.. backend/ -v --tb=short"},"dependencies": {+ "@posthog/quill-charts": "workspace:*","kea": "catalog:","kea-subscriptions": "catalog:"},