diff --git a/frontend/src/scenes/insights/insightLogic.ts b/frontend/src/scenes/insights/insightLogic.ts index a34f3ceb96bdf..51960903cdebf 100644 --- a/frontend/src/scenes/insights/insightLogic.ts +++ b/frontend/src/scenes/insights/insightLogic.ts @@ -472,7 +472,6 @@ export const insightLogic = kea([ }, ], intervalUnit: [(s) => [s.filters], (filters) => filters?.interval || 'day'], - timezone: [(s) => [s.insight], (insight) => insight?.timezone || 'UTC'], exporterResourceParams: [ (s) => [s.filters, s.currentTeamId, s.insight], ( diff --git a/frontend/src/scenes/insights/insightVizDataLogic.ts b/frontend/src/scenes/insights/insightVizDataLogic.ts index 3fa6e45c536c7..f12b4726b7afb 100644 --- a/frontend/src/scenes/insights/insightVizDataLogic.ts +++ b/frontend/src/scenes/insights/insightVizDataLogic.ts @@ -193,6 +193,8 @@ export const insightVizDataLogic = kea([ return insightDataError?.queryId || null }, ], + + timezone: [(s) => [s.insightData], (insightData) => insightData?.timezone || 'UTC'], }), listeners(({ actions, values }) => ({ diff --git a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx index 86ed418cad052..770b7f2ae87b3 100644 --- a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx +++ b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx @@ -45,7 +45,6 @@ export function InsightsTable({ isMainInsightView = false, }: InsightsTableProps): JSX.Element { const { insightMode } = useValues(insightSceneLogic) - // TODO: replace insight etc. with data exploration variant const { insightProps, isInDashboardContext, insight, hiddenLegendKeys } = useValues(insightLogic) const { toggleVisibility } = useActions(insightLogic) const { diff --git a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx index 176f9b6d66a90..016eb4354dcb2 100644 --- a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx +++ b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx @@ -34,6 +34,7 @@ import { PieChart } from 'scenes/insights/views/LineGraph/PieChart' import { themeLogic } from '~/layout/navigation-3000/themeLogic' import { SeriesLetter } from 'lib/components/SeriesGlyph' import { TrendsFilter } from '~/queries/schema' +import { insightVizDataLogic } from 'scenes/insights/insightVizDataLogic' export function ensureTooltipElement(): HTMLElement { let tooltipEl = document.getElementById('InsightTooltipWrapper') @@ -242,7 +243,8 @@ export function LineGraph_({ let datasets = _datasets const { createTooltipData } = useValues(lineGraphLogic) - const { insight, timezone } = useValues(insightLogic) + const { insight, insightProps } = useValues(insightLogic) + const { timezone } = useValues(insightVizDataLogic(insightProps)) const { aggregationLabel } = useValues(groupsModel) const { isDarkModeOn } = useValues(themeLogic)