-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathRCPCHChart.stories.tsx
124 lines (112 loc) · 2.93 KB
/
RCPCHChart.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// Replace your-renderer with the renderer you are using (e.g., react, vue3, etc.)
import type { Meta, StoryObj } from '@storybook/react';
import RCPCHChart from './RCPCHChart.tsx';
import { ChartStyle } from '../interfaces/StyleObjects.ts';
// data
import { twoToEight } from '../testParameters/measurements/twoToEight';
import { prematureGirlOverThreeHeight } from '../testParameters/measurements/prematureGirlOverThreeHeight.ts';
import { sdsTenYearGirlData } from '../testParameters/measurements/sdsTenYearGirlData'
const meta: Meta<typeof RCPCHChart> = {
component: RCPCHChart,
};
export default meta;
type Story = StoryObj<typeof RCPCHChart>;
const customChartStyle: ChartStyle = {
backgroundColour: "tomato"
}
const customStyles = {
chartStyle: customChartStyle
}
export const SDSChart: Story = {
args: {
title: 'Patient Name - Hospital Number',
measurementMethod: 'height',
reference: 'uk-who',
sex: 'female',
measurements: {
height: twoToEight,
weight: [],
bmi: [],
ofc: []
},
midParentalHeightData: {},
enableZoom: true,
chartType: 'sds',
enableExport: false,
exportChartCallback: ()=>{},
clinicianFocus: true,
theme: 'tanner3',
customThemeStyles: {}
}
};
export const CentileChart: Story = {
args: {
title: 'Patient Name - Hospital Number',
measurementMethod: 'height',
reference: 'uk-who',
sex: 'female',
measurements: {height: twoToEight},
midParentalHeightData: {},
enableZoom: true,
chartType: 'centile',
enableExport: false,
exportChartCallback: ()=>{},
theme: 'monochrome',
customThemeStyles: {}
},
};
export const TomatoCentileChart: Story = {
args: {
title: 'Patient Name - Hospital Number',
measurementMethod: 'height',
reference: 'uk-who',
sex: 'female',
measurements: {
height: twoToEight
},
midParentalHeightData: {},
enableZoom: true,
chartType: 'centile',
enableExport: false,
exportChartCallback: ()=>{},
theme: 'monochrome',
customThemeStyles: customStyles
},
};
export const PrematureSDSChart: Story = {
args: {
title: 'Patient Name - Hospital Number',
measurementMethod: 'height',
reference: 'uk-who',
sex: 'female',
measurements: {
height: prematureGirlOverThreeHeight,
weight: [],
bmi: [],
ofc: []
},
midParentalHeightData: {},
enableZoom: true,
chartType: 'sds',
enableExport: false,
exportChartCallback: ()=>{},
theme: 'tanner2',
customThemeStyles: {}
},
};
export const MultipleMeasurementSDSChart: Story = {
args: {
title: 'Patient Name - Hospital Number',
measurementMethod: 'height',
reference: 'uk-who',
sex: 'female',
measurements: sdsTenYearGirlData,
midParentalHeightData: {},
enableZoom: true,
chartType: 'sds',
enableExport: false,
exportChartCallback: ()=>{},
theme: 'monochrome',
customThemeStyles: {}
},
}