From 2b37dc36b765166575143b307f428f0d7c43b038 Mon Sep 17 00:00:00 2001 From: Yorick de Vries Date: Thu, 26 Oct 2023 18:25:00 +0200 Subject: [PATCH] Revert "fix(COR-1812): Remove date ranges from last zkh graphs (#4912)" This reverts commit e8b2cc0f27de33de377745827c06563b40e80a00. --- packages/app/src/pages/landelijk/varianten.tsx | 11 +++++++++-- .../src/pages/landelijk/ziekenhuizen-in-beeld.tsx | 12 +++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/app/src/pages/landelijk/varianten.tsx b/packages/app/src/pages/landelijk/varianten.tsx index e1096fd3c6..d01e4ab58e 100644 --- a/packages/app/src/pages/landelijk/varianten.tsx +++ b/packages/app/src/pages/landelijk/varianten.tsx @@ -172,7 +172,11 @@ export default function CovidVariantenPage(props: StaticProps {archivedVariantChart && variantLabels && ( ) => { const hospitalLastValue = getLastFilledValue(data.hospital_lcps); const icuLastValue = getLastFilledValue(data.intensive_care_lcps); - const lcpsHospitalWithoutRange = data.hospital_lcps.values.map((value) => ({ ...value, date_end_unix: undefined, date_start_unix: undefined })); - const lcpsICWithoutRange = data.intensive_care_lcps.values.map((value) => ({ ...value, date_end_unix: undefined, date_start_unix: undefined })); + const valuesWithoutDateRange = data.hospital_lcps.values.map((value) => ({ ...value, date_end_unix: undefined, date_start_unix: undefined })); const lastInsertionDateOfPage = getLastInsertionDateOfPage(data, pageMetrics); @@ -174,7 +173,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { accessibility={{ key: 'hospital_beds_occupied_over_time_chart', }} - values={lcpsHospitalWithoutRange} + values={valuesWithoutDateRange} timeframe={hospitalBedsOccupiedOverTimeTimeframe} forceLegend seriesConfig={[ @@ -226,7 +225,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { accessibility={{ key: 'intensive_care_beds_occupied_over_time_chart', }} - values={lcpsICWithoutRange} + values={data.intensive_care_lcps.values} timeframe={intensiveCareBedsTimeframe} forceLegend seriesConfig={[ @@ -255,7 +254,6 @@ const HospitalsAndCarePage = (props: StaticProps) => { }, ], timelineEvents: getTimelineEvents(content.elements.timeSeries, 'intensive_care_lcps', 'beds_occupied_covid'), - useDatesAsRange: false, }} /> @@ -298,7 +296,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { accessibility={{ key: 'hospital_patient_influx_over_time_chart', }} - values={trimLeadingNullValues(lcpsHospitalWithoutRange, 'influx_covid_patients')} + values={trimLeadingNullValues(valuesWithoutDateRange, 'influx_covid_patients')} timeframe={hospitalPatientInfluxOverTimeTimeframe} seriesConfig={[ { @@ -339,7 +337,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { accessibility={{ key: 'intensive_care_patient_influx_over_time_chart', }} - values={trimLeadingNullValues(lcpsICWithoutRange, 'influx_covid_patients')} + values={trimLeadingNullValues(data.intensive_care_lcps.values, 'influx_covid_patients')} timeframe={intensiveCarePatientInfluxOverTimeTimeframe} seriesConfig={[ {