Skip to content

Instantly share code, notes, and snippets.

@devbyray
Last active August 3, 2021 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devbyray/e1d8b7984476529c5c99340979c6c2dd to your computer and use it in GitHub Desktop.
Save devbyray/e1d8b7984476529c5c99340979c6c2dd to your computer and use it in GitHub Desktop.
getGraphItemData dataProp as string
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