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

Commit

Permalink
feature/COR-1676-consistent-hospital-pages-labels-fix (#4943)
Browse files Browse the repository at this point in the history
* feat(COR-1676): Initial solution

* feat(COR-1676): Add bandpadding as parameter for hospital graphs

* feat(COR-1676): Extract magic number to constant

* feat(COR-1676): Changed key name to prevent move

* feat(COR-1676): Set labels correctly
  • Loading branch information
ben-van-eekelen authored Dec 7, 2023
1 parent 05d19ba commit d913e28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/app/src/pages/landelijk/ziekenhuizen-in-beeld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
{
type: 'line',
metricProperty: 'beds_occupied_covid_moving_average',
label: textNl.hospitals.chart_beds_occupied.legend_dot_label,
label: textNl.hospitals.chart_beds_occupied.legend_trend_label,
color: colors.primary,
},
{
type: 'bar',
metricProperty: 'beds_occupied_covid',
label: textNl.hospitals.chart_beds_occupied.legend_trend_label,
label: textNl.hospitals.chart_beds_occupied.legend_dot_label,
color: colors.primary,
bandPadding: gappedBarBandPaddingOverride,
},
Expand Down Expand Up @@ -236,13 +236,13 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
{
type: 'line',
metricProperty: 'beds_occupied_covid_moving_average',
label: textNl.icu.chart_beds_occupied.legend_dot_label,
label: textNl.icu.chart_beds_occupied.legend_trend_label,
color: colors.primary,
},
{
type: 'bar',
metricProperty: 'beds_occupied_covid',
label: textNl.icu.chart_beds_occupied.legend_trend_label,
label: textNl.icu.chart_beds_occupied.legend_dot_label,
color: colors.primary,
bandPadding: gappedBarBandPaddingOverride,
},
Expand All @@ -252,10 +252,11 @@ const HospitalsAndCarePage = (props: StaticProps<typeof getStaticProps>) => {
{
start: data.intensive_care_lcps.values[0].date_unix,
end: new Date('1 June 2020').getTime() / 1000,
label: textNl.icu.chart_beds_occupied.legend_inaccurate_label,
label: textNl.icu.chart_beds_occupied.legend_inaccurate_labels,
shortLabel: commonTexts.common.incomplete,
},
],

timelineEvents: getTimelineEvents(content.elements.timeSeries, 'intensive_care_lcps', 'beds_occupied_covid'),
useDatesAsRange: false,
}}
Expand Down
2 changes: 2 additions & 0 deletions packages/cms/src/lokalize/key-mutations.csv
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
timestamp,action,key,document_id,move_to
2023-12-06T14:06:27.293Z,add,pages.hospitals_and_care_page.nl.icu.chart_beds_occupied.legend_inaccurate_labels,CFKdIPVDhosWzjhr2xUv19,__
2023-12-06T14:06:27.294Z,delete,pages.hospitals_and_care_page.nl.icu.chart_beds_occupied.legend_inaccurate_label,PKXdxxxKAnTg0F1ZCrIxVz,__

0 comments on commit d913e28

Please sign in to comment.