Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions web/tools/experiments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,8 @@ function ResultsView({
callTool,
]);

// Tables (Funnel / By Goal) show every goal including the visitors baseline,
// matching the admin. The bar chart drops visitors (its conversion would
// always be 100% and would flatten the other goals).
// Every goal, visitors baseline included — used by the tables and the chart,
// matching the admin.
const sortedGoals = useMemo(
() => (data ? sortByTotal(data.goals) : []),
[data],
Expand Down Expand Up @@ -418,13 +417,11 @@ function ResultsView({
"Test Variant 1": point.variant,
})) ?? [];

const barData = sortedGoals
.filter((g) => g.goal !== "visitors")
.map((g) => ({
goal: g.goal,
Default: percentage(g.default, visitors.default),
"Test Variant 1": percentage(g.variant, visitors.variant),
}));
const barData = sortedGoals.map((g) => ({
goal: g.goal,
Default: percentage(g.default, visitors.default),
"Test Variant 1": percentage(g.variant, visitors.variant),
}));

return (
<div className="flex flex-col gap-6">
Expand Down
Loading