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