: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(funnels): round funnel bar ends and follow cursor with tooltip (#60945)
Sam Penningtone6816b1fb15d
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 8cc7706e3427..cbf794c49c4a 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -1947,7 +1947,7 @@ snapshots:filters-taxonomic-filter-headless--properties--dark:hash: v1.k794b7964.4ee695e5751c6f73e9742ab0cfeecf61b5adfe829cf3a0d49ab2877cae8b212f.jPN9l5TDgLRy9NzHenXHCU903UDg8-GdeGpf4PXt7aAfilters-taxonomic-filter-headless--properties--light:- hash: v1.k794b7964.afa422fd784363e602da5668ab488a823260acba8c2b1168dc85bcbf434d3ddf.Wjl32UIE5KhBda_SpJYwXKZ2FGmnlFbtzv4uKDaJRIs+ hash: v1.k794b7964.7af6b884e5d826df422db99e4a99d2172f3316561a499dbe386ea098b1fc54a9.rti2DMpqC0WEtd_AtG838vQlgQMHfwjBAR4uLN_HnUkfilters-taxonomic-filter-headless--suggested-filters-with-recents--dark:hash: v1.k794b7964.f524f5031bba44f2753215e83b93aa50741a3efc012fcddcc61025e4f851ba2c.sm5eih05jClMTS8zKltGelRiDYSI_2RmOFRZjjLwsAcfilters-taxonomic-filter-headless--suggested-filters-with-recents--light:@@ -2000,6 +2000,10 @@ snapshots:hash: v1.k794b7964.dbd3815a2ce70313c4c756db00ac6833f615b2fd792346d1bf4eab96c5172b24.egLwOZA7evFp0IrboQABx_rpY3KiRH_TGWQOis1NPc8insights-funnelbarhorizontalchart--breakdown--light:hash: v1.k794b7964.c2b5e38ee6ab82db0be7edf94e2574feae2acb2506e8e140291afb05f10c8550.-Ef2fKN3l1IwbDeqKRTqwrKXwX5QaTwYR4TLNRVT_vk+ insights-funnelbarhorizontalchart--breakdown-narrow--dark:+ hash: v1.k794b7964.99ac62cb3be22e452043e48be51bbdba0f04d00e5c78cefefbdf318b8f66a0d2.f4wHnQdPFTmhhB9-kq2GWAxzLKyKpY48XL-k3zv0sKw+ insights-funnelbarhorizontalchart--breakdown-narrow--light:+ hash: v1.k794b7964.41c3e8259905479235261c27ebc60549dc28791305aa844b19a7d168c7c5d081.3W_VgSgqI9eZZCemdwnlMRPzFtMrQzcfi7OoIyy8mqIinsights-funnelbarhorizontalchart--default--dark:hash: v1.k794b7964.05d512588c6069b2105c4684b44857fd48cbc8a6f19cd0e757a9a805dc014a6d.UQhkOqMBpA2JbXYSH14xWkhxYp2jQ_mece8zogMNIHEinsights-funnelbarhorizontalchart--default--light:@@ -4891,7 +4895,7 @@ snapshots:scenes-app-insights-funnels--funnel-historical-trends-edit--light:hash: v1.k794b7964.fa67675b6f95f0ae9c46eb0e803f9db69702419bb4ccc2d21ea973f9fe49d9cc.Zz4siV83g7nIXf96Nfvy6eN5rRtzwO3CEmv24KSztlAscenes-app-insights-funnels--funnel-left-to-right-breakdown-edit--dark:- hash: v1.k794b7964.1df97c88a1076b096c08deccb8c4c291c13b6a4a59fb615e2d77254547381c48.gTsDByOCU_bfzNraCRF_0neMgtIfTq796QitehbRNVQ+ hash: v1.k794b7964.2a18d8ba3f9634f9d7c9ece2ad8ee2f6716706ecbb30595102d003ca8ad27184.y6n_yOa8fbdhe6yHOtjclzfTFAJ9hj0Da0VbQIhaj2Mscenes-app-insights-funnels--funnel-left-to-right-breakdown-edit--light:hash: v1.k794b7964.414326f685dca45885b93d728ae8a75c7d8b600af35d76c9512a74a27e453006.IyZ8qHUwOv6qsBYvdUR1ZsK1Md_GNFCftDGvNZj78BQscenes-app-insights-funnels--funnel-left-to-right-edit--dark:diff --git a/frontend/src/lib/hog-charts/charts/BarChart/BarChart.tsx b/frontend/src/lib/hog-charts/charts/BarChart/BarChart.tsxindex 3033457486ce..aed0c3184f84 100644--- a/frontend/src/lib/hog-charts/charts/BarChart/BarChart.tsx+++ b/frontend/src/lib/hog-charts/charts/BarChart/BarChart.tsx@@ -5,7 +5,9 @@ import { type BarChartPrivate, computeBarTrackRect, computeSeriesBars } from '..import {BAR_TRACK_HOVER_ALPHA,type BarRect,+ type BarRoundedCorners,type BarShadow,+ clipToRoundedRects,drawBarHighlight,drawBars,drawBarTracks,@@ -92,6 +94,37 @@ const HORIZONTAL_MIN_BAND_SIZE_DEFAULT = 24// Reserve room for chart-edge margins + worst-case x-axis title margin (matches useChartMargins).const HORIZONTAL_CHART_MARGIN_PX = DEFAULT_MARGINS.top + DEFAULT_MARGINS.bottom + X_AXIS_TITLE_MARGIN+const ALL_CORNERS: BarRoundedCorners = { topLeft: true, topRight: true, bottomLeft: true, bottomRight: true }++/** One fully-rounded rect per band, spanning the union of that band's stacked segments — the+ * pill the bar layer is clipped to for `roundStackEnds`. Bars in the same band share a band-axis+ * slot (same `dataIndex`), so we group by it and extend along the value axis. */+function stackPillRects(bars: BarRect[], isHorizontal: boolean): BarRect[] {+ const byBand = new Map<number, BarRect>()+ for (const bar of bars) {+ if (bar.width <= 0 || bar.height <= 0) {+ continue+ }+ const existing = byBand.get(bar.dataIndex)+ if (!existing) {+ byBand.set(bar.dataIndex, { ...bar, corners: ALL_CORNERS })+ continue+ }+ if (isHorizontal) {+ const left = Math.min(existing.x, bar.x)+ const right = Math.max(existing.x + existing.width, bar.x + bar.width)+ existing.x = left+ existing.width = right - left+ } else {+ const top = Math.min(existing.y, bar.y)+ const bottom = Math.max(existing.y + existing.height, bar.y + bar.height)+ existing.y = top+ existing.height = bottom - top+ }+ }+ return [...byBand.values()]+}+function resolveBarShadow(barShadow: BarsConfig['shadow']): BarShadow | undefined {if (barShadow === true) {return DEFAULT_BAR_SHADOW@@ -137,6 +170,7 @@ function BarChartInner<Meta = unknown>({bandPadding,minBandSize,valueDomain,+ roundStackEnds = false,} = config?.bars ?? {}const isHorizontal = axisOrientation === 'horizontal'@@ -340,6 +374,18 @@ function BarChartInner<Meta = unknown>({return { series: s, bars }})+ // `roundStackEnds`: round both outer ends of the whole stack into a pill by clipping+ // the bar layer to a rounded rect spanning each band's full extent, then drawing the+ // segments square. The clip rounds the outer corners at the full radius even when the+ // edge segment is a thin sliver (e.g. the last breakdown of a near-100% step), which+ // per-segment rounding can't — it would clamp the radius to the sliver's half-width.+ const stackPills = roundStackEnds+ ? stackPillRects(+ seriesBars.flatMap((sb) => sb.bars),+ isHorizontal+ )+ : []+// Tracks are a separate pass so a later series' full-height track can't paint// over an earlier series' bar. Track is "share of a whole" semantics — only// meaningful for grouped layouts; in stacked/percent every layer would paint@@ -364,8 +410,15 @@ function BarChartInner<Meta = unknown>({ctx.shadowOffsetX = resolvedShadow.offsetX ?? 0ctx.shadowOffsetY = resolvedShadow.offsetY ?? 0}+ if (stackPills.length > 0) {+ ctx.save()+ clipToRoundedRects(ctx, stackPills, barCornerRadius)+ }for (const { series: s, bars } of seriesBars) {- drawBars(baseDrawCtx, s, bars, barCornerRadius)+ drawBars(baseDrawCtx, s, bars, stackPills.length > 0 ? 0 : barCornerRadius)+ }+ if (stackPills.length > 0) {+ ctx.restore()}if (resolvedShadow) {ctx.restore()@@ -377,6 +430,7 @@ function BarChartInner<Meta = unknown>({barLayout,isHorizontal,topStackedKeyByAxis,+ roundStackEnds,barCornerRadius,barTrack,xTickFormatter,@@ -469,8 +523,31 @@ function BarChartInner<Meta = unknown>({alpha = resetHoverFade()lastHoverKeyRef.current = currentKey}+ // Match the resting bar's pill clip so the darker highlight rounds at the stack's outer+ // ends instead of poking square corners past them.+ const hoveredBandPills = roundStackEnds+ ? stackPillRects(+ [+ ...iterBarsAtCursor<ResolvedSeries>({+ series: coloredSeries,+ label: hoveredLabel,+ dataIndex: hoverIndex,+ scales: d3Scales,+ layout: barLayout,+ isHorizontal,+ stackedData,+ topStackedKeyByAxis,+ }),+ ].map(({ bar }) => bar),+ isHorizontal+ )+ : []+ const highlightRadius = hoveredBandPills.length > 0 ? 0 : barCornerRadiusctx.save()ctx.globalAlpha = alpha+ if (hoveredBandPills.length > 0) {+ clipToRoundedRects(ctx, hoveredBandPills, barCornerRadius)+ }for (const { series: s, bar, isTrackHighlight } of items) {if (isTrackHighlight) {const parsed = d3.color(s.color)@@ -487,17 +564,17 @@ function BarChartInner<Meta = unknown>({ctx,computeBarTrackRect(bar, trackAxisStart, trackAxisEnd, isHorizontal),trackColor,- barCornerRadius+ highlightRadius)} else {const highlightColor = d3.color(s.color)?.darker(0.6).toString() ?? s.color- drawBarHighlight(ctx, bar, highlightColor, barCornerRadius)+ drawBarHighlight(ctx, bar, highlightColor, highlightRadius)}}ctx.restore()return true},- [stackedData, barLayout, isHorizontal, topStackedKeyByAxis, barCornerRadius, barTrack]+ [stackedData, barLayout, isHorizontal, topStackedKeyByAxis, roundStackEnds, barCornerRadius, barTrack])// Show each series's own segment value (resolveValue) but anchor the tooltip/value labelsdiff --git a/frontend/src/lib/hog-charts/core/types.ts b/frontend/src/lib/hog-charts/core/types.tsindex f2f7063056e9..0c6b9d0de0d8 100644--- a/frontend/src/lib/hog-charts/core/types.ts+++ b/frontend/src/lib/hog-charts/core/types.ts@@ -235,6 +235,13 @@ export interface BarsConfig {/** Fix the value-axis domain (no data-derived range, no `d3.nice()`) so independent charts* sharing a logical scale stay comparable. Takes precedence over `barLayout: 'percent'`. */valueDomain?: [number, number]+ /** Stacked layouts only — round both *outer* ends of the whole stack so it reads as one pill,+ * rather than only the topmost segment's cap. Implemented by clipping the bar layer to a+ * rounded rect spanning each band's full extent and drawing the segments square, so the outer+ * corners round at the full `cornerRadius` even when the edge segment is a thin sliver (e.g.+ * the last breakdown of a near-100% funnel step) — which per-segment rounding can't, as it+ * clamps the radius to the sliver's half-width. Defaults to `false`. */+ roundStackEnds?: boolean}export interface BarChartConfig extends ChartConfig {diff --git a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsx b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsxindex e75365683d0a..ce9f3f810ce8 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsx+++ b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/FunnelBarHorizontalChart.stories.tsx@@ -66,7 +66,12 @@ export const Breakdown: Story = {render: () => <StoryRender insightFixture={funnelTopToBottomBreakdownFixture} width={720} />,}-// A narrow width forces footers to wrap — each row should grow to fit its text, not overlap the next.+// Narrow widths force the step footers to wrap — each row should grow to fit its own text+// without overlapping the next step.export const DefaultNarrow: Story = {render: () => <StoryRender insightFixture={funnelTopToBottomFixture} width={320} />,}++export const BreakdownNarrow: Story = {+ render: () => <StoryRender insightFixture={funnelTopToBottomBreakdownFixture} width={320} />,+}diff --git a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/SingleStepBar.tsx b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/SingleStepBar.tsxindex 64f5b74751da..959eec63c6f2 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/SingleStepBar.tsx+++ b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/SingleStepBar.tsx@@ -1,4 +1,4 @@-import { type ErrorInfo } from 'react'+import { type ErrorInfo, useMemo } from 'react'import {BarChart,@@ -14,6 +14,8 @@ import {type FunnelBarHorizontalStepData,} from './funnelBarHorizontalTransforms'+const BAR_CORNER_RADIUS = 4+interface SingleStepBarProps {stepData: FunnelBarHorizontalStepDatatheme: ChartTheme@@ -31,12 +33,13 @@ const CHART_CONFIG: BarChartConfig = {showGrid: false,animateHover: true,margins: { top: 0, right: 0, bottom: 0, left: 0 },- tooltip: { placement: 'top' },+ tooltip: { placement: 'cursor' },bars: {- cornerRadius: 4,+ cornerRadius: BAR_CORNER_RADIUS,bandPadding: 0,minBandSize: 0,valueDomain: FUNNEL_BAR_HORIZONTAL_VALUE_DOMAIN,+ roundStackEnds: true,},}@@ -48,14 +51,18 @@ export function SingleStepBar({renderTooltip,onError,}: SingleStepBarProps): JSX.Element {- const onPointClick = interactive- ? (clickData: PointClickData<FunnelBarHorizontalSegmentMeta>): void => {- const meta = clickData.series.meta- if (meta) {- onSegmentClick(meta)- }- }- : undefined+ const onPointClick = useMemo(+ () =>+ interactive+ ? (clickData: PointClickData<FunnelBarHorizontalSegmentMeta>): void => {+ const meta = clickData.series.meta+ if (meta) {+ onSegmentClick(meta)+ }+ }+ : undefined,+ [interactive, onSegmentClick]+ )return (<div className="flex flex-col h-8 my-1">diff --git a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/StepDecorations.tsx b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/StepDecorations.tsxdeleted file mode 100644index f79258fc0e9f..000000000000--- a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/StepDecorations.tsx+++ /dev/null@@ -1,211 +0,0 @@-/* eslint-disable react/forbid-dom-props */-import clsx from 'clsx'--import { IconInfinity } from '@posthog/icons'--import { EntityFilterInfo } from 'lib/components/EntityFilterInfo'-import { SeriesGlyph } from 'lib/components/SeriesGlyph'-import { useChartLayout } from 'lib/hog-charts'-import { IconTrendingFlat, IconTrendingFlatDown } from 'lib/lemon-ui/icons'-import { Tooltip } from 'lib/lemon-ui/Tooltip'-import { humanFriendlyDuration } from 'lib/utils'-import { DuplicateStepIndicator } from 'scenes/funnels/FunnelBarHorizontal/DuplicateStepIndicator'-import { FunnelStepMore } from 'scenes/funnels/FunnelStepMore'-import {- formatConvertedCount,- formatConvertedPercentage,- formatDroppedOffCount,- formatDroppedOffPercentage,- getTooltipTitleForConverted,- getTooltipTitleForDroppedOff,-} from 'scenes/funnels/funnelUtils'-import { ValueInspectorButton } from 'scenes/funnels/ValueInspectorButton'-import { getActionFilterFromFunnelStep } from 'scenes/insights/views/Funnels/funnelStepTableUtils'--import type { FunnelsFilter } from '~/queries/schema/schema-general'-import { type FunnelStepWithConversionMetrics, StepOrderValue } from '~/types'--import type { FunnelBarHorizontalSegmentMeta } from './funnelBarHorizontalTransforms'--const GLYPH_HEIGHT_PX = 23--interface StepDecorationsProps {- steps: FunnelStepWithConversionMetrics[]- funnelsFilter: FunnelsFilter | null | undefined- aggregationTargetLabel: { singular: string; plural: string }- isStepOptional: (step: number) => boolean- hasOptionalSteps: boolean- showPersonsModal: boolean- openPersonsModalForStep: (args: { step: FunnelStepWithConversionMetrics; converted: boolean }) => void- /** Fraction of each band reserved for gap. Header and metadata rows each occupy half this gap. */- gapFraction: number-}--export function StepDecorations({- steps,- funnelsFilter,- aggregationTargetLabel,- isStepOptional,- hasOptionalSteps,- showPersonsModal,- openPersonsModalForStep,- gapFraction,-}: StepDecorationsProps): JSX.Element {- const layout = useChartLayout<FunnelBarHorizontalSegmentMeta>()- const { plotTop, plotLeft, plotHeight, plotWidth } = layout.dimensions- const rowHeight = steps.length > 0 ? plotHeight / steps.length : 0-- return (- <>- {steps.map((step, stepIndex) => {- const rowTop = plotTop + stepIndex * rowHeight- const isOptional = isStepOptional(stepIndex + 1)- const isFirstStep = stepIndex === 0- const isUnordered = funnelsFilter?.funnelOrderType === StepOrderValue.UNORDERED- const gapHeight = rowHeight * gapFraction-- const dimRow = isOptional ? 'opacity-60' : ''-- const halfGlyph = `${GLYPH_HEIGHT_PX / 2}px`- const lineStyle = {- position: 'absolute' as const,- left: 'calc(50% - 1px)',- width: '2px',- borderRight: '2px solid var(--color-border-primary)',- opacity: 0.5,- }-- return (- <div- key={step.order}- style={{ position: 'absolute', top: rowTop, left: 0, width: '100%', height: rowHeight }}- className="pointer-events-none [&_[role=button]]:pointer-events-auto [&_a]:pointer-events-auto [&_button]:pointer-events-auto"- >- <div- style={{ position: 'absolute', top: 0, left: 0, width: plotLeft, height: rowHeight }}- className={clsx('flex flex-col items-center justify-center', isOptional && 'opacity-70')}- >- {stepIndex > 0 && (- <div style={{ ...lineStyle, top: 0, height: `calc(50% - ${halfGlyph})` }} />- )}- {isOptional && hasOptionalSteps && (- <div className="absolute top-0 left-[calc(50%-1px)] w-[2px] h-full bg-[var(--color-border-primary)] opacity-50 z-[1]" />- )}- {isOptional && (- <div className="absolute top-[calc(50%-1px)] left-[calc(50%-1px)] w-6 h-[2px] bg-[var(--color-border-primary)] opacity-50" />- )}- <div- className={clsx('relative z-10 select-none', isOptional && 'ml-6')}- style={{ pointerEvents: 'auto' }}- >- <SeriesGlyph variant="funnel-step-glyph">- {isUnordered ? (- <IconInfinity style={{ fill: 'var(--primary_alt)', width: 14 }} />- ) : (- step.order + 1- )}- </SeriesGlyph>- </div>- {stepIndex < steps.length - 1 && (- <div style={{ ...lineStyle, top: `calc(50% + ${halfGlyph})`, bottom: 0 }} />- )}- </div>-- <header- style={{- position: 'absolute',- top: 0,- left: plotLeft,- width: plotWidth,- height: gapHeight,- }}- className={clsx('flex flex-wrap items-center justify-between leading-5', dimRow)}- >- <div className="flex items-center max-w-full grow">- <div className="overflow-hidden font-bold break-words whitespace-normal">- {isUnordered ? (- <span>Completed {step.order + 1} steps</span>- ) : (- <EntityFilterInfo filter={getActionFilterFromFunnelStep(step)} allowWrap />- )}- </div>- {isOptional ? <div className="ml-1 text-xs">(optional)</div> : null}- {!isUnordered && stepIndex > 0 && step.action_id === steps[stepIndex - 1].action_id && (- <DuplicateStepIndicator />- )}- <FunnelStepMore stepIndex={stepIndex} />- </div>- {step.average_conversion_time && step.average_conversion_time >= Number.EPSILON ? (- <div- className="text-secondary text-xs"- title="Average time of conversion from previous step"- >- Avg time:{' '}- <b>{humanFriendlyDuration(step.average_conversion_time, { maxUnits: 2 })}</b>- </div>- ) : null}- </header>-- <div- style={{- position: 'absolute',- top: rowHeight - gapHeight,- left: plotLeft,- width: plotWidth,- height: gapHeight,- }}- className={clsx('flex flex-wrap items-center gap-2 leading-5', dimRow)}- >- <Tooltip- title={getTooltipTitleForConverted(funnelsFilter, aggregationTargetLabel, stepIndex)}- placement="bottom"- >- <ValueInspectorButton- onClick={- showPersonsModal- ? () => openPersonsModalForStep({ step, converted: true })- : undefined- }- >- <IconTrendingFlat- style={{ color: 'var(--success)' }}- className="mr-1 text-xl align-bottom"- />- <b>{formatConvertedCount(step, aggregationTargetLabel)}</b>- </ValueInspectorButton>{' '}- {!isFirstStep && (- <span className="text-secondary grow">- {`(${formatConvertedPercentage(step)}) completed step`}- </span>- )}- </Tooltip>- {!isFirstStep && (- <Tooltip- title={getTooltipTitleForDroppedOff(funnelsFilter, aggregationTargetLabel)}- placement="bottom"- >- <ValueInspectorButton- onClick={- showPersonsModal- ? () => openPersonsModalForStep({ step, converted: false })- : undefined- }- >- <IconTrendingFlatDown- style={{ color: 'var(--danger)' }}- className="mr-1 text-xl align-bottom"- />- <b>{formatDroppedOffCount(step, aggregationTargetLabel)}</b>- </ValueInspectorButton>{' '}- <span className="text-secondary">- {`(${formatDroppedOffPercentage(step)}) dropped off`}- </span>- </Tooltip>- )}- </div>- </div>- )- })}- </>- )-}diff --git a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.ts b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.tsindex 163361aea38b..c73ccacdc339 100644--- a/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.ts+++ b/products/product_analytics/frontend/insights/funnels/FunnelBarHorizontalChart/funnelBarHorizontalTransforms.ts@@ -7,7 +7,9 @@ import { FunnelStepReference, type FunnelStepWithConversionMetrics } from '~/typexport const FUNNEL_BAR_HORIZONTAL_SEGMENT_KEY_PREFIX = 'funnel-bar-horizontal-segment-'export const FUNNEL_BAR_HORIZONTAL_FILLER_KEY = 'funnel-bar-horizontal-filler'-/** Shared `bars.valueDomain` so each step's separate chart lines up (basis-step percentages, `0–100`). */+/** Every step's bar is its own single-band chart, so they only line up if they share this+ * value domain (passed to BarChart as `bars.valueDomain`). Segment data are basis-step+ * percentages, so the axis is `0–100`. */export const FUNNEL_BAR_HORIZONTAL_VALUE_DOMAIN: [number, number] = [0, 100]const RATE_TO_PERCENT = 100