Skip to content

Commit 448d590

Browse files
committed
add bmi story
1 parent ec92046 commit 448d590

File tree

4 files changed

+896
-1
lines changed

4 files changed

+896
-1
lines changed

src/CentileChart/CentileChart.stories.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { twoWeightMeasurements } from "../testParameters/measurements/twoWeightM
1111
import { twoToEight } from "../testParameters/measurements/twoToEight"
1212
import { twoToEightWeight } from "../testParameters/measurements/twoToEightWeight"
1313
import { twoToEightOFC } from "../testParameters/measurements/twoToEightOFC"
14+
import { twoToEightGirlBMI } from "../testParameters/measurements/twoToEightYearsGirlBMI"
1415
import { prematureThreeMonths } from "../testParameters/measurements/prematureThreeMonths"
1516
import { smallChildJustOverTwo } from "../testParameters/measurements/smallChildJustOverTwo"
1617
import { prematureTwentyTwoWeeksWeight } from "../testParameters/measurements/prematureTwentyTwoWeeks"
@@ -309,6 +310,26 @@ export const WithOFCMeasurementsTwoToEightYears = () => (
309310
/>
310311
);
311312

313+
export const WithBMIMeasurementsTwoToEightYears = () => (
314+
<CentileChart
315+
chartsVersion="7.0.0"
316+
reference="uk-who"
317+
title={"BMI Two to Nine Girl"}
318+
subtitle="UK-WHO"
319+
measurementMethod="bmi"
320+
sex="female"
321+
childMeasurements={twoToEightGirlBMI}
322+
midParentalHeightData={midParentalHeights}
323+
enableZoom={true}
324+
styles={monochromeStyles}
325+
enableExport={true}
326+
exportChartCallback={()=>null}
327+
clinicianFocus={true}
328+
showCentileLabels={true}
329+
showSDSLabels={true}
330+
/>
331+
);
332+
312333
export const WithExtremePrematureFemaleHeights = () => (
313334
<CentileChart
314335
chartsVersion="baz"

src/functions/tooltips.ts

+6
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ export function tooltipText(
207207
} else {
208208
// over 42 weeks
209209
// if no errors, return the ages, measurement and calculations
210+
let percentageMedianBMI = ""
211+
if (measurementMethod==="bmi"){
212+
console.log(datum);
213+
214+
percentageMedianBMI = `Percentage median BMI: ${measurementMethod}`
215+
}
210216

211217
// sds in square brackets
212218
const sds_string = `[SDS: ${sds > 0 ? '+' + Math.round(sds*1000)/1000 : Math.round(sds*1000)/1000 }]`;

0 commit comments

Comments
 (0)