diff --git a/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts b/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts index 523179c5e40716..5f502fcfb26b83 100644 --- a/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts +++ b/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts @@ -319,7 +319,6 @@ describe('filtersToQueryNode', () => { aggregation_axis_prefix: '£', aggregation_axis_postfix: '%', formula: 'A+B', - shown_as: ShownAsValue.VOLUME, display: ChartDisplayType.ActionsAreaGraph, }, breakdown: { @@ -486,7 +485,6 @@ describe('filtersToQueryNode', () => { compare: true, show_legend: true, hidden_legend_indexes: [0, 10], - shown_as: ShownAsValue.STICKINESS, display: ChartDisplayType.ActionsLineGraph, }, } @@ -507,7 +505,6 @@ describe('filtersToQueryNode', () => { const query: Partial = { kind: NodeKind.LifecycleQuery, lifecycleFilter: { - shown_as: ShownAsValue.LIFECYCLE, toggledLifecycles: ['new', 'dormant'], }, } @@ -643,9 +640,7 @@ describe('filtersToQueryNode', () => { }, ], interval: 'day', - lifecycleFilter: { - shown_as: ShownAsValue.LIFECYCLE, - }, + lifecycleFilter: {}, } expect(result).toEqual(query) }) diff --git a/frontend/src/queries/nodes/InsightViz/utils.ts b/frontend/src/queries/nodes/InsightViz/utils.ts index 46b551f5538b7e..d9e169baacb1f0 100644 --- a/frontend/src/queries/nodes/InsightViz/utils.ts +++ b/frontend/src/queries/nodes/InsightViz/utils.ts @@ -11,7 +11,6 @@ import { } from '~/queries/utils' import { filtersToQueryNode } from '../InsightQuery/utils/filtersToQueryNode' import equal from 'fast-deep-equal' -import { ShownAsValue } from 'lib/constants' export const getAllEventNames = (query: InsightQueryNode, allActions: ActionType[]): string[] => { const { actions, events } = seriesToActionsAndEvents((query as TrendsQuery).series || []) @@ -82,18 +81,6 @@ export const getBreakdown = (query: InsightQueryNode): BreakdownFilter | undefin } } -export const getShownAs = (query: InsightQueryNode): ShownAsValue | undefined => { - if (isLifecycleQuery(query)) { - return query.lifecycleFilter?.shown_as - } else if (isStickinessQuery(query)) { - return query.stickinessFilter?.shown_as - } else if (isTrendsQuery(query)) { - return query.trendsFilter?.shown_as - } else { - return undefined - } -} - export const getShowLegend = (query: InsightQueryNode): boolean | undefined => { if (isStickinessQuery(query)) { return query.stickinessFilter?.show_legend diff --git a/frontend/src/scenes/insights/insightVizDataLogic.ts b/frontend/src/scenes/insights/insightVizDataLogic.ts index a5543905fe49ae..9d451f8d12f4d8 100644 --- a/frontend/src/scenes/insights/insightVizDataLogic.ts +++ b/frontend/src/scenes/insights/insightVizDataLogic.ts @@ -36,7 +36,6 @@ import { getFormula, getInterval, getSeries, - getShownAs, getShowLegend, getShowPercentStackView, getShowValueOnSeries, @@ -122,7 +121,6 @@ export const insightVizDataLogic = kea([ interval: [(s) => [s.querySource], (q) => (q ? getInterval(q) : null)], properties: [(s) => [s.querySource], (q) => (q ? q.properties : null)], samplingFactor: [(s) => [s.querySource], (q) => (q ? q.samplingFactor : null)], - shownAs: [(s) => [s.querySource], (q) => (q ? getShownAs(q) : null)], showLegend: [(s) => [s.querySource], (q) => (q ? getShowLegend(q) : null)], showValueOnSeries: [(s) => [s.querySource], (q) => (q ? getShowValueOnSeries(q) : null)], showPercentStackView: [(s) => [s.querySource], (q) => (q ? getShowPercentStackView(q) : null)], diff --git a/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx b/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx index c5e99ab164b118..4da7d2cbad9c60 100644 --- a/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx +++ b/frontend/src/scenes/trends/viz/ActionsLineGraph.tsx @@ -24,7 +24,6 @@ export function ActionsLineGraph({ compare, display, interval, - shownAs, showValueOnSeries, showPercentStackView, supportsPercentStackView, @@ -84,19 +83,18 @@ export function ActionsLineGraph({ const urls = urlsForDatasets(crossDataset, index) if (urls?.length) { - const title = - shownAs === 'Stickiness' ? ( + const title = isStickiness ? ( + <> + stickiness on day {day} + + ) : ( + (label: string) => ( <> - stickiness on day {day} + {label} on{' '} + - ) : ( - (label: string) => ( - <> - {label} on{' '} - - - ) ) + ) openPersonsModal({ urls,