Last active
August 3, 2021 09:42
-
-
Save devbyray/e1d8b7984476529c5c99340979c6c2dd to your computer and use it in GitHub Desktop.
getGraphItemData dataProp as string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getGraphItemData(dataProp: string, data: Vaccination[]) : GraphDataItemModel[] { | |
return data?.map( | |
(item) => { | |
const { date } = item | |
const value = | |
return new GraphDataItemModel({ | |
label: item.date, | |
value: item[dataProp] ?? 0 | |
}) | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment