From 2343243f26dc4371639f85142b8a97dc466f586d Mon Sep 17 00:00:00 2001
From: VWSCoronaDashboard29 <ben.vaneekelen@netcompany.com>
Date: Mon, 18 Dec 2023 15:41:09 +0100
Subject: [PATCH 1/2] refactor(COR-1837): Refactor variables

---
 .../app/src/domain/variants/variants-stacked-area-tile.tsx  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/packages/app/src/domain/variants/variants-stacked-area-tile.tsx b/packages/app/src/domain/variants/variants-stacked-area-tile.tsx
index 1ba3a953bb..54166f568c 100644
--- a/packages/app/src/domain/variants/variants-stacked-area-tile.tsx
+++ b/packages/app/src/domain/variants/variants-stacked-area-tile.tsx
@@ -25,7 +25,7 @@ interface VariantsStackedAreaTileProps {
 }
 
 export const VariantsStackedAreaTile = ({ text, values, variantColors, metadata }: VariantsStackedAreaTileProps) => {
-  const [variantTimeframe, setVariantTimeframe] = useState<TimeframeOption>(TimeframeOption.THREE_MONTHS);
+  const [variantStackedAreaTimeframe, setVariantStackedAreaTimeframe] = useState<TimeframeOption>(TimeframeOption.THREE_MONTHS);
 
   const { list, toggle, clear } = useList<keyof VariantChartValue>(alwaysEnabled);
 
@@ -55,7 +55,7 @@ export const VariantsStackedAreaTile = ({ text, values, variantColors, metadata
       metadata={metadata}
       timeframeOptions={TimeframeOptionsList}
       timeframeInitialValue={TimeframeOption.THREE_MONTHS}
-      onSelectTimeframe={setVariantTimeframe}
+      onSelectTimeframe={setVariantStackedAreaTimeframe}
     >
       <InteractiveLegend helpText={text.legend_help_tekst} selectOptions={selectOptions} selection={list} onToggleItem={toggle} onReset={clear} />
       <Spacer marginBottom={space[2]} />
@@ -64,7 +64,7 @@ export const VariantsStackedAreaTile = ({ text, values, variantColors, metadata
           key: 'variants_stacked_area_over_time_chart',
         }}
         values={values}
-        timeframe={variantTimeframe}
+        timeframe={variantStackedAreaTimeframe}
         seriesConfig={filteredConfig}
         disableLegend
         dataOptions={{

From 89792e1bf6146d128cc32c53ebee17323deb9525 Mon Sep 17 00:00:00 2001
From: VWSCoronaDashboard29 <ben.vaneekelen@netcompany.com>
Date: Mon, 18 Dec 2023 15:58:30 +0100
Subject: [PATCH 2/2] feat(COR-1837): Set timeframe of archived graphs to max

---
 .../app/src/domain/variants/variants-stacked-area-tile.tsx    | 4 ++--
 packages/app/src/pages/gemeente/[code]/positieve-testen.tsx   | 2 +-
 packages/app/src/pages/landelijk/positieve-testen.tsx         | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/packages/app/src/domain/variants/variants-stacked-area-tile.tsx b/packages/app/src/domain/variants/variants-stacked-area-tile.tsx
index 54166f568c..e311c337d4 100644
--- a/packages/app/src/domain/variants/variants-stacked-area-tile.tsx
+++ b/packages/app/src/domain/variants/variants-stacked-area-tile.tsx
@@ -25,7 +25,7 @@ interface VariantsStackedAreaTileProps {
 }
 
 export const VariantsStackedAreaTile = ({ text, values, variantColors, metadata }: VariantsStackedAreaTileProps) => {
-  const [variantStackedAreaTimeframe, setVariantStackedAreaTimeframe] = useState<TimeframeOption>(TimeframeOption.THREE_MONTHS);
+  const [variantStackedAreaTimeframe, setVariantStackedAreaTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);
 
   const { list, toggle, clear } = useList<keyof VariantChartValue>(alwaysEnabled);
 
@@ -54,7 +54,7 @@ export const VariantsStackedAreaTile = ({ text, values, variantColors, metadata
       description={text.toelichting}
       metadata={metadata}
       timeframeOptions={TimeframeOptionsList}
-      timeframeInitialValue={TimeframeOption.THREE_MONTHS}
+      timeframeInitialValue={variantStackedAreaTimeframe}
       onSelectTimeframe={setVariantStackedAreaTimeframe}
     >
       <InteractiveLegend helpText={text.legend_help_tekst} selectOptions={selectOptions} selection={list} onToggleItem={toggle} onReset={clear} />
diff --git a/packages/app/src/pages/gemeente/[code]/positieve-testen.tsx b/packages/app/src/pages/gemeente/[code]/positieve-testen.tsx
index 2683347f11..7daa7365ca 100644
--- a/packages/app/src/pages/gemeente/[code]/positieve-testen.tsx
+++ b/packages/app/src/pages/gemeente/[code]/positieve-testen.tsx
@@ -79,7 +79,7 @@ export const getStaticProps = createGetStaticProps(
 
 function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
   const { pageText, selectedGmData: data, selectedArchivedGmData: archivedData, archivedChoropleth, municipalityName, content, lastGenerated } = props;
-  const [positivelyTestedPeopleTimeframe, setpositivelyTestedPeopleTimeframe] = useState<TimeframeOption>(TimeframeOption.SIX_MONTHS);
+  const [positivelyTestedPeopleTimeframe, setpositivelyTestedPeopleTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);
   const { commonTexts, formatNumber, formatDateFromSeconds } = useIntl();
   const reverseRouter = useReverseRouter();
   const { textGm, textShared } = useDynamicLokalizeTexts<LokalizeTexts>(pageText, selectLokalizeTexts);
diff --git a/packages/app/src/pages/landelijk/positieve-testen.tsx b/packages/app/src/pages/landelijk/positieve-testen.tsx
index 7b259eef60..a282fde636 100644
--- a/packages/app/src/pages/landelijk/positieve-testen.tsx
+++ b/packages/app/src/pages/landelijk/positieve-testen.tsx
@@ -78,7 +78,7 @@ export const getStaticProps = createGetStaticProps(
 function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
   const { pageText, selectedArchivedNlData: data, archivedChoropleth, content, lastGenerated } = props;
 
-  const [confirmedCasesInfectedTimeframe, setConfirmedCasesInfectedTimeframe] = useState<TimeframeOption>(TimeframeOption.SIX_MONTHS);
+  const [confirmedCasesInfectedTimeframe, setConfirmedCasesInfectedTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);
 
   const [confirmedCasesInfectedPercentageTimeframe, setConfirmedCasesInfectedPercentageTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);