Skip to content

Commit

Permalink
feat: [CGC-31] Graph Overflows Widget (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
petterav authored Jun 6, 2024
1 parent 9c9fff0 commit c38f385
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 43 deletions.
37 changes: 14 additions & 23 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-05-22T11:41:21.544Z\n"
"PO-Revision-Date: 2024-05-22T11:41:21.544Z\n"

msgid "Growth Chart"
msgstr "Growth Chart"

msgid "There was an error fetching the config for the growth chart."
msgstr "There was an error fetching the config for the growth chart."

msgid "Please check the configuration in Datastore Management and try again."
msgstr "Please check the configuration in Datastore Management and try again."

msgid "There was an error fetching the custom references for the growth chart."
msgstr "There was an error fetching the custom references for the growth chart."
"POT-Creation-Date: 2024-06-02T06:46:27.370Z\n"
"PO-Revision-Date: 2024-06-02T06:46:27.371Z\n"

msgid "Date"
msgstr "Date"
Expand All @@ -32,15 +20,15 @@ msgstr "Year"
msgid "Years"
msgstr "Years"

msgid "Growth Chart"
msgstr "Growth Chart"

msgid "Months"
msgstr "Months"

msgid "Weeks"
msgstr "Weeks"

msgid "Days"
msgstr "Days"

msgid "year"
msgstr "year"

Expand All @@ -59,12 +47,6 @@ msgstr "week"
msgid "weeks"
msgstr "weeks"

msgid "day"
msgstr "day"

msgid "days"
msgstr "days"

msgid "Head circumference"
msgstr "Head circumference"

Expand Down Expand Up @@ -106,3 +88,12 @@ msgstr "Boy"

msgid "Girl"
msgstr "Girl"

msgid "There was an error fetching the config for the growth chart."
msgstr "There was an error fetching the config for the growth chart."

msgid "Please check the configuration in Datastore Management and try again."
msgstr "Please check the configuration in Datastore Management and try again."

msgid "There was an error fetching the custom references for the growth chart."
msgstr "There was an error fetching the custom references for the growth chart."
15 changes: 8 additions & 7 deletions src/Plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ const PluginInner = (propsFromParent: EnrollmentOverviewProps) => {
<QueryClientProvider
client={queryClient}
>
<div style={{
backgroundColor: 'white',
width: '100vw',
display: 'flex',
margin: 0,
padding: 0,
}}
<div
style={{
backgroundColor: 'white',
width: '100vw',
display: 'flex',
margin: 0,
padding: 0,
}}
>
<div
style={{ width: '100%' }}
Expand Down
29 changes: 16 additions & 13 deletions src/components/GrowthChart/GrowthChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const GrowthChart = ({

return (
<div>
<div className='flex flex-wrap-reverse pl-12'>
<div className='flex flex-wrap-reverse pl-14'>
<div>
<ChartSelector
category={category}
Expand All @@ -84,18 +84,21 @@ export const GrowthChart = ({
/>
</div>
</div>

<GrowthChartBuilder
measurementData={measurementData}
datasetValues={dataSetValues}
datasetMetadata={dataSetMetadata}
yAxisValues={yAxisValues}
keysDataSet={keysDataSet}
dateOfBirth={new Date(trackedEntity?.dateOfBirth)}
category={category}
dataset={dataset}
isPercentiles={isPercentiles}
/>
<div className='px-2'>
<div className='overflow-auto'>
<GrowthChartBuilder
measurementData={measurementData}
datasetValues={dataSetValues}
datasetMetadata={dataSetMetadata}
yAxisValues={yAxisValues}
keysDataSet={keysDataSet}
dateOfBirth={new Date(trackedEntity?.dateOfBirth)}
category={category}
dataset={dataset}
isPercentiles={isPercentiles}
/>
</div>
</div>
</div>
);
};
8 changes: 8 additions & 0 deletions src/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,10 @@ video {
border-bottom-right-radius: 0.125rem;
}

.border-t {
border-top-width: 1px;
}

.border {
border-width: 1px;
}
Expand Down Expand Up @@ -1837,6 +1841,10 @@ video {
padding-left: 3rem;
}

.pl-13 {
padding-left: 3.25rem;
}

.text-left {
text-align: left;
}
Expand Down

0 comments on commit c38f385

Please sign in to comment.