Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix(COR-1812): Remove date ranges from last zkh graphs (#4912)
Browse files Browse the repository at this point in the history
Co-authored-by: VWSCoronaDashboard29 <B>
  • Loading branch information
ben-van-eekelen authored Oct 24, 2023
1 parent b7ba6d1 commit e8b2cc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
11 changes: 2 additions & 9 deletions packages/app/src/pages/landelijk/varianten.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ export default function CovidVariantenPage(props: StaticProps<typeof getStaticPr
{variantLabels && (
<VariantsTableTile
data={variantTable}
text={{
...textNl.varianten_tabel,
variantCodes: variantLabels,
description: variantenTableDescription,
}}
text={{ ...textNl.varianten_tabel, variantCodes: variantLabels, description: variantenTableDescription }}
sampleThresholdPassed={sampleThresholdPassed}
source={textNl.bronnen.rivm}
dates={{
Expand Down Expand Up @@ -206,10 +202,7 @@ export default function CovidVariantenPage(props: StaticProps<typeof getStaticPr
<>
{archivedVariantChart && variantLabels && (
<VariantsStackedAreaTile
text={{
...textNl.varianten_over_tijd_grafiek,
variantCodes: variantLabels as VariantDynamicLabels,
}}
text={{ ...textNl.varianten_over_tijd_grafiek, variantCodes: variantLabels as VariantDynamicLabels }}
values={archivedVariantChart}
variantColors={variantColors}
metadata={{
Expand Down
12 changes: 7 additions & 5 deletions packages/app/src/pages/landelijk/ziekenhuizen-in-beeld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
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);

Expand Down Expand Up @@ -173,7 +174,7 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
accessibility={{
key: 'hospital_beds_occupied_over_time_chart',
}}
values={valuesWithoutDateRange}
values={lcpsHospitalWithoutRange}
timeframe={hospitalBedsOccupiedOverTimeTimeframe}
forceLegend
seriesConfig={[
Expand Down Expand Up @@ -225,7 +226,7 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
accessibility={{
key: 'intensive_care_beds_occupied_over_time_chart',
}}
values={data.intensive_care_lcps.values}
values={lcpsICWithoutRange}
timeframe={intensiveCareBedsTimeframe}
forceLegend
seriesConfig={[
Expand Down Expand Up @@ -254,6 +255,7 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
},
],
timelineEvents: getTimelineEvents(content.elements.timeSeries, 'intensive_care_lcps', 'beds_occupied_covid'),
useDatesAsRange: false,
}}
/>
</ChartTile>
Expand Down Expand Up @@ -296,7 +298,7 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
accessibility={{
key: 'hospital_patient_influx_over_time_chart',
}}
values={trimLeadingNullValues(valuesWithoutDateRange, 'influx_covid_patients')}
values={trimLeadingNullValues(lcpsHospitalWithoutRange, 'influx_covid_patients')}
timeframe={hospitalPatientInfluxOverTimeTimeframe}
seriesConfig={[
{
Expand Down Expand Up @@ -337,7 +339,7 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
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={[
{
Expand Down

0 comments on commit e8b2cc0

Please sign in to comment.